Skip to content

JavaCoordinator: Rename bundles_folder, accept list[str], and switch coordinator config to dict #66836

@jason810496

Description

@jason810496

Summary

Several improvements to the JavaCoordinator configuration structure:

  1. 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.

  2. 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.

  3. 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

Metadata

Metadata

Assignees

Labels

AIP-108: CoordinatorChange this to an 'area:' label after AIP acceptance.AIP-108: java-sdkChange this to an 'area:' label after AIP acceptance.area:corekind:featureFeature Requestspriority:highHigh priority bug that should be patched quickly but does not require immediate new release

Type

No type
No fields configured for issues without a type.

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions