jedcunningham commented on code in PR #50825:
URL: https://github.com/apache/airflow/pull/50825#discussion_r2116692098
##########
airflow-core/src/airflow/api_fastapi/execution_api/versions/__init__.py:
##########
@@ -21,9 +21,11 @@
from airflow.api_fastapi.execution_api.versions.v2025_04_28 import
AddRenderedMapIndexField
from airflow.api_fastapi.execution_api.versions.v2025_05_20 import
DowngradeUpstreamMapIndexes
+from airflow.api_fastapi.execution_api.versions.v2025_08_10 import
AddDagVersionIdField
bundle = VersionBundle(
HeadVersion(),
+ Version("2025-08-10", AddDagVersionIdField),
Review Comment:
Should we be future dating this? I know we are aiming for 3.1 somewhere
around there, but...
cc @kaxil
##########
airflow-core/src/airflow/migrations/versions/0072_3_1_0_make_dag_version_id_non_nullable_in_.py:
##########
@@ -0,0 +1,50 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""
+Make dag_version_id non-nullable in TaskInstance.
+
+Revision ID: 5d3072c51bac
+Revises: 3ac9e5732b1f
+Create Date: 2025-05-20 10:38:25.635779
+
+"""
+
+from __future__ import annotations
+
+from alembic import op
+from sqlalchemy_utils import UUIDType
+
+# revision identifiers, used by Alembic.
+revision = "5d3072c51bac"
+down_revision = "3ac9e5732b1f"
+branch_labels = None
+depends_on = None
+airflow_version = "3.1.0"
+
+
+def upgrade():
+ """Apply make dag_version_id non-nullable in TaskInstance."""
+ with op.batch_alter_table("task_instance", schema=None) as batch_op:
+ batch_op.alter_column("dag_version_id",
existing_type=UUIDType(binary=False), nullable=False)
Review Comment:
Does this work for AF2 upgrades? Didn't we throw away the old serdag we had
for them, so these would be null?
--
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]