Pools slots not detected as int64 anymore
Checks
- [x] I have checked for existing issues.
- [x] This report is about the
User-Community Airflow Helm Chart.
Chart Version
8.9.0
Kubernetes Version
Client Version: v1.33.1
Server Version: v1.30.11-eks-bcf3d70
Helm Version
version.BuildInfo{Version:"v3.18.0", GitCommit:"cc58e3f5a3aa615c6a86275e6f4444b5fdd3cc4e", GitTreeState:"clean", GoVersion:"go1.24.3"}
Description
I have a CI pipeline that validates helm manifests before deploying. I've been using the airflow helm chart 8.9.0 for many months now. All was working fine.
On May 20th, a week ago, CI began to fail with this error:
Error: execution error at (airflow/charts/airflow/templates/sync/sync-pools-secret.yaml:13:20): the `slots` in each `airflow.pools[]` must be int-type!
Here are my pools:
pools:
- description: Pool 1
name: pool1
slots: 100
- description: Pool 2
name: pool2
slots: 20
Clearly, the slots are integers. There are no special characters there that may force a string casting.
So I dug into the code and I found the line that triggers the failure.
{{- range .Values.airflow.pools }}
[...]
{{- if not (or (typeIs "float64" .slots) (typeIs "int64" .slots)) }}
{{- /* the type of a number could be float64 or int64 depending on how it was set (values.yaml, or --set) */ -}}
{{ required "the `slots` in each `airflow.pools[]` must be int-type!" nil }}
{{- end }}
I then had a look at the type of .slots with typeOf .slots and it came out as json.Number. This could explain the error. I confirmed this by adding (typeIs "json.Number" .slots) to the or clause and the error disappeared.
Now my questions are:
- What could be the root cause of this error? I'm not an expert in helm data types, but maybe there has been a change in how helm detects types from values files?
- If this logic is going to stay long-term, would it make sense to add
(typeIs "json.Number" .slots)to the check? I tried to force the type with!!intin the values file without any luck. - Is it me doing something wrong? I'd love if you could point out to me where I may have missed something.
Relevant Logs
Custom Helm Values
Forgot to add: passing the pools values using the --set flag for helm template works fine.
This issue has been automatically marked as stale because it has not had activity in 60 days. It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.
Issues never become stale if any of the following is true:
- they are added to a Project
- they are added to a Milestone
- they have the
lifecycle/frozenlabel
Not very helpful. 😒