Skip to content

Commit

Permalink
get_task_instance_try_details API returns TaskInstanceHistory schema (#…
Browse files Browse the repository at this point in the history
…43830) (#44133)

* Update v1.yaml

these
- get_task_instance_try_details
- get_mapped_task_instance_try_details
- get_task_instance_tries
- get_mapped_task_instance_tries

are actually returning TaskInstanceHistory

* Update v1.yaml

* dummy change

* revert "dummy change"

* Update api-generated.ts

* Update api-generated.ts

* Update api-generated.ts

* Update api-generated.ts

* changes to v1.yaml

* Update api-generated.ts

* removing execution_date

---------

Co-authored-by: kandharvishnuu <148410552+kandharvishnuu@users.noreply.github.com>
(cherry picked from commit 6f02fdb)

Co-authored-by: kandharvishnu <46064835+kandharvishnu@users.noreply.github.com>
  • Loading branch information
pierrejeambrun and kandharvishnu authored Nov 18, 2024
1 parent f787cfa commit a6dc0f0
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 8 deletions.
96 changes: 92 additions & 4 deletions airflow/api_connexion/openapi/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1743,7 +1743,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/TaskInstance"
$ref: "#/components/schemas/TaskInstanceHistory"
"401":
$ref: "#/components/responses/Unauthenticated"
"403":
Expand Down Expand Up @@ -1774,7 +1774,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/TaskInstanceCollection"
$ref: "#/components/schemas/TaskInstanceHistoryCollection"
"401":
$ref: "#/components/responses/Unauthenticated"
"403":
Expand Down Expand Up @@ -1806,7 +1806,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/TaskInstanceCollection"
$ref: "#/components/schemas/TaskInstanceHistoryCollection"
"401":
$ref: "#/components/responses/Unauthenticated"
"403":
Expand Down Expand Up @@ -1836,7 +1836,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/TaskInstance"
$ref: "#/components/schemas/TaskInstanceHistory"
"401":
$ref: "#/components/responses/Unauthenticated"
"403":
Expand Down Expand Up @@ -4021,7 +4021,95 @@ components:
items:
$ref: "#/components/schemas/TaskInstance"
- $ref: "#/components/schemas/CollectionInfo"
TaskInstanceHistory:
type: object
properties:
task_id:
type: string
task_display_name:
type: string
description: |
Human centric display text for the task.
*New in version 2.9.0*
dag_id:
type: string
dag_run_id:
type: string
description: |
The DagRun ID for this task instance
*New in version 2.3.0*
start_date:
type: string
format: datetime
nullable: true
end_date:
type: string
format: datetime
nullable: true
duration:
type: number
nullable: true
state:
$ref: "#/components/schemas/TaskState"
try_number:
type: integer
map_index:
type: integer
max_tries:
type: integer
hostname:
type: string
unixname:
type: string
pool:
type: string
pool_slots:
type: integer
queue:
type: string
nullable: true
priority_weight:
type: integer
nullable: true
operator:
type: string
nullable: true
description: |
*Changed in version 2.1.1*&#58; Field becomes nullable.
queued_when:
type: string
nullable: true
description: |
The datetime that the task enter the state QUEUE, also known as queue_at
pid:
type: integer
nullable: true
executor:
type: string
nullable: true
description: |
Executor the task is configured to run on or None (which indicates the default executor)
*New in version 2.10.0*
executor_config:
type: string

TaskInstanceHistoryCollection:
type: object
description: |
Collection of task instances .
*Changed in version 2.1.0*&#58; 'total_entries' field is added.
allOf:
- type: object
properties:
task_instances_history:
type: array
items:
$ref: "#/components/schemas/TaskInstanceHistory"
- $ref: "#/components/schemas/CollectionInfo"
TaskInstanceReference:
type: object
properties:
Expand Down
65 changes: 61 additions & 4 deletions airflow/www/static/js/types/api-generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,57 @@ export interface components {
TaskInstanceCollection: {
task_instances?: components["schemas"]["TaskInstance"][];
} & components["schemas"]["CollectionInfo"];
TaskInstanceHistory: {
task_id?: string;
/**
* @description Human centric display text for the task.
*
* *New in version 2.9.0*
*/
task_display_name?: string;
dag_id?: string;
/**
* @description The DagRun ID for this task instance
*
* *New in version 2.3.0*
*/
dag_run_id?: string;
/** Format: datetime */
start_date?: string | null;
/** Format: datetime */
end_date?: string | null;
duration?: number | null;
state?: components["schemas"]["TaskState"];
try_number?: number;
map_index?: number;
max_tries?: number;
hostname?: string;
unixname?: string;
pool?: string;
pool_slots?: number;
queue?: string | null;
priority_weight?: number | null;
/** @description *Changed in version 2.1.1*&#58; Field becomes nullable. */
operator?: string | null;
/** @description The datetime that the task enter the state QUEUE, also known as queue_at */
queued_when?: string | null;
pid?: number | null;
/**
* @description Executor the task is configured to run on or None (which indicates the default executor)
*
* *New in version 2.10.0*
*/
executor?: string | null;
executor_config?: string;
};
/**
* @description Collection of task instances .
*
* *Changed in version 2.1.0*&#58; 'total_entries' field is added.
*/
TaskInstanceHistoryCollection: {
task_instances_history?: components["schemas"]["TaskInstanceHistory"][];
} & components["schemas"]["CollectionInfo"];
TaskInstanceReference: {
/** @description The task ID. */
task_id?: string;
Expand Down Expand Up @@ -4355,7 +4406,7 @@ export interface operations {
/** Success. */
200: {
content: {
"application/json": components["schemas"]["TaskInstance"];
"application/json": components["schemas"]["TaskInstanceHistory"];
};
};
401: components["responses"]["Unauthenticated"];
Expand Down Expand Up @@ -4396,7 +4447,7 @@ export interface operations {
/** Success. */
200: {
content: {
"application/json": components["schemas"]["TaskInstanceCollection"];
"application/json": components["schemas"]["TaskInstanceHistoryCollection"];
};
};
401: components["responses"]["Unauthenticated"];
Expand Down Expand Up @@ -4439,7 +4490,7 @@ export interface operations {
/** Success. */
200: {
content: {
"application/json": components["schemas"]["TaskInstanceCollection"];
"application/json": components["schemas"]["TaskInstanceHistoryCollection"];
};
};
401: components["responses"]["Unauthenticated"];
Expand Down Expand Up @@ -4471,7 +4522,7 @@ export interface operations {
/** Success. */
200: {
content: {
"application/json": components["schemas"]["TaskInstance"];
"application/json": components["schemas"]["TaskInstanceHistory"];
};
};
401: components["responses"]["Unauthenticated"];
Expand Down Expand Up @@ -5554,6 +5605,12 @@ export type TaskInstance = CamelCasedPropertiesDeep<
export type TaskInstanceCollection = CamelCasedPropertiesDeep<
components["schemas"]["TaskInstanceCollection"]
>;
export type TaskInstanceHistory = CamelCasedPropertiesDeep<
components["schemas"]["TaskInstanceHistory"]
>;
export type TaskInstanceHistoryCollection = CamelCasedPropertiesDeep<
components["schemas"]["TaskInstanceHistoryCollection"]
>;
export type TaskInstanceReference = CamelCasedPropertiesDeep<
components["schemas"]["TaskInstanceReference"]
>;
Expand Down

0 comments on commit a6dc0f0

Please sign in to comment.