Skip to content

Guard JavaCoordinator JAR scan against symlink cycles#67693

Open
jason810496 wants to merge 2 commits into
apache:mainfrom
jason810496:refactor/coordinator/harden-java-coordinator-discovery
Open

Guard JavaCoordinator JAR scan against symlink cycles#67693
jason810496 wants to merge 2 commits into
apache:mainfrom
jason810496:refactor/coordinator/harden-java-coordinator-discovery

Conversation

@jason810496
Copy link
Copy Markdown
Member

Why

Caught by claude during self-review in #67161, we should guard symlink loop or a hardlinked directory under jars_root. Otherwise, the _find_jars will enter infinite recursion loop and OOM.


Was generative AI tooling used to co-author this PR?

Comment thread task-sdk/src/airflow/sdk/coordinators/java/coordinator.py Outdated
Comment thread task-sdk/src/airflow/sdk/coordinators/java/coordinator.py Outdated
Drop the per-directory list() materialization in the JAR scan in favor of
a lazy iterdir() walk, keeping a small helper so an unreadable directory is
skipped instead of aborting the scan. Pass the Path straight to the debug
log rather than stringifying it, matching the other log calls.
@jason810496 jason810496 force-pushed the refactor/coordinator/harden-java-coordinator-discovery branch from 1415782 to ff4c02b Compare May 30, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIP-108: Coordinator Change this to an 'area:' label after AIP acceptance. area:task-sdk

Development

Successfully merging this pull request may close these issues.

3 participants