Skip to content

Guard JavaCoordinator JAR scan against symlink cycles#67693

Merged
jason810496 merged 2 commits into
apache:mainfrom
jason810496:refactor/coordinator/harden-java-coordinator-discovery
May 31, 2026
Merged

Guard JavaCoordinator JAR scan against symlink cycles#67693
jason810496 merged 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?

@jason810496 jason810496 self-assigned this May 29, 2026
@jason810496
jason810496 requested a review from uranusjr May 29, 2026 08:36
@jason810496 jason810496 added the area:coordinator Coordinator: The interface to spawn Lang-SDK subprocesses label May 29, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Java-SDK May 29, 2026
@jason810496 jason810496 moved this from Backlog to In review in Java-SDK May 29, 2026
@jason810496 jason810496 added this to the Airflow 3.3.0 milestone May 29, 2026
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
@jason810496
jason810496 merged commit 233d3cb into apache:main May 31, 2026
115 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Java-SDK May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:coordinator Coordinator: The interface to spawn Lang-SDK subprocesses area:task-sdk

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants