Skip to content

[v2-10-test] Don't resolve path for DAGs folder - #46877

Merged
vatsrahul1001 merged 3 commits into
apache:v2-10-testfrom
astronomer:fix_symlink_resolving_for_dagdir
May 8, 2025
Merged

[v2-10-test] Don't resolve path for DAGs folder#46877
vatsrahul1001 merged 3 commits into
apache:v2-10-testfrom
astronomer:fix_symlink_resolving_for_dagdir

Conversation

@jedcunningham

Copy link
Copy Markdown
Member

With gitsync, the DAGs folder is a symlink, repo -> {commit}. In our DAG processor, when we clean up stale DAGs, we compare processor_subdir here to make sure we are only cleaning up "our" DAG files - but the db record has the resolved path, not the one with the symlink because we resolve it here.

I don't think we really need the resolved path - the one that matches the dags_folder config is better for us generally.

Fair warning, there is some history of bugs in this area, see #41433, #42111, but I believe this change is right and won't have any negative side effects.

@jedcunninghamjedcunningham added the full tests needed We need to run full set of tests for this PR to merge label Feb 18, 2025
@jedcunninghamjedcunningham changed the title Don't resolve path for DAGs folder[v2-10-test] Don't resolve path for DAGs folderFeb 18, 2025
@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-actionsgithub-actionsBot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Apr 7, 2025
@github-actionsgithub-actionsBot removed the stale Stale PRs per the .github/workflows/stale.yml policy file label Apr 30, 2025
This breaks our handling of deleted DAG files. We don't need to have the
resolved absolute path - symlinks are fine and actually what we want!
@sunank200
sunank200force-pushed the fix_symlink_resolving_for_dagdir branch from ee87dfc to 78b8d8eCompareMay 8, 2025 06:30
@uranusjr
uranusjr marked this pull request as ready for review May 8, 2025 08:25
@sunank200sunank200 self-assigned this May 8, 2025
@vatsrahul1001
vatsrahul1001 merged commit b157d1f into apache:v2-10-testMay 8, 2025
@vatsrahul1001
vatsrahul1001 deleted the fix_symlink_resolving_for_dagdir branch May 8, 2025 11:13
@kaxilkaxil added this to the Airflow 2.11.0 milestone May 8, 2025
kaxil pushed a commit that referenced this pull request May 8, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:DAG-processingfull tests neededWe need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@jedcunningham@potiuk@uranusjr@amoghrajesh@vatsrahul1001@phanikumv@sunank200@kaxil@cmarteepants