Repository navigation
Fix sync-perm applying permissions from every stored Dag version - #74360
Open
Eason09053360 wants to merge 2 commits into
Open
Eason09053360 wants to merge 2 commits into
Eason09053360 wants to merge 2 commits into
Conversation
The method promised latest-version dags in its name and docstring but read every serialized_dag row, so FAB permission syncing processed each Dag once per version and could apply an outdated access_control last.
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
airflow sync-perm --include-dagsiteratesDBDagBag.iter_all_latest_version_dags, which despite its name reads everyserialized_dagrow. Each Dag is synced once per stored version, and with noORDER BYan older version'saccess_controlcan be applied last (e.g. re-granting a role that was removed) until the Dag processor next parses that file.What
SerializedDagModel.get_latest_serialized_dags(), whosedag_idsis now optional; the underlying select already supported all Dags.session.scalars; the new one writes two real versions to the database.related: #70935 (same change rebased onto main; the original was closed under the open-PR limit)
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines