Skip to content

Refuse to publish constraints when the branch moved during generation - #75989

Merged
potiuk merged 1 commit into
mainfrom
constraints-publish-baseline-check
Oct 29, 2026
Merged

potiuk merged 1 commit into
mainfrom
constraints-publish-baseline-check

Conversation

@potiuk

@potiuk potiuk commented Oct 29, 2026

Copy link
Copy Markdown
Member

A regular constraints refresh (update-constraints-on-push.yml, and refresh-constraints.yml, which calls it) resolves its pins against the constraints-X-Y branch as it is when the run starts, then the publish job checks out the branch as it is when the run ends, commits the generated files on top and pushes. If Release constraints commits a release candidate's pins in between, the refresh overwrites them with pins resolved against the older baseline, and the push still succeeds because it is an ordinary fast-forward. The two workflows run in different concurrency groups, so nothing serialises them.

This came up in review of #75919, which made the regular generation keep the candidate pins it finds in the baseline. That only helps when the baseline it read is the one it publishes onto.

  • build-info records the commit SHA of the target constraints branch before anything is generated.
  • The publish job compares the branch it checked out against that SHA and fails if it moved, listing the commits that landed and asking for a re-run, which then starts from the current branch.

Recording the baseline before generation is conservative: any commit landing at any point during the run blocks the publish, never only part of the window. A push racing in after the check is still rejected by git push as a non-fast-forward. A branch that does not exist yet records an empty SHA, and the check is skipped.

The manual-refresh section of dev/MANUALLY_GENERATING_IMAGE_CACHE_AND_CONSTRAINTS.md says what the new failure means and what to do about it.

Checks run locally: prek pre-commit stage on the two changed files (yamllint, zizmor, markdownlint and the rest) passed, except lychee, which needs Docker and was not run. No tests read this workflow.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Opus 5 following the guidelines

🤖 Generated with Claude Code

A regular constraints refresh resolves its pins against the constraints
branch as it is when the run starts, then commits them on top of the
branch as it is when the run ends. When Release constraints commits a
release candidate's pins in between, the refresh overwrote them with
pins resolved against the older baseline, and the push still succeeded
because it was an ordinary fast-forward.

The two workflows run in different concurrency groups, so nothing
serialised them. The publish now fails instead and asks for a re-run,
which then starts from the candidate's constraints.

Generated-by: Claude Opus 5
@shahar1
shahar1 enabled auto-merge (squash) October 29, 2026 18:24
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ 5 job(s) of attempt 1 were stopped because AWS reclaimed their EC2 Spot instances. These are not test failures.

RunsOn re-runs them automatically when the run finishes; no action is needed.

@potiuk
potiuk disabled auto-merge October 29, 2026 18:44
@potiuk
potiuk enabled auto-merge (squash) October 29, 2026 18:44
@potiuk
potiuk disabled auto-merge October 29, 2026 18:44
@potiuk
potiuk merged commit 92bbf67 into main Oct 29, 2026
160 of 185 checks passed
@potiuk
potiuk deleted the constraints-publish-baseline-check branch October 29, 2026 18:45
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ v3-4-test PR Link

vatsrahul1001 pushed a commit that referenced this pull request Oct 29, 2026
…g generation (#75989)

A regular constraints refresh resolves its pins against the constraints
branch as it is when the run starts, then commits them on top of the
branch as it is when the run ends. When Release constraints commits a
release candidate's pins in between, the refresh overwrote them with
pins resolved against the older baseline, and the push still succeeded
because it was an ordinary fast-forward.

The two workflows run in different concurrency groups, so nothing
serialised them. The publish now fails instead and asks for a re-run,
which then starts from the candidate's constraints.
(cherry picked from commit 92bbf67)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Generated-by: Claude Opus 5
github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Oct 29, 2026
…g generation (apache#75989)

A regular constraints refresh resolves its pins against the constraints
branch as it is when the run starts, then commits them on top of the
branch as it is when the run ends. When Release constraints commits a
release candidate's pins in between, the refresh overwrote them with
pins resolved against the older baseline, and the push still succeeded
because it was an ordinary fast-forward.

The two workflows run in different concurrency groups, so nothing
serialised them. The publish now fails instead and asks for a re-run,
which then starts from the candidate's constraints.
(cherry picked from commit 92bbf67)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Generated-by: Claude Opus 5
vatsrahul1001 pushed a commit that referenced this pull request Oct 30, 2026
…g generation (#75989) (#75990)

A regular constraints refresh resolves its pins against the constraints
branch as it is when the run starts, then commits them on top of the
branch as it is when the run ends. When Release constraints commits a
release candidate's pins in between, the refresh overwrote them with
pins resolved against the older baseline, and the push still succeeded
because it was an ordinary fast-forward.

The two workflows run in different concurrency groups, so nothing
serialised them. The publish now fails instead and asks for a re-run,
which then starts from the candidate's constraints.
(cherry picked from commit 92bbf67)


Generated-by: Claude Opus 5

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants