This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-1-test by this push:
     new 5d6c4296358 [v3-1-test] Fix Liveness / Readiness / Startup probe path 
for Airflow 3.x #58129 (#58734) (#61411)
5d6c4296358 is described below

commit 5d6c4296358efc641530f40f9bec3010815c28ba
Author: Jarek Potiuk <[email protected]>
AuthorDate: Tue Feb 3 20:05:29 2026 +0100

    [v3-1-test] Fix Liveness / Readiness / Startup probe path for Airflow 3.x 
#58129 (#58734) (#61411)
    
    * Fix Liveness / Readiness / Startup probe path for Airflow 3.x #58129
    
    * Update docker-tests/tests/docker_tests/test_docker_compose_quick_start.py
    
    
    
    * Fix ruff formatting
    
    * Update docker-tests/tests/docker_tests/test_docker_compose_quick_start.py
    
    * Update docker-tests/tests/docker_tests/test_docker_compose_quick_start.py
    
    
    
    ---------
    (cherry picked from commit 8ab288a4d507ad54a62ba4ce4f3638142102bc42)
    
    Co-authored-by: jvoravong <[email protected]>
    Co-authored-by: Jason(Zhe-You) Liu 
<[email protected]>
    Co-authored-by: Jens Scheffler <[email protected]>
---
 airflow-core/docs/howto/docker-compose/docker-compose.yaml       | 2 +-
 airflow-core/docs/howto/run-with-self-signed-certificate.rst     | 2 +-
 chart/templates/api-server/api-server-deployment.yaml            | 6 +++---
 .../tests/docker_tests/test_docker_compose_quick_start.py        | 4 ++++
 helm-tests/tests/helm_tests/airflow_core/test_api_server.py      | 9 +++++++++
 task-sdk-tests/docker/docker-compose.yaml                        | 2 +-
 6 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/airflow-core/docs/howto/docker-compose/docker-compose.yaml 
b/airflow-core/docs/howto/docker-compose/docker-compose.yaml
index 3892e044143..21dd6ea62dc 100644
--- a/airflow-core/docs/howto/docker-compose/docker-compose.yaml
+++ b/airflow-core/docs/howto/docker-compose/docker-compose.yaml
@@ -123,7 +123,7 @@ services:
     ports:
       - "8080:8080"
     healthcheck:
-      test: ["CMD", "curl", "--fail", "http://localhost:8080/api/v2/version";]
+      test: ["CMD", "curl", "--fail", 
"http://localhost:8080/api/v2/monitor/health";]
       interval: 30s
       timeout: 10s
       retries: 5
diff --git a/airflow-core/docs/howto/run-with-self-signed-certificate.rst 
b/airflow-core/docs/howto/run-with-self-signed-certificate.rst
index 53a8446d0f7..72d30180815 100644
--- a/airflow-core/docs/howto/run-with-self-signed-certificate.rst
+++ b/airflow-core/docs/howto/run-with-self-signed-certificate.rst
@@ -69,7 +69,7 @@ Alter the API Server health check to trust the certificate:
       - "8080:8080"
     healthcheck:
       # Add --cacert to trust certificate
-      test: ["CMD", "curl", "--fail", "--cacert", 
"${AIRFLOW_PROJ_DIR:-.}/config/cert.pem", 
"https://localhost:8080/api/v2/version";]
+      test: ["CMD", "curl", "--fail", "--cacert", 
"${AIRFLOW_PROJ_DIR:-.}/config/cert.pem", 
"https://localhost:8080/api/v2/monitor/health";]
 
 Running Airflow
 ===============
diff --git a/chart/templates/api-server/api-server-deployment.yaml 
b/chart/templates/api-server/api-server-deployment.yaml
index 61475256c41..c79a06590cc 100644
--- a/chart/templates/api-server/api-server-deployment.yaml
+++ b/chart/templates/api-server/api-server-deployment.yaml
@@ -191,7 +191,7 @@ spec:
               containerPort: {{ .Values.ports.apiServer }}
           livenessProbe:
             httpGet:
-              path: /api/v2/version
+              path: /api/v2/monitor/health
               port: {{ .Values.ports.apiServer }}
               scheme: {{ .Values.apiServer.livenessProbe.scheme | default 
"http" }}
             initialDelaySeconds: {{ 
.Values.apiServer.livenessProbe.initialDelaySeconds }}
@@ -200,7 +200,7 @@ spec:
             periodSeconds: {{ .Values.apiServer.livenessProbe.periodSeconds }}
           readinessProbe:
             httpGet:
-              path: /api/v2/version
+              path: /api/v2/monitor/health
               port: {{ .Values.ports.apiServer }}
               scheme: {{ .Values.apiServer.readinessProbe.scheme | default 
"http" }}
             initialDelaySeconds: {{ 
.Values.apiServer.readinessProbe.initialDelaySeconds }}
@@ -209,7 +209,7 @@ spec:
             periodSeconds: {{ .Values.apiServer.readinessProbe.periodSeconds }}
           startupProbe:
             httpGet:
-              path: /api/v2/version
+              path: /api/v2/monitor/health
               port: {{ .Values.ports.apiServer }}
               scheme: {{ .Values.apiServer.startupProbe.scheme | default 
"http" }}
             initialDelaySeconds: {{ 
.Values.apiServer.startupProbe.initialDelaySeconds }}
diff --git a/docker-tests/tests/docker_tests/test_docker_compose_quick_start.py 
b/docker-tests/tests/docker_tests/test_docker_compose_quick_start.py
index 16a8280a46c..bfefd46fc4c 100644
--- a/docker-tests/tests/docker_tests/test_docker_compose_quick_start.py
+++ b/docker-tests/tests/docker_tests/test_docker_compose_quick_start.py
@@ -115,6 +115,10 @@ def 
test_trigger_dag_and_wait_for_result(default_docker_image, tmp_path_factory,
         # Before we proceed, let's make sure our DAG has been parsed
         compose.execute(service="airflow-dag-processor", command=["airflow", 
"dags", "reserialize"])
 
+        # Verify API server health endpoint is accessible and returns valid 
response
+        health_status = api_request("GET", 
path="monitor/health").get("metadatabase").get("status")
+        assert health_status == "healthy"
+
         api_request("PATCH", path=f"dags/{DAG_ID}", json={"is_paused": False})
         api_request(
             "POST",
diff --git a/helm-tests/tests/helm_tests/airflow_core/test_api_server.py 
b/helm-tests/tests/helm_tests/airflow_core/test_api_server.py
index 77bf475b6b7..277de71f9fe 100644
--- a/helm-tests/tests/helm_tests/airflow_core/test_api_server.py
+++ b/helm-tests/tests/helm_tests/airflow_core/test_api_server.py
@@ -72,6 +72,15 @@ class TestAPIServerDeployment:
             "spec.template.spec.containers[0].startupProbe.httpGet.scheme", 
docs[0]
         )
 
+    def test_should_use_monitor_health_for_http_probes(self):
+        docs = 
render_chart(show_only=["templates/api-server/api-server-deployment.yaml"])
+
+        for probe in ("livenessProbe", "readinessProbe", "startupProbe"):
+            assert (
+                
jmespath.search(f"spec.template.spec.containers[0].{probe}.httpGet.path", 
docs[0])
+                == "/api/v2/monitor/health"
+            )
+
     def test_should_add_extra_containers(self):
         docs = render_chart(
             values={
diff --git a/task-sdk-tests/docker/docker-compose.yaml 
b/task-sdk-tests/docker/docker-compose.yaml
index 29ece3d5316..b323e21704d 100644
--- a/task-sdk-tests/docker/docker-compose.yaml
+++ b/task-sdk-tests/docker/docker-compose.yaml
@@ -78,7 +78,7 @@ services:
     ports:
       - "8080:8080"
     healthcheck:
-      test: ["CMD", "curl", "--fail", "http://localhost:8080/api/v2/version";]
+      test: ["CMD", "curl", "--fail", 
"http://localhost:8080/api/v2/monitor/health";]
       interval: 30s
       timeout: 10s
       retries: 5

Reply via email to