guan404ming commented on code in PR #69295:
URL: https://github.com/apache/airflow/pull/69295#discussion_r3520504501
##########
task-sdk/src/airflow/sdk/coordinators/node/coordinator.py:
##########
@@ -53,6 +57,38 @@ class _NodeBundle:
schema_version: str = attrs.field(validator=_validate_schema_version)
+def _read_embedded_metadata(bundle_path: pathlib.Path) -> dict[str, Any] |
None:
Review Comment:
Agreed. I previously kept it since a trailer originally to match Go SDK, but
I understand that that's only needed to preserve an executable binary now
(Thanks!). Just moved to the first line, coordinator now reads the head.
##########
task-sdk/tests/task_sdk/coordinators/node/test_coordinator.py:
##########
@@ -45,27 +46,36 @@ def _make_ti(dag_id: str = "test_dag", queue: str = "ts")
-> TaskInstance:
)
+def _metadata_yaml(schema_version: str) -> str:
+ return "\n".join(
+ [
+ 'airflow_bundle_metadata_version: "1.0"',
+ "sdk:",
+ " language: typescript",
+ ' version: "0.1.0"',
+ f' supervisor_schema_version: "{schema_version}"',
+ "source: src/airflow.ts",
+ "dags:",
+ " test_dag:",
+ " tasks:",
+ " - test_task",
+ "",
+ ]
+ )
Review Comment:
Make sense!
--
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]