AIRFLOW-45: Support Hidden Airflow Variables#1530
Conversation
|
|
airflow/configuration.py
Outdated
There was a problem hiding this comment.
Should be True just to be more Python-esque, e.g.
# statsd_on = False
There was a problem hiding this comment.
So, why True as default and not False as default? False preserves backward compatibility with respect to UI experience.
There was a problem hiding this comment.
The issue is if we default to false, then passwords are visible by default.
|
|
|
Wondering whether we want to include extras in the filtering. It's annoying, and I don't think that there is any secret stuff in there for existing connections. Thoughts? |
|
Note: installed locally, and this did appear to work. |
|
Actually, I take that back. It worked for the hooks. For variables, it only works for very specific fields: I would have expected either all to be encrypted, or anything with 'password'/'secret' in it. |
airflow/configuration.py
Outdated
There was a problem hiding this comment.
Make sure you have specified the config value everywhere it is needed. I recall there are at least 3 places where new config needs to be specified.
For example, look at dags_are_paused_at_creation :
(venv) Sid-As-MacBook-Pro:airflow siddharth$ grep -ri dags_are_paused_at_creation . | grep -v Binary | grep -v static
./configuration.py: 'dags_are_paused_at_creation': True,
./configuration.py:dags_are_paused_at_creation = True
./configuration.py:dags_are_paused_at_creation = False
./models.py: is_paused_at_creation = configuration.getboolean('core', 'dags_are_paused_at_creation')
There was a problem hiding this comment.
@criccomini updated the logic, it should check if any of the key_name contains any words in the confidential_fields list that models after sentry's list
|
|
|
Thx for providing a screen shot.. generally a requirement for all UI-changing PRs, though you can attach the screen shot here or in the JIRA. Both work. |
|
@mattuuh7, this is looking good.
|
|
|
|
When running this off of master, I get: This can be reproduced by going to a fresh airflow install, running |
|
Removing Made the exception go away. The patch appears to work without it, but |
|
I've determined the issue was with some rows that somehow persisted even after I ran |
|
Ready to merge. Could you change the commit message to: AIRFLOW-45: Support Hidden Airflow Variables |
|
@criccomini done with the change. please review again. thx |
|
|
|
thanks @criccomini |

Dear Airflow Maintainers,
Please accept this PR that addresses the following issues:
Reminders for contributors: