You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/17 09:35:06 UTC

[GitHub] [airflow] chla0089 opened a new issue #20899: Only string, no bools in values.yaml env allowed

chla0089 opened a new issue #20899:
URL: https://github.com/apache/airflow/issues/20899


   ### 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
   
   - [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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #20899: Only string, no bools in values.yaml env allowed

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #20899:
URL: https://github.com/apache/airflow/issues/20899#issuecomment-1014575113


   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" not a boolean..


-- 
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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #20899: Only string, no bools in values.yaml env allowed

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #20899:
URL: https://github.com/apache/airflow/issues/20899#issuecomment-1014318412


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


-- 
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



[GitHub] [airflow] potiuk edited a comment on issue #20899: Only string, no bools in values.yaml env allowed

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on issue #20899:
URL: https://github.com/apache/airflow/issues/20899#issuecomment-1014575113


   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).


-- 
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



[GitHub] [airflow] potiuk edited a comment on issue #20899: Only string, no bools in values.yaml env allowed

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on issue #20899:
URL: https://github.com/apache/airflow/issues/20899#issuecomment-1014575113


   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..


-- 
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



[GitHub] [airflow] potiuk closed issue #20899: Only string, no bools in values.yaml env allowed

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #20899:
URL: https://github.com/apache/airflow/issues/20899


   


-- 
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