-
Notifications
You must be signed in to change notification settings - Fork 135
[UNOMI-828] Support for OpenSearch persistence #715
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
Conversation
…o be able to fix problems with deployments
…king, work on automated tests is still in progress.
# Conflicts: # graphql/graphql-playground/yarn.lock # itests/src/test/java/org/apache/unomi/itests/BaseIT.java # manual/src/main/asciidoc/graphql.adoc # persistence-elasticsearch/core/src/test/java/org/apache/unomi/persistence/elasticsearch/ElasticsearchPersistenceTest.java # persistence-spi/src/main/java/org/apache/unomi/persistence/spi/conditions/ConditionContextHelper.java # persistence-spi/src/main/java/org/apache/unomi/persistence/spi/conditions/ConditionEvaluatorDispatcherImpl.java # tools/shell-commands/src/main/java/org/apache/unomi/shell/services/internal/UnomiManagementServiceImpl.java
- Changed Unomi startup to use features instead of bundles - Added new build script that integrates all the functionality of the other build scripts - Fix IPv6 address parsing - Merge latest changes from master branch -
- Add option to new build script to be able to use opensearch with integration tests
- Replace hardcoded past event ES query builder in pasteventconditionbuilder to use a generic interface - Replace GeoDistance and DistanceUnit used directly from ElasticSearch with clean-room implementation that are validated through unit tests. Also added unit tests on the ElasticSearch implementation to be able to test any differences - Also added clean-room implementation of the DateMathParser so that it can be used with ElasticSearch or OpenSearch - Modified Unomi startup mechanism to use features instead of bundles. Unfortunately due to complex interdependencies between bundles the features could not be split as wanted, so there is some duplication in the list of bundles. - Removed last of inter-dependencies in the base plugin and the persistence-spi to try to resolve bundle inter-dependencies but that wasn't enough. - ElasticSearch integration tests are now execute without any errors !
- Removed elasticsearch-core from bundle watch requirements - Fix issues with date parsing due to case sensitivity - Improved test units for date parsing and date math handling - Modified HealthChecks to provide an OpenSearch check provider (not yet fully working) - Deactivate 1.x to 2.x migration integration test for OpenSearch (No OpenSearch users will be coming from 1.x) - Update OpenSearch past event query builder to latest changes done in ElasticSearch past event query builder - Various fixes in the integration tests to make them compatible with OpenSearch (removed hardcoded elasticsearch configuration and references) - Added new shell script in itests directory to make it easier to handle the dynamically generated Pax Exam Karaf test container directory. Documentation is also included in the README file inside the itests directory.
- Removed elasticsearch-core from bundle watch requirements - Fix issues with date parsing due to case sensitivity - Improved test units for date parsing and date math handling - Modified HealthChecks to provide an OpenSearch check provider (not yet fully working) - Deactivate 1.x to 2.x migration integration test for OpenSearch (No OpenSearch users will be coming from 1.x) - Update OpenSearch past event query builder to latest changes done in ElasticSearch past event query builder - Various fixes in the integration tests to make them compatible with OpenSearch (removed hardcoded elasticsearch configuration and references) - Added new shell script in itests directory to make it easier to handle the dynamically generated Pax Exam Karaf test container directory. Documentation is also included in the README file inside the itests directory.
…ess status in the integration tests - Make sure the Unomi Management Service is started in IT tests before starting the unomi:start command - Add support for minimal cluster state to allow to start an OpenSearch cluster with yellow status in IT tests - Fix OpenSearch configuration prefix - Modify HealthCheck providers to only be available depending on the availability of the persistence implementation. - Fix integration tests to work properly with OpenSearch. - Fix OpenSearch persistence initial startup - Restructure startFeatures configuration to use arrays instead of complex parsing - Modify OpenSearch custom object mapping to serialize map entries that have null values (which is the default for the ElasticSearch implementation). -
…ess status in the integration tests - Make sure the Unomi Management Service is started in IT tests before starting the unomi:start command - Add support for minimal cluster state to allow to start an OpenSearch cluster with yellow status in IT tests - Fix OpenSearch configuration prefix - Modify HealthCheck providers to only be available depending on the availability of the persistence implementation. - Fix integration tests to work properly with OpenSearch. - Fix OpenSearch persistence initial startup - Restructure startFeatures configuration to use arrays instead of complex parsing - Modify OpenSearch custom object mapping to serialize map entries that have null values (which is the default for the ElasticSearch implementation). - Make sure the OpenSearch docker container used for the IT tests is replaced when tests are restarted. - Fix the handling of the OffsetDateTime in the OpenSearch Property condition query builder - Fix the rule service IT to generate rules with proper conditions and actions
…sts output to be CSV compatible - Added a known issue in the itests README to reference the log issue on OpenSearch 2.18.
- Add docker compose support for OpenSearch - Fix startup issues with updates to UnomiManagementService - Documentation updates to add OpenSearch information (still to be completed)
…r both OpenSearch and ElasticSearch - Update Health check README to explain how it now works with both ElasticSearch and OpenSearch engines
- Add docker compose support for OpenSearch - Fix startup issues with updates to UnomiManagementService - Documentation updates to add OpenSearch information (still to be completed)
# Conflicts: # itests/src/test/java/org/apache/unomi/itests/migration/Migrate16xTo220IT.java
…tween the ElasticSearch and OpenSearch integration tests - Add documentation on how to migrate from ElasticSearch to OpenSearch (not tested yet)
…arch in configuration documentation
…remove auto-start option
…parison, aligning with analyzer configuration behavior
…tion files and update related test cases. Rename test method for clarity and adjust logging messages to reflect changes in index template creation.
…viceImpl to use logging instead of printStackTrace. Update exception messages in IdsConditionESQueryBuilder and IdsConditionOSQueryBuilder to include maximum IDs query count for better clarity. Other general naming cleanup.
…stener in a separate PR
…cSearch - Remove hover event query builder that is replaced with a condition definition with a parent condition - Add a JSON schema for the hover event type - Add missing JavaDocs
… for improved documentation
- Added missing Javadoc comments - Minor whitespace cleanups
…h integration test instructions in documentation
…in Elasticsearch and OpenSearch. Add integration tests for legacy query builder functionality, including new condition definitions and JSON files for legacy conditions. Update documentation to reflect changes in query builder ID conventions and migration steps from previous versions.
…rDispatcher to utilize ConditionQueryBuilderDispatcherSupport for legacy ID resolution and contextualization. Remove hardcoded legacy ID mappings and improve documentation regarding legacy query builder handling.
|
Changes since February on OpenSearch contribution
All the tests are green on GitHub, and the code is ready for review (again)! |
|
Following the release I need to update the version numbers, I'll do this asap. |
|
Ok checks are passing again |
...ache/unomi/persistence/spi/conditions/dispatcher/ConditionQueryBuilderDispatcherSupport.java
Outdated
Show resolved
Hide resolved
...ache/unomi/persistence/spi/conditions/dispatcher/ConditionQueryBuilderDispatcherSupport.java
Outdated
Show resolved
Hide resolved
...ache/unomi/persistence/spi/conditions/dispatcher/ConditionQueryBuilderDispatcherSupport.java
Outdated
Show resolved
Hide resolved
...ache/unomi/persistence/spi/conditions/dispatcher/ConditionQueryBuilderDispatcherSupport.java
Outdated
Show resolved
Hide resolved
.../org/apache/unomi/persistence/spi/conditions/dispatcher/ConditionQueryBuilderDispatcher.java
Show resolved
Hide resolved
...ache/unomi/persistence/spi/conditions/dispatcher/ConditionQueryBuilderDispatcherSupport.java
Outdated
Show resolved
Hide resolved
…ss. Update legacy query builder references to use the new centralized mapping and logging mechanism. This change enhances code maintainability and prepares for future improvements.
Dear Apache Unomi developers and users,
After 8 months of development, and while I'm at it to start 2025 on a high note, I am proud to share with you and submit for review my contribution on the support of OpenSearch as an alternative to ElasticSearch for Apache Unomi.
A lot of work has gone into this contribution, and I can fully understand that some of you will have questions. I propose to organize a meeting to go over the changes and also to answer any questions you might have.
LIVE DEMONSTRATION ANNOUNCEMENT
I'm pleased to invite you to a live presentation and demonstration of the OpenSearch integration and new development tools.
Date: January 13th, 2025
Time: 17:00 CET
Format: Online presentation with live demonstration
Link: https://calendar.app.google/7ZffzAgwPwhamAAU6
Agenda:
OPENSEARCH CONTRIBUTION RATIONALE
WHERE TO FIND IT
——————————
https://github.com/apache/unomi/tree/opensearch-persistence
WHAT’S INCLUDED
—————————
WHAT IS NOT INCLUDED
————————————
DETAILED CHANGES SUMMARY
I'd like to summarize the significant improvements and changes implemented in the opensearch-persistence branch. This work represents a major enhancement to Apache Unomi's persistence layer and development tooling.
Key Features and Improvements:
Testing and CI/CD Improvements
Architecture and Configuration
Command Line Interface Improvements
Code Quality and Maintenance
Test Performance Insights:
The slowest test analysis reveals areas for potential optimization, with some tests taking up to 100 seconds to complete. This information will be valuable for future performance improvements. Also a intermediate progress report is now printed indicating how many tests have succeeded or failed, as well as a time estimation until they are completed and a progress bar.
Next Steps:
The changes represent a significant step forward in making Apache Unomi more flexible and maintainable, while providing developers with better tools for development and debugging.
Please following this checklist to help us incorporate your contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
[UNOMI-XXX] - Title of the pull requestsignificant new parts of code.
Copy the description to the related JIRA issue
mvn clean install -P integration-teststo make sure basic checks pass. A more thorough check will beperformed on your pull request automatically.
Trivial changes like typos do not require a JIRA issue (javadoc, project build changes, small doc changes, comments...).
If this is your first contribution, you have to read the Contribution Guidelines
If your pull request is about ~20 lines of code you don't need to sign an Individual Contributor License Agreement
if you are unsure please ask on the developers list.
To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.