This is an automated email from the ASF dual-hosted git repository.
jscheffl 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 eacbd697c71 Fix Celery worker liveness probe hostname lookup (#67471)
eacbd697c71 is described below
commit eacbd697c71a045f201fec9b14e43429763cfd26
Author: Manan Bhatt <[email protected]>
AuthorDate: Tue May 26 19:46:41 2026 +0530
Fix Celery worker liveness probe hostname lookup (#67471)
* Fix Celery worker liveness probe hostname lookup
* Add chart newsfragment for Celery liveness probe fix
* Address review feedback for Celery liveness probe fix
---
chart/templates/workers/worker-deployment.yaml | 2 +-
chart/tests/helm_tests/airflow_core/test_worker.py | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/chart/templates/workers/worker-deployment.yaml
b/chart/templates/workers/worker-deployment.yaml
index e3fb42478d7..2e7e1163b9a 100644
--- a/chart/templates/workers/worker-deployment.yaml
+++ b/chart/templates/workers/worker-deployment.yaml
@@ -283,7 +283,7 @@ spec:
{{- else }}
- sh
- -c
- - CONNECTION_CHECK_MAX_COUNT=0 exec /entrypoint python -m
celery --app {{ include "celery_executor_namespace" . }} inspect ping -d
celery@$(hostname)
+ - CONNECTION_CHECK_MAX_COUNT=0 exec /entrypoint python -m
celery --app {{ include "celery_executor_namespace" . }} inspect ping -d
celery@$(python -c 'import socket; print(socket.gethostname())')
{{- end }}
{{- end }}
ports:
diff --git a/chart/tests/helm_tests/airflow_core/test_worker.py
b/chart/tests/helm_tests/airflow_core/test_worker.py
index 1e561d2029d..7d604cc87cc 100644
--- a/chart/tests/helm_tests/airflow_core/test_worker.py
+++ b/chart/tests/helm_tests/airflow_core/test_worker.py
@@ -1026,6 +1026,7 @@ class TestWorker:
"spec.template.spec.containers[0].livenessProbe.exec.command",
docs[0]
)
assert "airflow.providers.celery.executors.celery_executor.app" in
livenessprobe_cmd[-1]
+ assert "socket.gethostname()" in livenessprobe_cmd[-1]
@pytest.mark.parametrize(
"workers_values",