UNOMI-947/946: Platform hygiene, graphql-ui upgrade, and IT cluster health#812
Merged
Conversation
…ealth Batch dependency and frontend upgrades for 3.1 GA: align swagger-ui feature with pom version, bump error_prone/logback/jsch, upgrade GraphiQL 5 with relative URLs, and harden IT search cluster replica enforcement.
Absorb Dependabot #804-808 security bumps (lodash, js-yaml, markdown-it, linkify-it, postcss, serialize-javascript) that the GraphiQL 5 lock refresh did not pick up automatically.
index.number_of_replicas is not a valid cluster persistent setting. Use a composable index template for new indices and _all/_settings for existing ones (migration snapshot restore path).
Split UNOMI-946 cluster prep into explicit stages: pre-Unomi baseline, post-snapshot restore, post-shell-migration, and post-Unomi health check. Apply zero-replica settings per index (ES/OS compatible) and re-enforce after migration before unomi:start.
Stream logs to the Maven console only when --search-engine-logs (or -SearchEngineLogs) is passed, while still writing them under itests/target/*0/logs/ for archives.
…llover template fixes, and IT tooling - Add OSGi-registered ValueTypeValidator/ValueTypeValidatorRegistry so ConditionContextHelper can validate resolved parameter values against their declared type at evaluation time, not just at definition time. Fix DateValueTypeValidator to accept ISO-8601/epoch-millis strings (the actual runtime shape of "date" condition parameters) instead of only pre-parsed Date/Instant/OffsetDateTime objects. - Fix OpenSearch rollover index templates to attach the ISM policy via the explicit policy_id custom setting instead of relying on ism_template pattern-matching, which never matched real index names; raise both engines' template priority above the IT catch-all template and add a create-then-verify retry loop to OpenSearch's rollover index creation, mirroring the existing ES logic. - Add RolloverIT and a per-search-engine TestTimingCache so the IT progress reporter can estimate remaining time from real historical per-test durations instead of a flat running average. - Remove the maven-build-cache-extension (workspace resolver staleness issues) and its --no-maven-cache/--purge-maven-cache flags from build.sh/build.ps1.
The index.plugins.index_state_management.policy_id custom setting was missing its "index." prefix, and even with the prefix OpenSearch accepts but doesn't act on it - ISM's own explain endpoint confirmed total_managed_indices stayed at 0. Attach the policy explicitly via the ISM Add Policy API instead, checking both the HTTP status and the response body's failure fields. RolloverIT now asserts the rollover setup is correct on both engines (index settings, ISM/ILM explain, and policy conditions) instead of waiting minutes for an actual rollover sweep - ILM/ISM's background job scheduling is the search engine's own tested behavior, not something Unomi needs to prove end-to-end on every CI run.
…fixtures propertyValueInteger was quoted as a JSON string instead of a number, and pastEventCondition blocks never set the recommended operator parameter. Both were silently tolerated by the lenient runtime evaluators but now trip the stricter condition validation added in this branch. Values are unchanged (operator defaults to eventsOccurred already), so behavior is identical - this just quiets the warnings.
The IT suite runs with rollover.maxDocs=300 shared across the whole PerSuite container, so by the time RolloverIT runs - often after hundreds of other tests have created events - context-event-000001 may have already rolled over for real. Once that happens on OpenSearch, ISM has nothing left to transition to and marks the old index's management as completed/disabled, failing a hardcoded check even though rollover worked correctly. Resolve the current write index via the alias's is_write_index flag instead, same as production code already does for session rollover indices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plain-language summary
Unomi 3.1 still shipped an old Swagger UI bundle version in Karaf while the REST module already used a newer one. The GraphQL playground also used outdated frontend libraries and hard-coded localhost URLs. Integration tests could fail on Elasticsearch because single-node clusters turned yellow when indices kept a replica count of one.
This change aligns Swagger UI with the project version, upgrades the GraphQL UI stack, bumps safe Java dependencies, and makes the IT harness enforce zero replicas on the search cluster before and after migration.
What changed
${swagger-ui.version}inunomi-rest-uiKaraf feature (5.27.1).configureSearchEngineForTesting(),fixRestoredIndexReplicas(), andassertClusterHealthy()inBaseIT; call from migration IT after snapshot restore; set ESminimalClusterState=YELLOWin IT config; teachElasticSearchHealthCheckProvideryellow tolerance like OpenSearch.error_prone_annotations2.50, logback-classic 1.2.13, router jsch 0.1.55_1 (poms + feature.xml).createRoot, webpack support for Monaco/CSS.Test plan
yarn build:productioningraphql/graphql-uimvn -pl graphql/graphql-ui,wab,kar,extensions/healthcheck -am test-compile -DskipTestsmvn -Pintegration-tests test-compileinitestsHealthCheckIT,Migrate16xToCurrentVersionIT)References
UNOMI-947, UNOMI-946