Skip to content

Respect [fab] update_fab_perms when syncing per-DAG permissions during parsing - #70589

Closed
dor-bernstein wants to merge 2 commits into
apache:mainfrom
dor-bernstein:respect-update-fab-perms-dag-sync
Closed

dor-bernstein wants to merge 2 commits into
apache:mainfrom
dor-bernstein:respect-update-fab-perms-dag-sync

Conversation

@dor-bernstein

Copy link
Copy Markdown
Contributor

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_perms setting. 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:

  • Default is True, so there is no behavior change for existing configurations.
  • When set to 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.

dor-bernstein and others added 2 commits July 28, 2026 13:52
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) <[email protected]>
@@ -0,0 +1 @@
The per-DAG permission sync during DAG parsing now honors ``[fab] update_fab_perms``. The default (``True``) keeps the existing behavior; setting it to ``False`` skips the per-DAG permission sync, avoiding the extra per-parse writes for deployments that manage DAG access at the role level.

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.

No need, this is a provider change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vincbeck by no need you mean there's a better way to achieve less DB updates without changing the code?

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.

I mean the newsfragment. When this is a provider change, there is no need to have a newsfragment

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.

@dor-bernstein the request is just to remove this file. it is not needed

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Oct 28, 2026
@github-actions github-actions Bot closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dag-processor stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants