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/12/20 15:31:27 UTC
[GitHub] [airflow] potiuk opened a new pull request, #28495: Switch configuration to use built-in defaults rather than config file
potiuk opened a new pull request, #28495:
URL: https://github.com/apache/airflow/pull/28495
When Airflow start without airflow.cfg, the default configuration file is generated and so far it contained all the defaults.
However, this caused some problems - the configuration values modified by the users were not easily distinguishable from those from default values.
While having comments, sections and descriptions in the generated config file was useful, having the values there was problematic, mainly when defaults have cahnged or when configuration sections or keys were renamed - because we could not easily change defaults for those users who already had their config file generated.
This PR changes the approach for defaults:
* instead of reading defaults from the config file, we read the defaults from internal python dictionary (generated from the config yaml single-source-of truth
* the config file when missing is still generated, but all values in there are commented out. This has the nice effect that you can still use just the config file to know what configuration options you have, and easiky change them (by just uncommenting and changing value) - but the "default" value is now really part of the airflow application not the generated configuration file
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
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] github-actions[bot] closed pull request #28495: Switch configuration to use built-in defaults rather than config file
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #28495: Switch configuration to use built-in defaults rather than config file
URL: https://github.com/apache/airflow/pull/28495
--
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] github-actions[bot] commented on pull request #28495: Switch configuration to use built-in defaults rather than config file
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #28495:
URL: https://github.com/apache/airflow/pull/28495#issuecomment-1416882390
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.
--
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 pull request #28495: Switch configuration to use built-in defaults rather than config file
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed pull request #28495: Switch configuration to use built-in defaults rather than config file
URL: https://github.com/apache/airflow/pull/28495
--
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 pull request #28495: Switch configuration to use built-in defaults rather than config file
Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #28495:
URL: https://github.com/apache/airflow/pull/28495#issuecomment-1359685701
BTW. There are a few things there I know that shoudl be fixed (has_config() method for example) but I wanted to share it to show the possible approch we might want to take with "internalized" defaults.
--
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