Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#128] Update for iRODS 4.3.1 (main) #131

Merged
merged 10 commits into from
Feb 22, 2024
Merged

[#128] Update for iRODS 4.3.1 (main) #131

merged 10 commits into from
Feb 22, 2024

Conversation

korydraughn
Copy link
Contributor

@korydraughn korydraughn commented Feb 15, 2024

Aside from a few recent changes, I've seen this code pass the test suite against Elasticsearch 7.4.2 and 8.12.1.

Below are the test results for Elasticsearch 8.12.1. Notice the atomic metadata ops test was skipped. I think this is mostly fine given the fact that the atomic APIs are relatively stable. I'll see if I can track down how to properly handle that test case.

workstation:~/scripts$ time python3 run_tests.py --run_s test_plugin_indexing
irods.test.test_plugin_indexing.TestIndexingPlugin.test_applying_indicators_ex_post_facto ... ok
irods.test.test_plugin_indexing.TestIndexingPlugin.test_fulltext_and_metadata_indicators_on_same_colln__19 ... ok
irods.test.test_plugin_indexing.TestIndexingPlugin.test_graceful_handling_of_premature_deletion_62 ... ok
irods.test.test_plugin_indexing.TestIndexingPlugin.test_indexing_01_basic ... ok
irods.test.test_plugin_indexing.TestIndexingPlugin.test_indexing_of_odd_chars_and_json_in_metadata__41__43 ... ok
irods.test.test_plugin_indexing.TestIndexingPlugin.test_indexing_with_atomic_metadata_ops_66 ... skipped 'Only manual testing is enabled for tests that depend on a Python3 virtual env'
irods.test.test_plugin_indexing.TestIndexingPlugin.test_iput_with_metadata__92 ... ok
irods.test.test_plugin_indexing.TestIndexingPlugin.test_load_parameters_as_int_or_string__91 ... ok
irods.test.test_plugin_indexing.TestIndexingPlugin.test_purge_when_AVU_indicator_removed ... ok
irods.test.test_plugin_indexing.TestIndexingPlugin.test_response_to_elasticsearch_404_fulltext__issue_34 ... ok
irods.test.test_plugin_indexing.TestIndexingPlugin.test_response_to_elasticsearch_404_metadata__issue_34 ... ok
irods.test.test_plugin_indexing.TestIndexingPlugin.test_throttle_limit_45 ... ok

----------------------------------------------------------------------
Ran 12 tests in 1088.884s

OK (skipped=1)
<__main__.RegisteredTestResult run=12 errors=0 failures=0>

real    18m11.630s
user    0m39.715s
sys     0m22.166s

Now we need to think through how to incorporate testing of Elasticsearch 8. To test it, I launched an Elasticsearch container and ran the tests at the bench. We'll need to decide whether it's worth modifying the test hook or moving towards a docker compose like setup.


Forgot to mention - this PR also formats all of the C++ code. It's better to view the commits individually so you see what the true changes for 4.3.1 are.

configuration.cpp Outdated Show resolved Hide resolved
configuration.cpp Outdated Show resolved Hide resolved
configuration.hpp Outdated Show resolved Hide resolved
configuration.hpp Show resolved Hide resolved
cpp_json_kw.hpp Outdated Show resolved Hide resolved
libirods_rule_engine_plugin-elasticsearch.cpp Outdated Show resolved Hide resolved
libirods_rule_engine_plugin-elasticsearch.cpp Outdated Show resolved Hide resolved
libirods_rule_engine_plugin-elasticsearch.cpp Outdated Show resolved Hide resolved
utilities.hpp Outdated Show resolved Hide resolved
plugin_specific_configuration.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@alanking alanking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any guidance on how to review this would be helpful, given its size and the fact that not all of it is new. I've mainly been responding to your comments that solicit responses :) Thanks

configuration.hpp Outdated Show resolved Hide resolved
@trel
Copy link
Member

trel commented Feb 16, 2024

commit e42cc22 has typo in commit message (elasticlist)

@trel
Copy link
Member

trel commented Feb 16, 2024

Any guidance on how to review this would be helpful

The bulk of the line changes are formatting. So clicking through the commits one by one made it easier to see what was going on / ignore the clang formatting.

@korydraughn
Copy link
Contributor Author

Right. Definitely better to view each commit separately.

Once I resolve the current comments, I'll squash and it should be easier to read.

I'll put this in draft for now.

@korydraughn korydraughn marked this pull request as draft February 16, 2024 19:23
Copy link
Contributor

@alanking alanking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully some of these aren't out of date...

document_type.cmake Outdated Show resolved Hide resolved
packaging/test_plugin_indexing.py Outdated Show resolved Hide resolved
packaging/test_plugin_indexing.py Show resolved Hide resolved
packaging/test_plugin_indexing.py Show resolved Hide resolved
libirods_rule_engine_plugin-elasticsearch.cpp Show resolved Hide resolved
libirods_rule_engine_plugin-elasticsearch.cpp Outdated Show resolved Hide resolved
libirods_rule_engine_plugin-elasticsearch.cpp Outdated Show resolved Hide resolved
libirods_rule_engine_plugin-elasticsearch.cpp Outdated Show resolved Hide resolved
libirods_rule_engine_plugin-elasticsearch.cpp Outdated Show resolved Hide resolved
libirods_rule_engine_plugin-elasticsearch.cpp Outdated Show resolved Hide resolved
@korydraughn
Copy link
Contributor Author

NTS: Test TLS support.

@korydraughn
Copy link
Contributor Author

Noting here that TLS with ES requires authentication. I don't think this plugin currently supports configuration options for that.

Also, the ESv8 docker container generates the necessary certs for you to test it. You can read about it here.

I think TLS support will need to happen in a separate PR or later release.

@trel
Copy link
Member

trel commented Feb 20, 2024

I think TLS support will need to happen in a separate PR or later release.

That's okay - we can get it working/compiling/happy with the latest other things, and get TLS added quick as soon as someone needs it.

@korydraughn
Copy link
Contributor Author

Apparently we do have an issue for TLS. See #112

@korydraughn
Copy link
Contributor Author

After some discussion, we've decided to remove the document_type REP. The reason behind this change is because elasticsearch no longer supports mapping types.

For more information, see https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html.

@korydraughn korydraughn marked this pull request as ready for review February 21, 2024 05:01
@korydraughn
Copy link
Contributor Author

Cleaned up commits.

Running tests.

@korydraughn
Copy link
Contributor Author

All tests pass (minus the atomic avu one).

Tested using the testing environment (ES v7.4).
Also tested outside of the testing environment using containers running ES v7.17 and ES v8.12.

@korydraughn
Copy link
Contributor Author

Ran the tests again to make sure things work after that last commit.

I need to revisit the postinst script commit though.

@alanking
Copy link
Contributor

Everything seems good to me so far. Will await word on the postinst script.

@korydraughn
Copy link
Contributor Author

Perhaps removing those references to the postinst script is better since the cmake file defines the following.

list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX}${CMAKE_INSTALL_LIBDIR}/irods")
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX}${IRODS_PLUGINS_DIRECTORY}")
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX}${IRODS_PLUGINS_DIRECTORY}/rule_engines")
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX}${CMAKE_INSTALL_LOCALSTATEDIR}")
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX}${CMAKE_INSTALL_LOCALSTATEDIR}/lib")
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX}${IRODS_HOME_DIRECTORY}")
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX}${IRODS_HOME_DIRECTORY}/scripts")
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX}${IRODS_HOME_DIRECTORY}/scripts/irods")
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX}${IRODS_HOME_DIRECTORY}/scripts/irods/test")

Will run the tests for CentOS 7 and the Almalinux / Rocky Linux to verify.

@korydraughn
Copy link
Contributor Author

I've confirmed the changes pass the tests for CentOS 7.

I cannot run the tests for Almalinux 8 and Rocky Linux 9 due to docker and python pip issues. Regardless, I was able to confirm the packages produced by this PR install without issues for these platforms.

All I have to do now is assign issues and we're good to go.

@korydraughn
Copy link
Contributor Author

Issue numbers assigned.

Just need that good ole approval.

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@alanking alanking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me. Let's do it

@korydraughn
Copy link
Contributor Author

Added #'s

@alanking alanking merged commit 3f3529d into irods:main Feb 22, 2024
1 of 2 checks passed
@korydraughn korydraughn deleted the 128.m branch February 22, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants