You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "nhuantho (via GitHub)" <gi...@apache.org> on 2026/03/21 10:16:40 UTC
[I] [helm chart] Go Template Error: Cannot Compare Slice to nil using eq [airflow]
nhuantho opened a new issue, #64030:
URL: https://github.com/apache/airflow/issues/64030
### Official Helm Chart version
1.19.0 (latest released)
### Apache Airflow version
3.1.8
### Kubernetes Version
v1.31.4
### Helm Chart configuration
```
# Airflow Worker Config
workers:
celery:
# Number of airflow celery workers in StatefulSet
replicas: 1
persistence:
# Enable persistent volumes
enabled: true
# Volume size for worker StatefulSet
size: 2Gi
# If using a custom storageClass, pass name ref to all statefulSets here
storageClassName: ceph-rbd-hdd
resources:
requests:
cpu: 0.5
memory: 4.0Gi
limits:
cpu: 2.0
memory: 8.0Gi
logGroomerSidecar:
resources:
requests:
cpu: 0.25
memory: 0.5Gi
limits:
cpu: 0.5
memory: 1.0Gi
```
### Docker Image customizations
_No response_
### What happened
```
STDERR:
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /tmp/kubeconfig.yml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /tmp/kubeconfig.yml
Error: Failed to render chart: exit status 1: WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /tmp/kubeconfig.yml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /tmp/kubeconfig.yml
Error: template: airflow/templates/workers/worker-serviceaccount.yaml:24:23: executing "airflow/templates/workers/worker-serviceaccount.yaml" at <include "removeNilFields" .Values.workers.celery>: error calling include: template: airflow/templates/_helpers.yaml:1259:21: executing "removeNilFields" at <eq $val nil>: error calling eq: uncomparable type []interface {}: []
Use --debug flag to render out invalid YAML
Error: plugin "diff" exited with error
COMBINED OUTPUT:
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /tmp/kubeconfig.yml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /tmp/kubeconfig.yml
********************
Release was not present in Helm. Diff will show entire contents as new.
********************
Error: Failed to render chart: exit status 1: WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /tmp/kubeconfig.yml
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /tmp/kubeconfig.yml
Error: template: airflow/templates/workers/worker-serviceaccount.yaml:24:23: executing "airflow/templates/workers/worker-serviceaccount.yaml" at <include "removeNilFields" .Values.workers.celery>: error calling include: template: airflow/templates/_helpers.yaml:1259:21: executing "removeNilFields" at <eq $val nil>: error calling eq: uncomparable type []interface {}: []
Use --debug flag to render out invalid YAML
Error: plugin "diff" exited with error
```
### What you think should happen instead
Because I used value.yaml.gotmpl, so it can compare the list type in
```
Remove all nil fields in a map and return new dict object.
Usage:
{{ include "removeNilFields" . }}
*/}}
{{- define "removeNilFields" -}}
{{- $newValues := dict -}}
{{- range $key, $val := . -}}
{{- if kindIs "map" $val -}}
{{- $nested := include "removeNilFields" $val | fromYaml -}}
{{- if gt (len $nested) 0 -}}
{{- $_ := set $newValues $key $nested -}}
{{- end -}}
{{- else if not (eq $val nil) -}}
{{- $_ := set $newValues $key $val -}}
{{- end -}}
{{- end -}}
{{- toYaml $newValues -}}
{{- end -}}
```
default
```
celery:
# List of worker sets. Each item can overwrite values from the parent `workers` and `workers.celery`
# section.
sets: [] -> error here
```
### How to reproduce
Use value.yaml.gotmpl to deploy airflow
### Anything else
I suggest
```
{{- else if not (eq $val nil) -}} -> {{- else if $val -}}
```
because the default `sets` value is a list
<img width="874" height="531" alt="Image" src="https://github.com/user-attachments/assets/86ac1451-51a9-4947-8bf1-8deb90f60f5e" />
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [helm chart] Go Template Error: Cannot Compare Slice to nil using eq [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 closed issue #64030: [helm chart] Go Template Error: Cannot Compare Slice to nil using eq
URL: https://github.com/apache/airflow/issues/64030
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org