Repository navigation
Keep .airflowignore rules when the Dags folder symlink is switched - #74853
Merged
Merged
Conversation
git-sync publishes each revision by repointing the Dags folder symlink to a new checkout. When that happens during file discovery, child directories resolve into the new checkout and no longer find the ignore rules inherited from their parent, so files under ignored directories are picked up for that scan.
potiuk
approved these changes
Oct 18, 2026
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Contributor
Backport successfully created: v3-4-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
vatsrahul1001
pushed a commit
that referenced
this pull request
Oct 24, 2026
… switched (#74853) git-sync publishes each revision by repointing the Dags folder symlink to a new checkout. When that happens during file discovery, child directories resolve into the new checkout and no longer find the ignore rules inherited from their parent, so files under ignored directories are picked up for that scan. (cherry picked from commit 04e68bf) Co-authored-by: Haram Lee <yoonsoi041909@gmail.com>
vatsrahul1001
pushed a commit
that referenced
this pull request
Oct 24, 2026
… switched (#74853) (#75466) git-sync publishes each revision by repointing the Dags folder symlink to a new checkout. When that happens during file discovery, child directories resolve into the new checkout and no longer find the ignore rules inherited from their parent, so files under ignored directories are picked up for that scan. (cherry picked from commit 04e68bf) Co-authored-by: Haram Lee <yoonsoi041909@gmail.com>
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.
git-sync publishes each revision by repointing the Dags folder symlink to a new checkout. When that happens during file discovery, child directories resolve into the new checkout and no longer find the ignore rules inherited from their parent, so files under ignored directories are picked up for that scan.
Was generative AI tooling used to co-author this PR?
When git-sync switches the Dag folder symlink during file discovery, subdirectories can lose the rules inherited from .airflowignore. The rules are stored under resolved paths, so switching to a new checkout causes subsequent lookups to miss. Files that should be ignored can then be discovered and parsed.
Key inherited rules by the walked path so they remain available across a symlink switch. Keep resolved paths in a separate set to preserve the existing recursive-link detection.
Add a deterministic regression test that atomically switches the symlink after discovery has stored the parent’s rules. The test fails without the fix and passes with it. All 35 tests in shared/module_loading/tests/module_loading pass.
Closes #74851