This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 147dd9bd627 Add fields missing from task_instance_history (#48766)
147dd9bd627 is described below
commit 147dd9bd627595adf0ab03ef4923d9d8ec4d230c
Author: Daniel Standish <[email protected]>
AuthorDate: Thu Apr 3 15:22:05 2025 -0700
Add fields missing from task_instance_history (#48766)
Otel trace fields context_carrier and span_status were not added.
---
airflow-core/docs/img/airflow_erd.sha256 | 2 +-
.../migrations/versions/0065_3_0_0_add_new_otel_span_fields.py | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/airflow-core/docs/img/airflow_erd.sha256
b/airflow-core/docs/img/airflow_erd.sha256
index 3197ad8af9c..f13a304e3e0 100644
--- a/airflow-core/docs/img/airflow_erd.sha256
+++ b/airflow-core/docs/img/airflow_erd.sha256
@@ -1 +1 @@
-6d34a69fdd22fb001604f5fdbc5d456cf7c25d5657536a74df8d0ac8ac63bd9a
\ No newline at end of file
+d0ef3225afc0b4388e3c39548af9d8ef9cd213a644860b5d4043e3d1c3d21304
\ No newline at end of file
diff --git
a/airflow-core/src/airflow/migrations/versions/0065_3_0_0_add_new_otel_span_fields.py
b/airflow-core/src/airflow/migrations/versions/0065_3_0_0_add_new_otel_span_fields.py
index 3e0f217dfdd..44d092ba956 100644
---
a/airflow-core/src/airflow/migrations/versions/0065_3_0_0_add_new_otel_span_fields.py
+++
b/airflow-core/src/airflow/migrations/versions/0065_3_0_0_add_new_otel_span_fields.py
@@ -50,6 +50,11 @@ def upgrade():
op.add_column(
"task_instance", sa.Column("span_status", sa.String(250),
nullable=False, default="not_started")
)
+ op.add_column("task_instance_history", sa.Column("context_carrier",
ExtendedJSON, nullable=True))
+ op.add_column(
+ "task_instance_history",
+ sa.Column("span_status", sa.String(250), nullable=False,
default="not_started"),
+ )
def downgrade():
@@ -62,3 +67,7 @@ def downgrade():
with op.batch_alter_table("task_instance") as batch_op:
batch_op.drop_column("context_carrier")
batch_op.drop_column("span_status")
+
+ with op.batch_alter_table("task_instance_history") as batch_op:
+ batch_op.drop_column("context_carrier")
+ batch_op.drop_column("span_status")