Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only string, no bools in values.yaml env allowed #20899

Closed
1 of 2 tasks
chla0089 opened this issue Jan 17, 2022 · 2 comments
Closed
1 of 2 tasks

Only string, no bools in values.yaml env allowed #20899

chla0089 opened this issue Jan 17, 2022 · 2 comments
Labels
area:core invalid kind:bug This is a clearly a bug

Comments

@chla0089
Copy link

Apache Airflow version

2.2.3 (latest released)

What happened

Hi,

with the new release the values.yaml has a strict schema (see #19181).
The new schema allows only for strings for variables in env.

Until the new release, I also used booleans. That does not work anymore. The following error occurs during the deployment (I set the environment variable in the values.yaml using a gitlab-ci.yml):

Error: UPGRADE FAILED: values don't meet the specifications of the schema(s) in the following chart(s):
airflow:
- env.0.value: Invalid type. Expected: string, given: boolean
helm.go:88: [debug] values don't meet the specifications of the schema(s) in the following chart(s):
airflow:
- env.0.value: Invalid type. Expected: string, given: boolean
UPGRADE FAILED

It is also not possible to use "true" or 1 as replacement as they are apparently parsed as boolean and integer and the same error is returned.

Is it possible to change this behaviour, e.g. by allowing also booleans and integers as environment variables? Or is there another solution?

What you expected to happen

Booleans allowed as environment variables in values.yaml.

How to reproduce

Change the following in the values.yaml:

env:
  - name: "test-bool"
    value: true

Operating System

Linux Mint 20

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@chla0089 chla0089 added area:core kind:bug This is a clearly a bug labels Jan 17, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Jan 17, 2022

Thanks for opening your first issue here! Be sure to follow the issue template!

@potiuk
Copy link
Member

potiuk commented Jan 17, 2022

Environment variables are always strings. This validation is correct. Even if you want to set variable to "true", it should be string of value "true" string not a boolean (just use quotes for the value).

@potiuk potiuk closed this as completed Jan 17, 2022
@potiuk potiuk added the invalid label Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core invalid kind:bug This is a clearly a bug
Projects
None yet
Development

No branches or pull requests

2 participants