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

Migration tool for Airflow config file #39612

Open
1 of 2 tasks
Karpisek opened this issue May 14, 2024 · 5 comments
Open
1 of 2 tasks

Migration tool for Airflow config file #39612

Karpisek opened this issue May 14, 2024 · 5 comments
Labels
good first issue kind:feature Feature Requests pending-response stale Stale PRs per the .github/workflows/stale.yml policy file

Comments

@Karpisek
Copy link

Description

If Im not mistaken there is currently no such tool which would provide a smooth interface for updating the airflow config to be compatible with a newer version of Airflow. Would it be feasible to create such a tool which would add new defaults to the existing config (which was compatible with prior version) and for example mark obsolete configurations, which are no longer supported?

Use case/motivation

Currently when updating to newer version of Airflow we need to go thru the config and check wether all of the configurations which we have changed are still supported in the newer versions. This is quite a tedious task.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@Karpisek Karpisek added kind:feature Feature Requests needs-triage label for new issues that we didn't triage yet labels May 14, 2024
Copy link

boring-cyborg bot commented May 14, 2024

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@Karpisek Karpisek changed the title Migration tool for Airflow config files Migration tool for Airflow config file May 14, 2024
@kaxil
Copy link
Member

kaxil commented May 14, 2024

We handle that from within Airflow itself. If you don't want to change the default, there is no need of adding anything to airflow.cfg.

For your use-case, do you want to know which airflow configs are deprecated in new Airflow versions?
Where would you prefer this a separate section in the doc? Airflow should already log deprecations when a scheduler is started.

@kaxil kaxil added pending-response and removed needs-triage label for new issues that we didn't triage yet labels May 14, 2024
@potiuk
Copy link
Member

potiuk commented May 14, 2024

I think it's a good idea (And marked it as good first issue). Currently we recommend (https://airflow.apache.org/docs/apache-airflow/stable/howto/set-config.html) to use this command

airflow config list --defaults > "${AIRFLOW_HOME}/airflow.cfg"

It would be quite feasible to update that command to have --update-config and rather than redirect the output, simply generate it in ~${AIRFLOW_HOME}/airflow.cfg -> which could simply leave whatever is configured and add missing defaults. If you want @Karpisek you can implement it, otherwise it will have to wait for someone to pick it up.

@potiuk
Copy link
Member

potiuk commented May 14, 2024

BTW. Even now you could generate new defaults using this command and compare them / merge to make your job easier, but yeah automating it would likely be a good idea for users who prefer to see all possible values (even if their default vaiues are commented out and not used).

Copy link

This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue kind:feature Feature Requests pending-response stale Stale PRs per the .github/workflows/stale.yml policy file
Projects
None yet
Development

No branches or pull requests

3 participants