From 26b2733b44adcc9e49c1c4d94d59e718b4c7a8ca Mon Sep 17 00:00:00 2001 From: Pierre Jeambrun Date: Wed, 3 May 2023 01:15:43 +0200 Subject: [PATCH] Fix Pool schema OpenAPI spec (#30973) * Fix Pool schema OpenAPI spec * Update OpenApi example (cherry picked from commit 20b4789ee3a9346a5fd75f8db812eb7ffa5e3f10) --- airflow/api_connexion/openapi/v1.yaml | 14 ++++++++++---- airflow/www/static/js/types/api-generated.ts | 4 +++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/airflow/api_connexion/openapi/v1.yaml b/airflow/api_connexion/openapi/v1.yaml index ea8afa824c823..26e8a222abcd1 100644 --- a/airflow/api_connexion/openapi/v1.yaml +++ b/airflow/api_connexion/openapi/v1.yaml @@ -97,12 +97,14 @@ info: - Field names are in snake_case. ```json { + "description": "string", "name": "string", - "slots": 0, "occupied_slots": 0, - "used_slots": 0, - "queued_slots": 0, "open_slots": 0 + "queued_slots": 0, + "running_slots": 0, + "scheduled_slots": 0, + "slots": 0, } ``` @@ -3036,7 +3038,7 @@ components: type: integer readOnly: true description: The number of slots used by running/queued tasks at the moment. - used_slots: + running_slots: type: integer readOnly: true description: The number of slots used by running tasks at the moment. @@ -3048,6 +3050,10 @@ components: type: integer readOnly: true description: The number of free slots at the moment. + scheduled_slots: + type: integer + readOnly: true + description: The number of slots used by scheduled tasks at the moment. description: type: string description: | diff --git a/airflow/www/static/js/types/api-generated.ts b/airflow/www/static/js/types/api-generated.ts index 5595b26b183e3..ee509d963bd68 100644 --- a/airflow/www/static/js/types/api-generated.ts +++ b/airflow/www/static/js/types/api-generated.ts @@ -1183,11 +1183,13 @@ export interface components { /** @description The number of slots used by running/queued tasks at the moment. */ occupied_slots?: number; /** @description The number of slots used by running tasks at the moment. */ - used_slots?: number; + running_slots?: number; /** @description The number of slots used by queued tasks at the moment. */ queued_slots?: number; /** @description The number of free slots at the moment. */ open_slots?: number; + /** @description The number of slots used by scheduled tasks at the moment. */ + scheduled_slots?: number; /** * @description The description of the pool. *