wjddn279 opened a new issue, #60924:
URL: https://github.com/apache/airflow/issues/60924

   ### Apache Airflow version
   
   3.1.6
   
   ### If "Other Airflow 3 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   While deploying Airflow through a Helm chart, I used the following 
configuration options:
   ```
   config:
     core:
       max_templated_field_length: 40960000
   ```
   
   Upon checking the deployment, I discovered that DAG parsing was failing with 
errors. 
   ```
   Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/configuration.py", 
line 1220, in getint
       return int(val)
              ^^^^^^^^
   ValueError: invalid literal for int() with base 10: '4.096e+07'
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/serialization/helpers.py",
 line 64, in serialize_template_field
       max_length = conf.getint("core", "max_templated_field_length")
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/configuration.py", 
line 1222, in getint
       raise AirflowConfigException(
   airflow.exceptions.AirflowConfigException: Failed to convert value to int. 
Please check "max_templated_field_length" key in "core" section. Current value: 
"4.096e+07".
   ```
   
   
   After investigation, I found that the generated airflow.cfg had the value 
stored in scientific notation format. This type conversion from integer to 
float occurred during the Helm template rendering process, and the value was 
already converted when it was stored in the ConfigMap.
   
   ```
   [core]
   max_templated_field_length = 4.096e+07
   ```
   
   
   ### What you think should happen instead?
   
   The config parsing should handle large integer type inputs properly.
   
   ### How to reproduce
   
   deploy the airflow using Helm chart with the option (large interger type 
input in config)
   ```
   config:
     core:
       max_templated_field_length: 40960000
   ```
   
   ### Operating System
   
   docker image
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   latest version of Helm chart
   
   ### Anything else?
   
   _No response_
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to