Skip to content

Commit

Permalink
Remove ORM references from datamodels for assets (#44010)
Browse files Browse the repository at this point in the history
  • Loading branch information
amoghrajesh authored Nov 14, 2024
1 parent 9a364ac commit b00a810
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
6 changes: 3 additions & 3 deletions airflow/api_fastapi/core_api/datamodels/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@


class DagScheduleAssetReference(BaseModel):
"""Serializable version of the DagScheduleAssetReference ORM SqlAlchemyModel."""
"""DAG schedule reference serializer for assets."""

dag_id: str
created_at: datetime
updated_at: datetime


class TaskOutletAssetReference(BaseModel):
"""Serializable version of the TaskOutletAssetReference ORM SqlAlchemyModel."""
"""Task outlet reference serializer for assets."""

dag_id: str
task_id: str
Expand All @@ -40,7 +40,7 @@ class TaskOutletAssetReference(BaseModel):


class AssetAliasSchema(BaseModel):
"""Serializable version of the AssetAliasSchema ORM SqlAlchemyModel."""
"""Asset alias serializer for assets."""

id: int
name: str
Expand Down
6 changes: 3 additions & 3 deletions airflow/api_fastapi/core_api/openapi/v1-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3650,7 +3650,7 @@ components:
- id
- name
title: AssetAliasSchema
description: Serializable version of the AssetAliasSchema ORM SqlAlchemyModel.
description: Asset alias serializer for assets.
AssetCollectionResponse:
properties:
assets:
Expand Down Expand Up @@ -4900,7 +4900,7 @@ components:
- created_at
- updated_at
title: DagScheduleAssetReference
description: Serializable version of the DagScheduleAssetReference ORM SqlAlchemyModel.
description: DAG schedule reference serializer for assets.
DagStatsCollectionResponse:
properties:
dags:
Expand Down Expand Up @@ -5800,7 +5800,7 @@ components:
- created_at
- updated_at
title: TaskOutletAssetReference
description: Serializable version of the TaskOutletAssetReference ORM SqlAlchemyModel.
description: Task outlet reference serializer for assets.
TaskResponse:
properties:
task_id:
Expand Down
9 changes: 3 additions & 6 deletions airflow/ui/openapi-gen/requests/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ export const $AssetAliasSchema = {
type: "object",
required: ["id", "name"],
title: "AssetAliasSchema",
description:
"Serializable version of the AssetAliasSchema ORM SqlAlchemyModel.",
description: "Asset alias serializer for assets.",
} as const;

export const $AssetCollectionResponse = {
Expand Down Expand Up @@ -2012,8 +2011,7 @@ export const $DagScheduleAssetReference = {
type: "object",
required: ["dag_id", "created_at", "updated_at"],
title: "DagScheduleAssetReference",
description:
"Serializable version of the DagScheduleAssetReference ORM SqlAlchemyModel.",
description: "DAG schedule reference serializer for assets.",
} as const;

export const $DagStatsCollectionResponse = {
Expand Down Expand Up @@ -3327,8 +3325,7 @@ export const $TaskOutletAssetReference = {
type: "object",
required: ["dag_id", "task_id", "created_at", "updated_at"],
title: "TaskOutletAssetReference",
description:
"Serializable version of the TaskOutletAssetReference ORM SqlAlchemyModel.",
description: "Task outlet reference serializer for assets.",
} as const;

export const $TaskResponse = {
Expand Down
6 changes: 3 additions & 3 deletions airflow/ui/openapi-gen/requests/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type AppBuilderViewResponse = {
};

/**
* Serializable version of the AssetAliasSchema ORM SqlAlchemyModel.
* Asset alias serializer for assets.
*/
export type AssetAliasSchema = {
id: number;
Expand Down Expand Up @@ -457,7 +457,7 @@ export type DagRunType =
| "asset_triggered";

/**
* Serializable version of the DagScheduleAssetReference ORM SqlAlchemyModel.
* DAG schedule reference serializer for assets.
*/
export type DagScheduleAssetReference = {
dag_id: string;
Expand Down Expand Up @@ -809,7 +809,7 @@ export type TaskInstanceStateCount = {
};

/**
* Serializable version of the TaskOutletAssetReference ORM SqlAlchemyModel.
* Task outlet reference serializer for assets.
*/
export type TaskOutletAssetReference = {
dag_id: string;
Expand Down

0 comments on commit b00a810

Please sign in to comment.