Lee-W commented on code in PR #68694:
URL: https://github.com/apache/airflow/pull/68694#discussion_r3451562081
##########
airflow-core/src/airflow/config_templates/config.yml:
##########
@@ -2045,13 +2045,29 @@ sdk:
multiple times under different names with different ``kwargs`` (for
example, two ``JavaCoordinator`` instances pinned to different JDK
versions).
+
+ An entry may also carry an optional ``extra`` object for additional
+ information associated with the coordinator that the coordinator itself
+ does not receive; other components read it as needed. For example,
+ KubernetesExecutor reads ``extra.pod_template_file`` to launch a
queue's
+ worker pod from a specific pod template, and
+ ``extra.worker_container_repository`` + ``extra.worker_container_tag``
to
+ override the worker base image for that queue (both are required).
version_added: 3.3.0
type: string
example: |
{
"jdk-17": {
"classpath": "airflow.sdk.coordinators.java.JavaCoordinator",
- "kwargs": {"java_executable":
"/usr/lib/jvm/java-17-openjdk/bin/java", "jvm_args": ["-Xmx1024m"]}
+ "kwargs": {
+ "java_executable": "/usr/lib/jvm/java-17-openjdk/bin/java",
+ "jvm_args": ["-Xmx1024m"]
+ },
+ "extra": {
+ "pod_template_file": "/opt/airflow/pod_templates/java.yaml",
+ "worker_container_repository": "myrepo/airflow-java",
Review Comment:
Is `myrepo` a reasonable choice of default?
##########
task-sdk/tests/task_sdk/execution_time/test_coordinator.py:
##########
@@ -41,6 +41,11 @@ class _CoordinatorB(BaseCoordinator):
pass
+class _ExplodingCoordinator(BaseCoordinator):
+ def __init__(self):
+ raise RuntimeError("coordinator must not be instantiated")
Review Comment:
I guess what you mean is
```suggestion
raise RuntimeError("This coordinator must not be instantiated")
```
instead of all `Coordinator`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]