This is an automated email from the ASF dual-hosted git repository.
bugraoz93 pushed a commit to branch chart/v1-2x-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/chart/v1-2x-test by this push:
new 02696e90195 [chart/v1-2x-test] [helm chart] Go Template Error: Cannot
Compare Slice to nil using eq (#64032) (#67209)
02696e90195 is described below
commit 02696e901951620fdc995d1eb05db5ae69af33b6
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed May 20 00:18:18 2026 +0200
[chart/v1-2x-test] [helm chart] Go Template Error: Cannot Compare Slice to
nil using eq (#64032) (#67209)
* [helm chart] Go Template Error: Cannot Compare Slice to nil using eq
* Fix statics check
* Apply copilot suggestion
(cherry picked from commit b81e335fcc45d7b03341e1dfa9e16550b3303d7e)
Co-authored-by: nhuantho <[email protected]>
---
chart/templates/_helpers.yaml | 2 +-
.../tests/helm_tests/airflow_core/test_worker_sets.py | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/chart/templates/_helpers.yaml b/chart/templates/_helpers.yaml
index 47426122955..42bd5cfa432 100644
--- a/chart/templates/_helpers.yaml
+++ b/chart/templates/_helpers.yaml
@@ -1189,7 +1189,7 @@ Usage:
{{- if gt (len $nested) 0 -}}
{{- $_ := set $newValues $key $nested -}}
{{- end -}}
- {{- else if not (eq $val nil) -}}
+ {{- else if not (kindIs "invalid" $val) -}}
{{- $_ := set $newValues $key $val -}}
{{- end -}}
{{- end -}}
diff --git a/helm-tests/tests/helm_tests/airflow_core/test_worker_sets.py
b/helm-tests/tests/helm_tests/airflow_core/test_worker_sets.py
index 3a3c035ec8d..ce38d98b2b7 100644
--- a/helm-tests/tests/helm_tests/airflow_core/test_worker_sets.py
+++ b/helm-tests/tests/helm_tests/airflow_core/test_worker_sets.py
@@ -37,6 +37,22 @@ class TestWorkerSets:
assert objects_number == len(docs)
+ def test_empty_worker_sets_renders_only_default_worker(self):
+ docs = render_chart(
+ name="test",
+ values={
+ "workers": {
+ "celery": {
+ "enableDefault": True,
+ "sets": [],
+ },
+ },
+ },
+ show_only=["templates/workers/worker-deployment.yaml"],
+ )
+
+ assert jmespath.search("[*].metadata.name", docs) == ["test-worker"]
+
@pytest.mark.parametrize(
("enable_default", "expected"),
[