From 05f23c899c0c63388a85f7f368df3a56e332120b Mon Sep 17 00:00:00 2001 From: LIU ZHE YOU Date: Thu, 24 Sep 2026 04:48:36 +0000 Subject: [PATCH 1/3] Say which tasks carry _arg_bindings in the serialization schema --- .../adr/lang-sdk/0007-taskflow-across-language-boundary.md | 3 +++ airflow-core/src/airflow/serialization/schema.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/airflow-core/adr/lang-sdk/0007-taskflow-across-language-boundary.md b/airflow-core/adr/lang-sdk/0007-taskflow-across-language-boundary.md index e2f8abf8f8be0..b3dcbba997cfe 100644 --- a/airflow-core/adr/lang-sdk/0007-taskflow-across-language-boundary.md +++ b/airflow-core/adr/lang-sdk/0007-taskflow-across-language-boundary.md @@ -276,6 +276,9 @@ tracked in [#70523](https://github.com/apache/airflow/issues/70523). - The mechanism is not private to `@task.stub`: any TaskFlow-shaped operator that sets `is_stub` gets arg-binding materialization. A stub-flagged operator that is not a `DecoratedOperator` is recognized as stub-backed but receives no bindings (decision B). +- Core is not the only producer. A language SDK that declares a Dag of its own serializes its tasks + with `is_stub` and writes `_arg_bindings` into the Dag it submits, with no Python operator behind + them, so `_arg_bindings` means "a stub task's captured arguments", not "@task.stub". - Older clients are unaffected: the version migration strips `arg_bindings`, and the server skips deriving it for them entirely. diff --git a/airflow-core/src/airflow/serialization/schema.json b/airflow-core/src/airflow/serialization/schema.json index fa149734b7b94..5a50dadf4af5d 100644 --- a/airflow-core/src/airflow/serialization/schema.json +++ b/airflow-core/src/airflow/serialization/schema.json @@ -367,7 +367,7 @@ "max_active_tis_per_dag": {"type": "integer"}, "max_active_tis_per_dagrun": {"type": "integer"}, "_arg_bindings": { - "$comment": "Only present on @task.stub tasks called with TaskFlow arguments", + "$comment": "Only present on a stub task (is_stub) whose call captured TaskFlow arguments: a Python @task.stub task, or a task of a Dag a language SDK declared and serialized itself", "type": "array", "items": { "$ref": "#/definitions/arg_binding" } } From 10a066cbfba748e694b69211bac5cfe27c19b9a5 Mon Sep 17 00:00:00 2001 From: LIU ZHE YOU Date: Sun, 27 Sep 2026 15:31:15 +0000 Subject: [PATCH 2/3] Rephrase the _arg_bindings schema comment --- airflow-core/src/airflow/serialization/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow-core/src/airflow/serialization/schema.json b/airflow-core/src/airflow/serialization/schema.json index 5a50dadf4af5d..086bccb34bb5b 100644 --- a/airflow-core/src/airflow/serialization/schema.json +++ b/airflow-core/src/airflow/serialization/schema.json @@ -367,7 +367,7 @@ "max_active_tis_per_dag": {"type": "integer"}, "max_active_tis_per_dagrun": {"type": "integer"}, "_arg_bindings": { - "$comment": "Only present on a stub task (is_stub) whose call captured TaskFlow arguments: a Python @task.stub task, or a task of a Dag a language SDK declared and serialized itself", + "$comment": "Used for mixed-language tasks (the @task.stub operator) or tasks defined in a non-Python SDK Dag", "type": "array", "items": { "$ref": "#/definitions/arg_binding" } } From 49f45266c3a2ae8ae9cc51643c4ee6e40b2ac917 Mon Sep 17 00:00:00 2001 From: LIU ZHE YOU Date: Sun, 27 Sep 2026 16:23:49 +0000 Subject: [PATCH 3/3] Sync the TS SDK Dag schema with the _arg_bindings comment --- ts-sdk/schema/dag-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-sdk/schema/dag-schema.json b/ts-sdk/schema/dag-schema.json index fa149734b7b94..086bccb34bb5b 100644 --- a/ts-sdk/schema/dag-schema.json +++ b/ts-sdk/schema/dag-schema.json @@ -367,7 +367,7 @@ "max_active_tis_per_dag": {"type": "integer"}, "max_active_tis_per_dagrun": {"type": "integer"}, "_arg_bindings": { - "$comment": "Only present on @task.stub tasks called with TaskFlow arguments", + "$comment": "Used for mixed-language tasks (the @task.stub operator) or tasks defined in a non-Python SDK Dag", "type": "array", "items": { "$ref": "#/definitions/arg_binding" } }