Skip to content

UNOMI-947/946: Platform hygiene, graphql-ui upgrade, and IT cluster health#812

Merged
sergehuber merged 9 commits into
masterfrom
UNOMI-875-pr7-platform-hygiene
Jul 11, 2026
Merged

UNOMI-947/946: Platform hygiene, graphql-ui upgrade, and IT cluster health#812
sergehuber merged 9 commits into
masterfrom
UNOMI-875-pr7-platform-hygiene

Conversation

@sergehuber

Copy link
Copy Markdown
Contributor

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

  • UNOMI-947: Use ${swagger-ui.version} in unomi-rest-ui Karaf feature (5.27.1).
  • UNOMI-946: Add configureSearchEngineForTesting(), fixRestoredIndexReplicas(), and assertClusterHealthy() in BaseIT; call from migration IT after snapshot restore; set ES minimalClusterState=YELLOW in IT config; teach ElasticSearchHealthCheckProvider yellow tolerance like OpenSearch.
  • Bump error_prone_annotations 2.50, logback-classic 1.2.13, router jsch 0.1.55_1 (poms + feature.xml).
  • Upgrade graphql-ui to GraphiQL 5.x, relative HTTP/WS URLs, React 18 createRoot, webpack support for Monaco/CSS.

Test plan

  • yarn build:production in graphql/graphql-ui
  • mvn -pl graphql/graphql-ui,wab,kar,extensions/healthcheck -am test-compile -DskipTests
  • mvn -Pintegration-tests test-compile in itests
  • CI integration tests (ES + OS matrix, HealthCheckIT, Migrate16xToCurrentVersionIT)

References

UNOMI-947, UNOMI-946

…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.
@sergehuber sergehuber merged commit 153833a into master Jul 11, 2026
7 checks passed
@sergehuber sergehuber deleted the UNOMI-875-pr7-platform-hygiene branch July 11, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant