feat(ci): run integration suites under an ES→OS migration phase (#36320)#36500
Open
fabrizzio-dotCMS wants to merge 7 commits into
Open
feat(ci): run integration suites under an ES→OS migration phase (#36320)#36500fabrizzio-dotCMS wants to merge 7 commits into
fabrizzio-dotCMS wants to merge 7 commits into
Conversation
Enable running the full integration battery under a chosen ES→OS migration phase, both locally and in CI. The opensearch-phase-suite Maven profile already exists (two clusters + DOT_FEATURE_FLAG_OPEN_SEARCH_PHASE); this wires it into the day-to-day tooling. - justfile: new `test-integration-phase-all <N>` iterates the MainSuite/Junit5 suites one at a time (forkCount=1) under a phase, yielding attributable per-suite pass/fail for triage; document that `test-integration-phase <N>` (no test) already runs the full battery in a single JVM. - cicd_comp_test-phase.yml: new `opensearch_phase` input; setup-matrix appends `-Dopensearch.phase=<N>` to integration MainSuite/Junit5 entries only (never the OpenSearch Upgrade Suite, which already drives OS). Passed via env to the github-script to avoid injection. Empty/'0' = off; only 1/2/3 activate. - cicd_1-pr.yml: derive the phase from a `PR: opensearch phase <N>` label so a PR can run the whole suite under a phase on demand. - cicd_4-nightly.yml: workflow_dispatch `opensearch_phase` choice input; phase 1/2/3 skips deployment (test-only run). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 tasks
Contributor
|
Claude finished @fabrizzio-dotCMS's task in 1m 51s —— View job Code Review — phased integration suite (CI/tooling only)I reviewed the diff against New Issues
Notes (non-blocking, verified correct)
No blocking issues. The Medium item is a documentation/behavior mismatch that only bites if a future caller uses the comma-list form. |
…tion-phase-per-suite The recipe sweeps every integration suite one at a time under a single phase; "-all" wrongly implied it ran all phases. "-per-suite" names what it does: the per-suite split is the axis, not the phase. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Align the integration-battery phase trigger with the repo's OpenSearch label family (the area label was renamed OpenSearch-Migration -> OpenSearch). The labels OpenSearch:Phase-1/2/3 now exist in the repo; the workflow reads them instead of the old "PR: opensearch phase <N>" strings. No behavior change: no label -> phase 0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extend the phased-run capability from a single phase to a multi-phase sweep,
driven from the nightly workflow_dispatch dropdown.
- test-phase matrix generator: opensearch_phase now accepts a single phase
('2'), a comma list ('1,2,3') or the alias 'all'. Each phaseable integration
entry (MainSuite/Junit5, never the OpenSearch Upgrade Suite) is fanned out
once per phase, with name/stage_name suffixed so job labels and the resulting
build-reports-<stage_name> artifacts stay unique. Empty/'none'/'0' -> no
fan-out (phase-0 behavior byte-for-byte unchanged).
- test-phase fail-fast is now conditional: kept true for normal runs, false for
a phased sweep (1/2/3/all) so every suite/phase runs to completion and
failures are attributable per phase.
- nightly: opensearch_phase dropdown default is now 'none' (clearer than '0'),
with an 'all' option to sweep 1,2,3 on demand. Deploy is skipped for any
active phase value (1/2/3/all) — test-only runs never deploy.
Simulated against the real test-matrix.yml: none/''/0 -> 7 entries/0 phased;
'2' -> 6 phased + upgrade untouched; all -> 18 phased + upgrade, all 19
stage_names unique (no artifact collision).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Weekly workflow (Sun 06:00 UTC) that runs the integration battery under every ES→OS migration phase automatically — the automated counterpart to the opt-in "OpenSearch:Phase-<N>" PR label and the manual nightly dropdown. - Reuses cicd_comp_test-phase.yml with opensearch_phase=all -> 6 suites × 3 phases = 18 phased jobs (fail-fast off, per-phase attribution), Upgrade Suite untouched. Only the integration test type is enabled (others don't vary by phase). workflow_dispatch lets you pick a single phase or 'all'. - Deliberately NO deploy / NO CLI build: a build exercised under a non-default migration phase must never be promoted. Cadence is off-peak and clear of the 03:18 daily nightly. - Scheduled triggers only fire from the default branch, so this stays dormant until merged to main. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Prevent two phase sweeps (the weekly schedule + a manual dispatch) from running in parallel and doubling runner load. cancel-in-progress: false lets the running sweep finish and queues the new one, since each sweep is expensive and its result matters. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Proposed Changes
Makes it possible to run the full integration battery under a chosen ES→OS migration phase — on a single phase or swept across all three — locally, per-PR, on-demand, and automatically on a schedule. Contributes to #36320 ("Make it possible to run MainSuite Tests in all 3 phases").
The
opensearch-phase-suiteMaven profile already existed (two clusters ES @9207 + OS 3.x @9201, setsDOT_FEATURE_FLAG_OPEN_SEARCH_PHASE, inherits the base suite includes). This PR wires that capability into every layer of the tooling. It does not change any product code, and default (phase 0) behavior is untouched everywhere.Four ways to run a phased battery
just test-integration-phase <N>/test-integration-phase-per-suite <N>OpenSearch:Phase-<N>workflow_dispatch→opensearch_phasedropdown (none/1/2/3/all)Local (
justfile)test-integration-phase <N> [TEST]— full battery in a single JVM (one docker bring-up), or a narrowed run with a test arg.test-integration-phase-per-suite <N>— iterates the MainSuite/Junit5 suites one at a time (forkCount=1) under phase<N>, giving attributable per-suite pass/fail plus a summary (non-zero exit if any suite fails). This is the local triage tool for de-ES-ifying the ITs. (renamed fromtest-integration-phase-all— the sweep is per-suite, not per-phase.)CI — shared engine (
cicd_comp_test-phase.yml)opensearch_phaseinput now accepts a single phase (2), a comma list (1,2,3), or the aliasall(= 1,2,3).-Dopensearch.phase=<N>and suffixingname/stage_nameper phase so job labels and the resultingbuild-reports-<stage_name>artifacts stay unique. The OpenSearch Upgrade Suite is never phased (it already drives OS via-Dopensearch.upgrade.test; combining the two profiles would collide their endpoint config).fail-fastis now conditional: kepttruefor normal runs,falsefor a phased sweep so every suite/phase runs to completion and failures are attributable per phase.none/0yields an empty phase list → the matrix is byte-for-byte identical to today. Verified against the other callers that don't opt in (cicd_2-merge-queue,cicd_3-trunk,cicd_5-lts).CI — per-PR (
cicd_1-pr.yml)OpenSearch:Phase-<N>label runs the integration battery under that phase (mirrors the existingPR: docker imagelabel pattern). No label → phase 0 (current behavior). (The label family was aligned with the repo'sOpenSearcharea label — see Repo labels below.)CI — on-demand (
cicd_4-nightly.yml)workflow_dispatchopensearch_phasedropdown: defaultnone(clearer than0), optionsnone/1/2/3/all.1/2/3/all) skips the deployment job — a build exercised under a non-default migration phase is never promoted. The scheduled nightly (03:18) is unaffected: it runs withnone.CI — automatic (
cicd_scheduled_opensearch-phase-sweep.yml, new)initialize → build → test → finalize → report. No deploy, no CLI build. Only theintegrationtest type is enabled (other suites don't vary by phase).workflow_dispatchalso allows picking a single phase.concurrencygroup (cancel-in-progress: false): only one sweep runs at a time — a manual dispatch fired while the weekly run is going is queued rather than run in parallel (a sweep is expensive and its result matters).main.Repo labels (created out-of-band)
OpenSearch-Migration→OpenSearch(assignments preserved; nothing references it in code).OpenSearch:Phase-1/-2/-3used by the per-PR trigger.Checklist
test-matrix.yml:none/''/0→ 7 entries / 0 phased (unchanged);2→ 6 phased + upgrade untouched;all→ 18 phased + upgrade, all 19stage_names unique (no artifact collision).opensearch_phase(merge-queue, trunk, lts).just test-integration-phase 1 ContentletIndexAPIImplTestbrings up both clusters, bootstraps OS underPHASE_1_DUAL_WRITE_ES_READS, and runs the suite.Notes for reviewers
OpenSearch:Phase-<N>labels already exist in the repo (created alongside this PR) so the per-PR trigger is selectable.cicd_comp_test-phase.yml, whose change is a verified no-op when the phase is off. The material cost is ~19 long integration jobs once a week, off-peak Sunday (no cron collision with the pentest/rolling-tags/nightly schedules).Related: #36320, PR #36268 / #36266 (added the
opensearch-phase-suiteprofile).