charts icon indicating copy to clipboard operation
charts copied to clipboard

Pools slots not detected as int64 anymore

Open omametrika opened this issue 10 months ago • 1 comments

Checks

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:

  1. 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?
  2. 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 !!int in the values file without any luck.
  3. 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


omametrika avatar May 27 '25 09:05 omametrika

Forgot to add: passing the pools values using the --set flag for helm template works fine.

omametrika avatar May 27 '25 10:05 omametrika

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:

  1. they are added to a Project
  2. they are added to a Milestone
  3. they have the lifecycle/frozen label

stale[bot] avatar Jul 29 '25 01:07 stale[bot]

Not very helpful. 😒

omametrika avatar Aug 22 '25 10:08 omametrika