This is an automated email from the ASF dual-hosted git repository.
pierrejeambrun pushed a commit to branch v2-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-10-test by this push:
new a6dc0f087c4 get_task_instance_try_details API returns
TaskInstanceHistory schema (#43830) (#44133)
a6dc0f087c4 is described below
commit a6dc0f087c497af497b8ad537fb752d559efb3bf
Author: Pierre Jeambrun <[email protected]>
AuthorDate: Mon Nov 18 21:21:08 2024 +0800
get_task_instance_try_details API returns TaskInstanceHistory schema
(#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
<[email protected]>
(cherry picked from commit 6f02fdbe2e917d20482fd31c1b090b5d6d880320)
Co-authored-by: kandharvishnu
<[email protected]>
---
airflow/api_connexion/openapi/v1.yaml | 96 ++++++++++++++++++++++++++--
airflow/www/static/js/types/api-generated.ts | 65 +++++++++++++++++--
2 files changed, 153 insertions(+), 8 deletions(-)
diff --git a/airflow/api_connexion/openapi/v1.yaml
b/airflow/api_connexion/openapi/v1.yaml
index dacd52828aa..ef4357e6550 100644
--- a/airflow/api_connexion/openapi/v1.yaml
+++ b/airflow/api_connexion/openapi/v1.yaml
@@ -1743,7 +1743,7 @@ paths:
content:
application/json:
schema:
- $ref: "#/components/schemas/TaskInstance"
+ $ref: "#/components/schemas/TaskInstanceHistory"
"401":
$ref: "#/components/responses/Unauthenticated"
"403":
@@ -1774,7 +1774,7 @@ paths:
content:
application/json:
schema:
- $ref: "#/components/schemas/TaskInstanceCollection"
+ $ref: "#/components/schemas/TaskInstanceHistoryCollection"
"401":
$ref: "#/components/responses/Unauthenticated"
"403":
@@ -1806,7 +1806,7 @@ paths:
content:
application/json:
schema:
- $ref: "#/components/schemas/TaskInstanceCollection"
+ $ref: "#/components/schemas/TaskInstanceHistoryCollection"
"401":
$ref: "#/components/responses/Unauthenticated"
"403":
@@ -1836,7 +1836,7 @@ paths:
content:
application/json:
schema:
- $ref: "#/components/schemas/TaskInstance"
+ $ref: "#/components/schemas/TaskInstanceHistory"
"401":
$ref: "#/components/responses/Unauthenticated"
"403":
@@ -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:
diff --git a/airflow/www/static/js/types/api-generated.ts
b/airflow/www/static/js/types/api-generated.ts
index 3f4935fa6ce..2da17d2981d 100644
--- a/airflow/www/static/js/types/api-generated.ts
+++ b/airflow/www/static/js/types/api-generated.ts
@@ -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;
@@ -4355,7 +4406,7 @@ export interface operations {
/** Success. */
200: {
content: {
- "application/json": components["schemas"]["TaskInstance"];
+ "application/json": components["schemas"]["TaskInstanceHistory"];
};
};
401: components["responses"]["Unauthenticated"];
@@ -4396,7 +4447,7 @@ export interface operations {
/** Success. */
200: {
content: {
- "application/json": components["schemas"]["TaskInstanceCollection"];
+ "application/json":
components["schemas"]["TaskInstanceHistoryCollection"];
};
};
401: components["responses"]["Unauthenticated"];
@@ -4439,7 +4490,7 @@ export interface operations {
/** Success. */
200: {
content: {
- "application/json": components["schemas"]["TaskInstanceCollection"];
+ "application/json":
components["schemas"]["TaskInstanceHistoryCollection"];
};
};
401: components["responses"]["Unauthenticated"];
@@ -4471,7 +4522,7 @@ export interface operations {
/** Success. */
200: {
content: {
- "application/json": components["schemas"]["TaskInstance"];
+ "application/json": components["schemas"]["TaskInstanceHistory"];
};
};
401: components["responses"]["Unauthenticated"];
@@ -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"]
>;