You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2024/03/27 23:55:10 UTC
(airflow) branch main updated: Add health endpoint to the RPC server (#38551)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 0b6e7ee19e Add health endpoint to the RPC server (#38551)
0b6e7ee19e is described below
commit 0b6e7ee19ed0ab4e4c4e2bc06a7ea11a7298ce9e
Author: Daniel Standish <15...@users.noreply.github.com>
AuthorDate: Wed Mar 27 16:55:03 2024 -0700
Add health endpoint to the RPC server (#38551)
* Add health endpoint to the RPC server
Will be necessary for helm chart.
* return empty dict instead
---
airflow/api_internal/endpoints/health_endpoint.py | 22 ++++++++++++++++++++++
airflow/api_internal/openapi/internal_api_v1.yaml | 12 ++++++++++++
2 files changed, 34 insertions(+)
diff --git a/airflow/api_internal/endpoints/health_endpoint.py b/airflow/api_internal/endpoints/health_endpoint.py
new file mode 100644
index 0000000000..a6c8a9c795
--- /dev/null
+++ b/airflow/api_internal/endpoints/health_endpoint.py
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from __future__ import annotations
+
+
+def health():
+ return {}
diff --git a/airflow/api_internal/openapi/internal_api_v1.yaml b/airflow/api_internal/openapi/internal_api_v1.yaml
index 58ef962179..f926f3ee5b 100644
--- a/airflow/api_internal/openapi/internal_api_v1.yaml
+++ b/airflow/api_internal/openapi/internal_api_v1.yaml
@@ -68,6 +68,18 @@ paths:
params:
title: Parameters
type: string
+ "/health":
+ get:
+ operationId: health
+ deprecated: false
+ x-openapi-router-controller: airflow.api_internal.endpoints.health_endpoint
+ operationId: health
+ tags:
+ - JSONRPC
+ parameters: []
+ responses:
+ '200':
+ description: Successful response
x-headers: []
x-explorer-enabled: true
x-proxy-enabled: true