Respect [fab] update_fab_perms when syncing per-DAG permissions during parsing - #70588
Closed
dor-bernstein wants to merge 2 commits into
Closed
Respect [fab] update_fab_perms when syncing per-DAG permissions during parsing#70588dor-bernstein wants to merge 2 commits into
dor-bernstein wants to merge 2 commits into
Conversation
During parsing, _serialize_dag_capturing_errors() calls _sync_dag_perms() for every DAG whenever the FAB auth manager is active, ignoring the [fab] update_fab_perms setting. sync_perm_for_dag() refreshes a per-DAG resource on every parse, which is unnecessary DB work for deployments that manage DAG access at the role level and have disabled automatic FAB permission management. Honor update_fab_perms in this path (default True, so no behavior change for existing configurations); when set to False, the per-DAG permission sync is skipped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dor-bernstein
requested review from
ephraimbuddy and
jedcunningham
as code owners
July 28, 2026 10:53
Contributor
Author
|
Superseded by #70589 (reopened from a personal fork). Closing this one. |
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.
During DAG parsing,
_serialize_dag_capturing_errors()calls_sync_dag_perms()for every DAG whenever the FAB auth manager is active — regardless of the[fab] update_fab_permssetting.sync_perm_for_dag()creates/refreshes a per-DAG resource on every parse, which is avoidable DB work for deployments that manage DAG access at the role level and have disabled automatic FAB permission management.This makes the per-DAG permission sync honor
[fab] update_fab_perms:True, so there is no behavior change for existing configurations.False(operator has opted out of automatic FAB permission management), the per-DAG sync is skipped, avoiding the extra per-parse writes.The flag's documented purpose is "Update FAB permissions and sync security manager roles", so honoring it in this path is consistent with its intent.