Repository navigation
Conversation
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: blag <blag@users.noreply.github.com>
Co-authored-by: blag <blag@users.noreply.github.com>
Co-authored-by: blag <blag@users.noreply.github.com>
Co-authored-by: blag <blag@users.noreply.github.com>
|
CC: @blag @Taragolis |
|
It's cool and it will remove a source of confusion for our users. First of all - you will need to rebase @RNHTTR - there are some conflicts. One general comment I have - the warning message mentions EnvironmentVariablesBackend but this one is not really part of custom secret backends so the use of it is not really detected. I thought we should really treat Environment variables a little differently than other custom secrets. As opposed to all other secrets we can actually check if any custom connection/variable is defined in Environment and print the warning when it is. We just have to check if there are anny AIRFLOW__CONNECTION__ env variables or AIRFLOW__VARIABLES__.* If you do it this way (additionally to checking if there is a custom backend defined), the warning will also be printed when there are any custom variables defined via env variables (and you can slightly modify the warning message to explain it). I think that would be a more comple solution to the problem. |
uranusjr
left a comment
There was a problem hiding this comment.
Also need to update against the newest changes in main.
| from airflow.utils.session import create_session | ||
| from airflow.utils.warnings import warn_list_secrets_alternative_backend | ||
|
|
||
| CUSTOM_BACKEND: bool = True if get_custom_secret_backend() else False |
There was a problem hiding this comment.
This shouldn’t need to be repeated. Should we instead extract this to somewhere shared between both modules?
|
Static checks ? |
|
Still working on it @RNHTTR ? needs rebase and fixes :( |
|
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. |
I accidentally closed #24679 when I moved the code to a new branch in my fork, and I can't seem to be able to point the existing PR to the new branch & re-open the PR. So, I just opened this PR instead.
The Airflow CLI and UI don't show Variables or Connections that are stored in a secrets backend. This can be really confusing if you don't already know that. This PR adds a warning to CLI commands and a warning banner to the list connections and list variables views in the UI when a user has enabled a secrets backend. The warning just explains that connections and variables stored in secrets backends won't be displayed using the CLI or UI.
Closes: #10867