Skip to content

test(release): isolate parallel gate fixtures from PC_UPGRADE_SOURCE_SHA - #2256

Merged
hidb4ai merged 1 commit into
oceanbase:masterfrom
Fengzdadi:test/upgrade-gate-source-sha-env
Oct 27, 2026
Merged

hidb4ai merged 1 commit into
oceanbase:masterfrom
Fengzdadi:test/upgrade-gate-source-sha-env

Conversation

@Fengzdadi

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

No issue was filed. This fixes a CI failure introduced by #2248: since bad4c0c, upgrade-acceptance / Prepare upgrade artifacts and matrix fails on master and on pull requests, and Upgrade release gate fails after it.

Rationale for this change

#2248 made scripts/parallel_upgrade_release_gate.py identify the checkout by PC_UPGRADE_SOURCE_SHA, falling back to GITHUB_SHA. .github/workflows/upgrade-release.yml exports PC_UPGRADE_SOURCE_SHA at workflow level, so the variable is set in the step that runs the release gate tests.

test_parallel_workers_reject_changed_preparation_inputs[checkout] models a worker on another checkout by changing only GITHUB_SHA. While PC_UPGRADE_SOURCE_SHA is set, the identity the gate reads does not change, so the case fails with DID NOT RAISE GateError.

Only that job fails because only the upgrade workflow sets the variable. Locally and in the tests (3.12, unit) job it is unset, the gate falls back to GITHUB_SHA, and the case passes. The gate behaves as #2248 intends; the test depended on the environment of the job that ran it.

What changes are included in this PR?

  • The parallel_reports fixture unsets PC_UPGRADE_SOURCE_SHA before preparing, so the parallel gate tests model an unpinned checkout in every environment. The checkout case still changes GITHUB_SHA, which is now the identity the gate reads wherever the test runs, so the GITHUB_SHA fallback stays covered.
  • The pinned path stays covered by test_manual_release_evidence_tracks_target_checkout_not_workflow_commit from ci(release): allow explicit publication without upgrade acceptance #2248, which sets both variables explicitly.
  • The gate script and workflows are unchanged.

Are there any user-facing changes?

No. This changes one test fixture.

How was this change tested?

  • Reproduced the failure on unmodified master with GITHUB_SHA and PC_UPGRADE_SOURCE_SHA set to the same commit, as in a push or pull request run: uv run pytest -q tests/test_upgrade_release_gate.py -k test_parallel_workers_reject_changed_preparation_inputs fails the checkout case.
  • With this change, the three cases pass with neither variable set, with both set to the same commit, with PC_UPGRADE_SOURCE_SHA set to a different commit than GITHUB_SHA (a pinned source_ref), and with only PC_UPGRADE_SOURCE_SHA set.
  • Mutations of scripts/parallel_upgrade_release_gate.py, reverted afterwards:
    • without the source SHA comparison, the checkout case fails with and without PC_UPGRADE_SOURCE_SHA set;
    • without the GITHUB_SHA fallback, the checkout case fails;
    • when the gate ignores PC_UPGRADE_SOURCE_SHA, test_manual_release_evidence_tracks_target_checkout_not_workflow_commit fails.
  • uv run pytest -q tests/test_upgrade_release_gate.py tests/test_upgrade_publication.py tests/test_upgrade_schema_equivalence.py, the files the job runs, passes with and without the variables set. On macOS, 6 supervisor tests skip because they need Linux subreaper support.
  • make check
  • I did not run the upgrade workflow itself. The Prepare upgrade artifacts and matrix job on this PR is the direct check.

AI usage statement

Claude Code (Claude Opus 5.5) was used to diagnose the failure from the CI logs, write the change, run the checks above, and draft this description. I reviewed the change.

Since oceanbase#2248 the parallel upgrade gate identifies the checkout by
PC_UPGRADE_SOURCE_SHA and falls back to GITHUB_SHA, and
upgrade-release.yml exports PC_UPGRADE_SOURCE_SHA to every step. The
checkout case of test_parallel_workers_reject_changed_preparation_inputs
changes only GITHUB_SHA, so inside the upgrade acceptance job the
identity the gate reads stays the same and no GateError is raised.
Locally and in the unit test job the variable is unset, the gate falls
back to GITHUB_SHA, and the case passes.

The parallel_reports fixture now unsets the variable, so these tests
model an unpinned checkout in any environment and keep covering the
GITHUB_SHA fallback. The pinned path stays covered by
test_manual_release_evidence_tracks_target_checkout_not_workflow_commit,
which sets both variables.
@Fengzdadi
Fengzdadi requested a review from PsiACE as a code owner October 26, 2026 20:25
Copilot AI balanced review requested due to automatic review settings October 26, 2026 20:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@AlexStocks AlexStocks added the 1.5.0 v1.5.0 release tracking label Oct 27, 2026

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@hidb4ai
hidb4ai merged commit 8893b02 into oceanbase:master Oct 27, 2026
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.5.0 v1.5.0 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants