diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index 206f845a0a921..3882c8eac7db1 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -53,7 +53,7 @@ Bug Fixes - Fix ``AttributeError`` when reading logs for previous task attempts with ``TaskInstanceHistory`` (#54114) - Skip database queries for spans and metrics when tracing/metrics are disabled (#54404) - UI: Fix Graph view edge rendering issues for nested task groups with excessive bends and misalignment (#54412) -- Allow database downgrade from Airflow 3.x to 2.11 (#54399) +- Allow database downgrade from Airflow 3.x to 2.11 (#54399, #54508) - Reduce excessive warning logs when multiple deferred tasks are queued in triggerer (#54441) - Fix log retrieval failures for in-progress tasks by properly configuring JWT authentication (#54444) - Fix DAG import errors for invalid access control roles to persist consistently in UI (#54432) diff --git a/airflow-core/docs/img/airflow_erd.sha256 b/airflow-core/docs/img/airflow_erd.sha256 index 076b590dedd23..9ede5601f5863 100644 --- a/airflow-core/docs/img/airflow_erd.sha256 +++ b/airflow-core/docs/img/airflow_erd.sha256 @@ -1 +1 @@ -47bc0fb61cdb68be06d02c7f7d88bf39c0d454bd23e9ad924e218999c40fc121 \ No newline at end of file +9650b3ecb443b35b5626dede72e6235683f616f16c8c8f5ab113fa08d1a27ff7 \ No newline at end of file diff --git a/airflow-core/src/airflow/migrations/versions/0060_3_0_0_add_try_id_to_ti_and_tih.py b/airflow-core/src/airflow/migrations/versions/0060_3_0_0_add_try_id_to_ti_and_tih.py index 9263748f5fda2..82a80cc8903de 100644 --- a/airflow-core/src/airflow/migrations/versions/0060_3_0_0_add_try_id_to_ti_and_tih.py +++ b/airflow-core/src/airflow/migrations/versions/0060_3_0_0_add_try_id_to_ti_and_tih.py @@ -143,12 +143,10 @@ def downgrade(): elif dialect_name == "mysql": op.execute( """ - UPDATE task_instance_history tih - JOIN ( - SELECT id, ROW_NUMBER() OVER (ORDER BY id) AS row_num - FROM task_instance_history - ) AS temp ON tih.id = temp.id - SET tih.id = temp.row_num; + SET @row_number = 0; + UPDATE task_instance_history + SET id = (@row_number := @row_number + 1) + ORDER BY try_id; """ ) else: diff --git a/airflow-core/src/airflow/migrations/versions/0068_3_0_0_ti_table_id_unique_per_try.py b/airflow-core/src/airflow/migrations/versions/0068_3_0_0_ti_table_id_unique_per_try.py index 80a3e252745eb..da67f0e4f9ebf 100644 --- a/airflow-core/src/airflow/migrations/versions/0068_3_0_0_ti_table_id_unique_per_try.py +++ b/airflow-core/src/airflow/migrations/versions/0068_3_0_0_ti_table_id_unique_per_try.py @@ -96,7 +96,7 @@ def downgrade(): dialect_name = conn.dialect.name with op.batch_alter_table("task_reschedule", schema=None) as batch_op: batch_op.add_column( - sa.Column("try_number", sa.INTEGER(), autoincrement=False, nullable=False, default=1) + sa.Column("try_number", sa.INTEGER(), autoincrement=False, nullable=False, server_default="1") ) with op.batch_alter_table("task_instance_note", schema=None) as batch_op: @@ -117,5 +117,5 @@ def downgrade(): # (and on non sqlite batching isn't "a thing", it issue alter tables fine) with op.batch_alter_table("task_instance_history", schema=None) as batch_op: batch_op.add_column( - sa.Column("task_instance_id", UUIDType(binary=False), autoincrement=False, nullable=False) + sa.Column("task_instance_id", UUIDType(binary=False), autoincrement=False, nullable=True) ) diff --git a/reproducible_build.yaml b/reproducible_build.yaml index c6ebe5a005a88..7cb8fb535d1b9 100644 --- a/reproducible_build.yaml +++ b/reproducible_build.yaml @@ -1,2 +1,2 @@ -release-notes-hash: 5df5110dd4c2d2b9b1d1a65256c11961 -source-date-epoch: 1755097670 +release-notes-hash: 7a4e51bb2b808cfa090444eb05ebc2bf +source-date-epoch: 1755194406