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

Add TriggererStatus to OpenAPI spec #31579

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
25 changes: 22 additions & 3 deletions airflow/api_connexion/openapi/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2050,8 +2050,8 @@ paths:
get:
summary: Get instance status
description: |
Get the status of Airflow's metadatabase and scheduler. It includes info about
metadatabase and last heartbeat of scheduler.
Get the status of Airflow's metadatabase, triggerer and scheduler. It includes info about
metadatabase and last heartbeat of scheduler and triggerer.
x-openapi-router-controller: airflow.api_connexion.endpoints.health_endpoint
operationId: get_health
tags: [Monitoring]
Expand Down Expand Up @@ -3082,6 +3082,8 @@ components:
$ref: '#/components/schemas/MetadatabaseStatus'
scheduler:
$ref: '#/components/schemas/SchedulerStatus'
triggerer:
$ref: '#/components/schemas/TriggererStatus'

MetadatabaseStatus:
type: object
Expand All @@ -3097,7 +3099,23 @@ components:
status:
$ref: '#/components/schemas/HealthStatus'
latest_scheduler_heartbeat:
description: The time the scheduler last do a heartbeat.
description: The time the scheduler last did a heartbeat.
type: string
format: datetime
readOnly: true
nullable: true

TriggererStatus:
type: object
description: |
The status and the latest triggerer heartbeat.

*New in version 2.6.2*
properties:
status:
$ref: '#/components/schemas/HealthStatus'
latest_triggerer_heartbeat:
description: The time the triggerer last did a heartbeat.
type: string
format: datetime
readOnly: true
Expand Down Expand Up @@ -4658,6 +4676,7 @@ components:
HealthStatus:
description: Health status
type: string
nullable: true
enum:
- healthy
- unhealthy
Expand Down
31 changes: 24 additions & 7 deletions airflow/www/static/js/types/api-generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,8 @@ export interface paths {
};
"/health": {
/**
* Get the status of Airflow's metadatabase and scheduler. It includes info about
* metadatabase and last heartbeat of scheduler.
* Get the status of Airflow's metadatabase, triggerer and scheduler. It includes info about
* metadatabase and last heartbeat of scheduler and triggerer.
*/
get: operations["get_health"];
};
Expand Down Expand Up @@ -1191,6 +1191,7 @@ export interface components {
HealthInfo: {
metadatabase?: components["schemas"]["MetadatabaseStatus"];
scheduler?: components["schemas"]["SchedulerStatus"];
triggerer?: components["schemas"]["TriggererStatus"];
};
/** @description The status of the metadatabase. */
MetadatabaseStatus: {
Expand All @@ -1201,10 +1202,23 @@ export interface components {
status?: components["schemas"]["HealthStatus"];
/**
* Format: datetime
* @description The time the scheduler last do a heartbeat.
* @description The time the scheduler last did a heartbeat.
*/
latest_scheduler_heartbeat?: string | null;
};
/**
* @description The status and the latest triggerer heartbeat.
*
* *New in version 2.6.2*
*/
TriggererStatus: {
status?: components["schemas"]["HealthStatus"];
/**
* Format: datetime
* @description The time the triggerer last did a heartbeat.
*/
latest_triggerer_heartbeat?: string | null;
};
/** @description The pool */
Pool: {
/** @description The name of pool. */
Expand Down Expand Up @@ -2154,9 +2168,9 @@ export interface components {
WeightRule: "downstream" | "upstream" | "absolute";
/**
* @description Health status
* @enum {string}
* @enum {string|null}
*/
HealthStatus: "healthy" | "unhealthy";
HealthStatus: ("healthy" | "unhealthy") | null;
};
responses: {
/** Client specified an invalid argument. */
Expand Down Expand Up @@ -4221,8 +4235,8 @@ export interface operations {
};
};
/**
* Get the status of Airflow's metadatabase and scheduler. It includes info about
* metadatabase and last heartbeat of scheduler.
* Get the status of Airflow's metadatabase, triggerer and scheduler. It includes info about
* metadatabase and last heartbeat of scheduler and triggerer.
*/
get_health: {
responses: {
Expand Down Expand Up @@ -4650,6 +4664,9 @@ export type MetadatabaseStatus = CamelCasedPropertiesDeep<
export type SchedulerStatus = CamelCasedPropertiesDeep<
components["schemas"]["SchedulerStatus"]
>;
export type TriggererStatus = CamelCasedPropertiesDeep<
components["schemas"]["TriggererStatus"]
>;
export type Pool = CamelCasedPropertiesDeep<components["schemas"]["Pool"]>;
export type PoolCollection = CamelCasedPropertiesDeep<
components["schemas"]["PoolCollection"]
Expand Down