Skip to content

Cache bundle-to-team name lookups in dag processor manager#68730

Merged
vincbeck merged 1 commit into
apache:mainfrom
aws-mwaa:ferruzzi/multi-team/bundle-cache
Jun 22, 2026
Merged

Cache bundle-to-team name lookups in dag processor manager#68730
vincbeck merged 1 commit into
apache:mainfrom
aws-mwaa:ferruzzi/multi-team/bundle-cache

Conversation

@ferruzzi

Copy link
Copy Markdown
Contributor

Follow-up to request by @o-nikolas in #68599 to add caching like we did in the scheduler.

Adding a _bundle_name_to_team_name map/cache and a _multi_team flag (read once at construction, like the scheduler) on DagFileProcessorManager also allowed me to move the if multi-team check into the _get_team_names() and _get_team_name() helpers, simplifying the calling code.

The cache/map is cleared inside the _refresh_dag_bundles() method, which is the only time we can pick up new mappings anyway.


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

Generated-by: [Claude Opus 4.8] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {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.

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

Verified in breeze that the cache produces correct results, invalidation works, the n->1 query batching works, and a bundle can't be mapped to a second team

@vatsrahul1001

vatsrahul1001 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@ferruzzi good to be merged?

@vincbeck
vincbeck merged commit 1fb77d1 into apache:main Jun 22, 2026
77 checks passed
@vincbeck
vincbeck deleted the ferruzzi/multi-team/bundle-cache branch June 22, 2026 14:18
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-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-3-test PR Link

cetingokhan pushed a commit to cetingokhan/airflow that referenced this pull request Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants