Summary
Several improvements to the JavaCoordinator configuration structure:
-
Rename bundles_folder — The current key name can be confused with Airflow's Dag bundle concept. It should be renamed to something more precise (e.g. jars_root) that reflects its actual purpose: pointing to directories containing Java JARs.
-
Accept list[str] instead of str — The config value should accept a list of directory paths (or individual JAR files) rather than a single string, giving users more flexibility when managing classpaths across multiple locations.
-
Switch coordinator config from list to dict — The top-level coordinators config is currently a list of objects with a name key. Converting it to a dict keyed by coordinator name is more ergonomic and enables lazy initialization — coordinators defined in config won't incur any startup cost unless they are actually referenced by a task.
Proposed config shape
[sdk]
coordinators = {
"jdk-17" = {
"class" = "airflow.sdk.coordinators.java.JavaCoordinator",
"kwargs" = {
"java_executable" = "/usr/lib/jvm/java-17-openjdk/bin/java",
"jars_root" = ["/files/lib", "/files/extra-lib"],
"jvm_args" = ["-Xmx1024m"]
}
}
}
Motivation
- Avoids naming confusion with Dag bundles
- Supports multi-directory classpaths naturally
- Dict-keyed config is internally consistent with how coordinators are already looked up at runtime
- Enables lazy coordinator init as a free benefit
Drafted-by: Claude Code (Opus 4.7); reviewed by @jason810496 before posting
Summary
Several improvements to the
JavaCoordinatorconfiguration structure:Rename
bundles_folder— The current key name can be confused with Airflow's Dag bundle concept. It should be renamed to something more precise (e.g.jars_root) that reflects its actual purpose: pointing to directories containing Java JARs.Accept
list[str]instead ofstr— The config value should accept a list of directory paths (or individual JAR files) rather than a single string, giving users more flexibility when managing classpaths across multiple locations.Switch coordinator config from
listtodict— The top-level coordinators config is currently a list of objects with anamekey. Converting it to a dict keyed by coordinator name is more ergonomic and enables lazy initialization — coordinators defined in config won't incur any startup cost unless they are actually referenced by a task.Proposed config shape
Motivation
Drafted-by: Claude Code (Opus 4.7); reviewed by @jason810496 before posting