BasPH opened a new pull request #14641: URL: https://github.com/apache/airflow/pull/14641
<!-- 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 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/ --> This PR removes airflow.cfg from the Airflow Configuration view, and shows _only_ the rendered view, with the goal to remove confusion about which configuration is currently active. My motivation is that I often encounter people not knowing that you can scroll down to see the active configuration, thinking the airflow.cfg (which is displayed first) is the configuration currently active (which are defaults that might be overridden by env vars). Summary of changes: - UI shows only rendered config - UI shows an info message in case `AIRFLOW__WEBSERVER__EXPOSE_CONFIG=False` - I didn't know about this, but there was an argument `raw=true`, returning the `airflow.cfg` in text format. To make things consistent, I altered this behaviour to return the running configuration (not airflow.cfg). Screenshots of old & new behaviours: ### **1. `AIRFLOW__WEBSERVER__EXPOSE_CONFIG=False` and access `/configuration`** - Previously:  - New:  ### **2. `AIRFLOW__WEBSERVER__EXPOSE_CONFIG=False` and access `/configuration?raw=true`** - Previously: returns HTTP 200 and text file:  - New: returns 204, with header named `Reason` containing message "Your Airflow administrator chose not to expose the configuration..."  ### **3. `AIRFLOW__WEBSERVER__EXPOSE_CONFIG=True` and access `/configuration`** - Previously:  - New: Displays only running configuration, no more (non active) defaults in airflow.cfg  **4. `AIRFLOW__WEBSERVER__EXPOSE_CONFIG=True` and access `/configuration?raw=true`** - Previously: returns text file with content of airflow.cfg (not running configuration)  - New: Returns running configuration as JSON  --- **^ Add meaningful description above** Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information. In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+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 [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.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. For queries about this service, please contact Infrastructure at: [email protected]
