Skip to content

Commit 3b5e4bb

Browse files
authored
Fix Execution API incompatibilty with addition of consumed_asset_events (#48888)
1 parent da78b39 commit 3b5e4bb

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

airflow-core/src/airflow/api_fastapi/execution_api/versions/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@
2323
AddIncludePriorDatesParam,
2424
RemoveTIRuntimeChecksEndpoint,
2525
)
26+
from airflow.api_fastapi.execution_api.versions.v2025_04_10 import AddConsumedAssetEventsField
2627

2728
bundle = VersionBundle(
2829
HeadVersion(),
30+
Version("2025-04-10", AddConsumedAssetEventsField),
2931
Version("2025-03-26", RemoveTIRuntimeChecksEndpoint, AddIncludePriorDatesParam),
3032
Version("2025-03-19"),
3133
)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
from __future__ import annotations
19+
20+
from cadwyn import VersionChange, schema
21+
22+
from airflow.api_fastapi.execution_api.datamodels.taskinstance import DagRun
23+
24+
25+
class AddConsumedAssetEventsField(VersionChange):
26+
"""Add the `consumed_asset_events` to DagRun model."""
27+
28+
description = __doc__
29+
30+
instructions_to_migrate_to_previous_version = (schema(DagRun).field("consumed_asset_events").didnt_exist,)

task-sdk/src/airflow/sdk/api/datamodels/_generated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, JsonValue
2929

30-
API_VERSION: Final[str] = "2025-03-26"
30+
API_VERSION: Final[str] = "2025-04-10"
3131

3232

3333
class AssetAliasReferenceAssetEventDagRun(BaseModel):

0 commit comments

Comments
 (0)