airflow
airflow copied to clipboard
Airflow variable export-import does not include description field
Apache Airflow version
Other Airflow 2 version (please specify below)
If "Other Airflow 2 version" selected, which one?
2.6.3
What happened?
On airflow UI, Admin > Variables
When we export variables and save the JSON, it does not include description field. So when imported in another environment, description field has to be updated manually.
What you think should happen instead?
Variable Export and Import should include description field.
How to reproduce
airflow UI, go to Admin > Variables
Export all variables and save the JSON
Check JSON.
Operating System
Windows
Versions of Apache Airflow Providers
2.6.3
Deployment
Google Cloud Composer
Deployment details
composer-2.6.0-airflow-2.6.3
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
At that moment (and historically) Airflow save variables (both in UI and CLI) as key-value storage, and if the values is a valid python dictionary than it serialize as json object
{
"Variable 1": "Values"
"Variable 2": {
"spam": "egg"
}
}
Without changing the format it is not possible to achieve add description in other words someone need to introduce version 2 of variables dump format and Airflow should able to work with both of them for backward compatibility.
https://github.com/apache/airflow/pull/39075 fixes