Skip to content

Commit

Permalink
Remove logical_date from clear tis response
Browse files Browse the repository at this point in the history
  • Loading branch information
omkar-foss committed Nov 21, 2024
1 parent d60991f commit dd6f05a
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 32 deletions.
1 change: 0 additions & 1 deletion airflow/api_fastapi/core_api/datamodels/task_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ class TaskInstanceReferenceResponse(BaseModel):
task_id: str
dag_run_id: str = Field(validation_alias="run_id")
dag_id: str
logical_date: datetime


class TaskInstanceReferenceCollectionResponse(BaseModel):
Expand Down
5 changes: 0 additions & 5 deletions airflow/api_fastapi/core_api/openapi/v1-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7026,16 +7026,11 @@ components:
dag_id:
type: string
title: Dag Id
logical_date:
type: string
format: date-time
title: Logical Date
type: object
required:
- task_id
- dag_run_id
- dag_id
- logical_date
title: TaskInstanceReferenceResponse
description: Task Instance Reference serializer for responses.
TaskInstanceResponse:
Expand Down
7 changes: 1 addition & 6 deletions airflow/ui/openapi-gen/requests/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3478,14 +3478,9 @@ export const $TaskInstanceReferenceResponse = {
type: "string",
title: "Dag Id",
},
logical_date: {
type: "string",
format: "date-time",
title: "Logical Date",
},
},
type: "object",
required: ["task_id", "dag_run_id", "dag_id", "logical_date"],
required: ["task_id", "dag_run_id", "dag_id"],
title: "TaskInstanceReferenceResponse",
description: "Task Instance Reference serializer for responses.",
} as const;
Expand Down
1 change: 0 additions & 1 deletion airflow/ui/openapi-gen/requests/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,6 @@ export type TaskInstanceReferenceResponse = {
task_id: string;
dag_run_id: string;
dag_id: string;
logical_date: string;
};

/**
Expand Down
19 changes: 0 additions & 19 deletions tests/api_fastapi/core_api/routes/public/test_task_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -1939,37 +1939,31 @@ def test_should_respond_200_with_reset_dag_run(self, test_client, session):
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_0",
"logical_date": "2020-01-01T00:00:00Z",
"task_id": "print_the_context",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_1",
"logical_date": "2020-01-02T00:00:00Z",
"task_id": "log_sql_query",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_2",
"logical_date": "2020-01-03T00:00:00Z",
"task_id": "sleep_for_0",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_3",
"logical_date": "2020-01-04T00:00:00Z",
"task_id": "sleep_for_1",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_4",
"logical_date": "2020-01-05T00:00:00Z",
"task_id": "sleep_for_2",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_5",
"logical_date": "2020-01-06T00:00:00Z",
"task_id": "sleep_for_3",
},
]
Expand Down Expand Up @@ -2028,7 +2022,6 @@ def test_should_respond_200_with_dag_run_id(self, test_client, session):
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_0",
"logical_date": "2020-01-01T00:00:00Z",
"task_id": "print_the_context",
},
]
Expand Down Expand Up @@ -2085,37 +2078,31 @@ def test_should_respond_200_with_include_past(self, test_client, session):
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_0",
"logical_date": "2020-01-01T00:00:00Z",
"task_id": "print_the_context",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_1",
"logical_date": "2020-01-02T00:00:00Z",
"task_id": "log_sql_query",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_2",
"logical_date": "2020-01-03T00:00:00Z",
"task_id": "sleep_for_0",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_3",
"logical_date": "2020-01-04T00:00:00Z",
"task_id": "sleep_for_1",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_4",
"logical_date": "2020-01-05T00:00:00Z",
"task_id": "sleep_for_2",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_5",
"logical_date": "2020-01-06T00:00:00Z",
"task_id": "sleep_for_3",
},
]
Expand Down Expand Up @@ -2174,37 +2161,31 @@ def test_should_respond_200_with_include_future(self, test_client, session):
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_0",
"logical_date": "2020-01-01T00:00:00Z",
"task_id": "print_the_context",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_1",
"logical_date": "2020-01-02T00:00:00Z",
"task_id": "log_sql_query",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_2",
"logical_date": "2020-01-03T00:00:00Z",
"task_id": "sleep_for_0",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_3",
"logical_date": "2020-01-04T00:00:00Z",
"task_id": "sleep_for_1",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_4",
"logical_date": "2020-01-05T00:00:00Z",
"task_id": "sleep_for_2",
},
{
"dag_id": "example_python_operator",
"dag_run_id": "TEST_DAG_RUN_ID_5",
"logical_date": "2020-01-06T00:00:00Z",
"task_id": "sleep_for_3",
},
]
Expand Down

0 comments on commit dd6f05a

Please sign in to comment.