Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_task_instance_try_details API returns TaskInstanceHistory schema … #44133

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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*: 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*: '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*: 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*: '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