Skip to content

Commit

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

* 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 <[email protected]>
  • Loading branch information
kandharvishnu and kandharvishnuu authored Nov 18, 2024
1 parent 7b8bd28 commit 6f02fdb
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 @@ -1751,7 +1751,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/TaskInstance"
$ref: "#/components/schemas/TaskInstanceHistory"
"401":
$ref: "#/components/responses/Unauthenticated"
"403":
Expand Down Expand Up @@ -1782,7 +1782,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/TaskInstanceCollection"
$ref: "#/components/schemas/TaskInstanceHistoryCollection"
"401":
$ref: "#/components/responses/Unauthenticated"
"403":
Expand Down Expand Up @@ -1814,7 +1814,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/TaskInstanceCollection"
$ref: "#/components/schemas/TaskInstanceHistoryCollection"
"401":
$ref: "#/components/responses/Unauthenticated"
"403":
Expand Down Expand Up @@ -1844,7 +1844,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/TaskInstance"
$ref: "#/components/schemas/TaskInstanceHistory"
"401":
$ref: "#/components/responses/Unauthenticated"
"403":
Expand Down Expand Up @@ -3763,7 +3763,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 @@ -1526,6 +1526,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 @@ -4378,7 +4429,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 @@ -4419,7 +4470,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 @@ -4462,7 +4513,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 @@ -4494,7 +4545,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 @@ -5296,6 +5347,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 6f02fdb

Please sign in to comment.