Repository navigation
Conversation
fat-catTW
requested review from
XD-DENG,
amoghrajesh,
ashb,
bbovenzi,
bugraoz93,
choo121600,
dheerajturaga,
ephraimbuddy,
gopidesupavan,
guan404ming,
henry3260,
jason810496,
jedcunningham,
jscheffl,
pierrejeambrun,
potiuk,
rawwar,
ryanahamilton,
shubhamraj-git,
vatsrahul1001 and
vincbeck
as code owners
September 8, 2026 14:50
This was referenced Sep 25, 2026
fat-catTW
force-pushed
the
add-dag-bundle-refresh-api
branch
from
October 1, 2026 13:10
6d25cee to
5a69311
Compare
Contributor
Author
|
I have updated the implementation to reuse The updated flow is:
With multiple Dag processors, only one processor claims the request. For versioned bundles, other processors detect the updated database version and refresh through the existing mechanism. For non-versioned bundles, they cannot detect the update through a version change and will refresh at their normal interval. This PR preserves the existing non-versioned behavior. Please let me know if this API should instead trigger an immediate refresh on every Dag processor. |
fat-catTW
marked this pull request as ready for review
October 1, 2026 13:28
fat-catTW
force-pushed
the
add-dag-bundle-refresh-api
branch
from
October 2, 2026 01:24
5a69311 to
eea30f8
Compare
fat-catTW
force-pushed
the
add-dag-bundle-refresh-api
branch
from
October 11, 2026 13:09
626d511 to
709ca41
Compare
SQLite enforces foreign keys while Alembic rebuilds parent tables during column changes. Disable those checks around the Dag bundle batch operation so upgrades and downgrades complete safely.
This keeps bundle refresh signaling aligned with the existing Dag parsing request lifecycle and avoids a second coordination mechanism.
fat-catTW
force-pushed
the
add-dag-bundle-refresh-api
branch
from
October 16, 2026 06:41
06154f8 to
05b81ee
Compare
This branch has not been deployed
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.
Why
Dag bundle updates currently depend on the configured refresh interval or a Dag processor restart. This can delay the discovery of newly deployed Dags and makes deployment automation less predictable.
In deployments with multiple Dag processors, a refresh request must reach every processor. An ephemeral or single-consumer signal could refresh only one processor while others continue using stale local bundle contents.
closes: #60616
Solution
Add an asynchronous REST endpoint for requesting a Dag bundle refresh:
POST /api/v2/dagBundles/{bundle_name}/refreshEach request atomically increments a persistent refresh generation on the bundle. Every Dag processor tracks the latest generation it has processed and refreshes the bundle when its local value differs from the persisted generation. This allows every processor to observe the request independently.
The endpoint returns
202 Acceptedonce the request is persisted. It does not guarantee that bundle discovery or Dag parsing has completed. Multiple requests may be coalesced when a processor observes the latest generation.Refresh requests require Dag edit authorization. Team-owned bundles use the owning team's scope, while global bundles require global Dag edit access. Audit events for team-owned bundle refreshes are attributed to that team.
The OpenAPI specification, generated clients, migration metadata, and API permission documentation are kept in sync. The generated TypeScript client changes do not add or alter any visible UI.
Testing
observing the same generation.
Was generative AI tooling used to co-author this PR?
[X]Yes (please specify the tool below)Generated-by: [Codex] following the guidelines
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.