Skip to content

Serialise the workflows that publish shared state - #75996

Merged
potiuk merged 1 commit into
mainfrom
workflow-concurrency-groups
Oct 30, 2026
Merged

potiuk merged 1 commit into
mainfrom
workflow-concurrency-groups

Conversation

@potiuk

@potiuk potiuk commented Oct 29, 2026

Copy link
Copy Markdown
Member

Several workflows read, modify and write back state that other runs share. When two of them overlap, one run's result is silently lost.

  • Provider registry. An incremental registry build downloads the bucket's providers.json and modules.json, merges in its own providers and syncs the files back. Docs publishes trigger it, release managers fire subset and fix-up publishes, and the backfill writes to the same bucket. Two overlapping runs drop whichever one finished first from the index. The registry publish job and the backfill's publish-versions job now share registry-publish-<destination>. The group is set on the job because registry-build.yml is also called from publish-docs-to-s3.yml.
  • Docs publishes. Provider docs and Airflow docs land in different paths, so their syncs keep running side by side, with one group per bucket and kind (publish-docs-<destination>-<providers|airflow>). manifest/packages-metadata.json is different: it is rebuilt from a scan of the whole bucket, so both kinds share it. Rebuilding it now runs in a separate job, update-packages-metadata, with one group per bucket. That job runs only when the sync step succeeded, so a schema-publish failure after a complete sync still updates the metadata, and a partial sync is never advertised. The new publish-docs-to-s3 flags --skip-packages-metadata and --packages-metadata-only make this split possible.
  • Constraints. release-constraints.yml, update-constraints-on-push.yml and update-constraints-on-push-stable.yml push to the same constraints-X-Y branch. Their publish jobs now share constraints-publish-<branch>, so a release tag push and a refresh no longer race into a non-fast-forward. The stable workflow runs from the v*-stable branches, so it takes effect there only after a backport.
  • Docker Hub release. The group was the bare version string, so any other workflow that used a version as its group would collide with it. It now has a release-dockerhub-image- prefix.

All new groups use cancel-in-progress: false.

Known limitations

  • GitHub keeps only one pending run per group. A third run arriving while one is running and one is waiting cancels the waiting one. That run shows as cancelled and has to be re-run, which is still better than the silent loss it replaces. The metadata job does not have this problem, because the surviving run rescans the whole bucket.
  • A mixed docs publish is grouped as airflow. For example, include-docs set to all or to apache-airflow amazon gets the airflow group, but it also writes provider paths. Such a run can still overlap a provider-only publish of the same provider. Covering this would mean splitting the publish into separately grouped provider and non-provider jobs. Mixed publishes are rare manual runs, so this PR does not do that.

Checks run

  • uv run --project dev/breeze pytest dev/breeze/tests/test_publish_docs_to_s3.py dev/breeze/tests/test_release_management_commands.py -k publish_docs_to_s3: passed. The new tests cover skipping the metadata during a sync, the metadata-only mode, and option validation.
  • breeze setup regenerate-command-images --check-only and breeze setup check-all-params-in-groups: passed.
  • prek run --from-ref main --stage pre-commit: passed.

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

Generated-by: Claude Code (Opus 5) following the guidelines


🤖 Generated with Claude Code

An incremental registry build downloads the bucket's providers.json and
modules.json, merges its own providers in and syncs them back. Docs
publishes call it, release managers fire subset and fix-up publishes,
and the backfill writes the same bucket, so two of them overlapping
silently drop whichever finished first from the registry index.

Docs publishes to one bucket and the two constraints publishers had the
same exposure in smaller form. Provider and Airflow docs land in
different paths, so those two kinds of docs sync keep running side by
side. The packages-metadata.json they both rewrite from a scan of the
whole bucket moves to its own job, serialised per bucket, using new
--skip-packages-metadata and --packages-metadata-only flags of
publish-docs-to-s3. The Docker Hub release grouped on the bare version
string, which any other workflow using a version as its group would
collide with.

Generated-by: Claude Opus 5
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

The re-run of the jobs stopped by EC2 Spot interruptions finished: attempt 4 failed.

@shahar1 shahar1 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.

Some jobs fail

@potiuk

potiuk commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Some jobs fail

Indeed - it looks like a bug in a hardened image configuration - from what I saw, while they are reacting quickly to realeas security fixes, there are some cases (it already happened once) where some hardened packages conflict with regular packages from debian. I will take a close look.

@potiuk

potiuk commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Fix is coming.

@potiuk

potiuk commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

In a separate PR.

@potiuk
potiuk merged commit c6a077b into main Oct 30, 2026
510 of 531 checks passed
@potiuk
potiuk deleted the workflow-concurrency-groups branch October 30, 2026 09:16
@potiuk potiuk added the backport-to-v3-4-test Backport to v3-4-test label Oct 30, 2026
@github-actions github-actions Bot added this to the Airflow 3.4.1 milestone Oct 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.4.1 based on: backport label targeting v3-4-test
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

@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

potiuk added a commit that referenced this pull request Oct 30, 2026
An incremental registry build downloads the bucket's providers.json and
modules.json, merges its own providers in and syncs them back. Docs
publishes call it, release managers fire subset and fix-up publishes,
and the backfill writes the same bucket, so two of them overlapping
silently drop whichever finished first from the registry index.

Docs publishes to one bucket and the two constraints publishers had the
same exposure in smaller form. Provider and Airflow docs land in
different paths, so those two kinds of docs sync keep running side by
side. The packages-metadata.json they both rewrite from a scan of the
whole bucket moves to its own job, serialised per bucket, using new
--skip-packages-metadata and --packages-metadata-only flags of
publish-docs-to-s3. The Docker Hub release grouped on the bare version
string, which any other workflow using a version as its group would
collide with.
(cherry picked from commit c6a077b)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Generated-by: Claude Opus 5
potiuk added a commit that referenced this pull request Oct 30, 2026
#76022)

An incremental registry build downloads the bucket's providers.json and
modules.json, merges its own providers in and syncs them back. Docs
publishes call it, release managers fire subset and fix-up publishes,
and the backfill writes the same bucket, so two of them overlapping
silently drop whichever finished first from the registry index.

Docs publishes to one bucket and the two constraints publishers had the
same exposure in smaller form. Provider and Airflow docs land in
different paths, so those two kinds of docs sync keep running side by
side. The packages-metadata.json they both rewrite from a scan of the
whole bucket moves to its own job, serialised per bucket, using new
--skip-packages-metadata and --packages-metadata-only flags of
publish-docs-to-s3. The Docker Hub release grouped on the bare version
string, which any other workflow using a version as its group would
collide with.
(cherry picked from commit c6a077b)


Generated-by: Claude Opus 5

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
vatsrahul1001 pushed a commit that referenced this pull request Oct 30, 2026
#76022)

An incremental registry build downloads the bucket's providers.json and
modules.json, merges its own providers in and syncs them back. Docs
publishes call it, release managers fire subset and fix-up publishes,
and the backfill writes the same bucket, so two of them overlapping
silently drop whichever finished first from the registry index.

Docs publishes to one bucket and the two constraints publishers had the
same exposure in smaller form. Provider and Airflow docs land in
different paths, so those two kinds of docs sync keep running side by
side. The packages-metadata.json they both rewrite from a scan of the
whole bucket moves to its own job, serialised per bucket, using new
--skip-packages-metadata and --packages-metadata-only flags of
publish-docs-to-s3. The Docker Hub release grouped on the bare version
string, which any other workflow using a version as its group would
collide with.
(cherry picked from commit c6a077b)


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

backport-to-v3-4-test Backport to v3-4-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants