-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Get Airflow Variables from Hashicorp Vault #7944
Conversation
6b0de5b
to
c89534d
Compare
Codecov Report
@@ Coverage Diff @@
## master #7944 +/- ##
===========================================
- Coverage 86.36% 61.07% -25.29%
===========================================
Files 929 931 +2
Lines 45036 45172 +136
===========================================
- Hits 38895 27590 -11305
- Misses 6141 17582 +11441
Continue to review full report at Codecov.
|
Separated it to a different PR #7948 |
c89534d
to
16a6ec7
Compare
16a6ec7
to
f822c7b
Compare
f822c7b
to
277e7fc
Compare
Ci failure is unrelated |
(cherry picked from commit c1c88ab)
(cherry picked from commit c1c88ab)
(cherry picked from commit c1c88ab)
(cherry picked from commit c1c88ab)
:return: Variable Value | ||
""" | ||
response = self._get_secret(self.variables_path, key) | ||
return response.get("value") if response else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaxil Why get response.get("value")
instead of response[key]
?
Specifically, why
variables
|- foo
| |- value = some_value
└ bar
└ value = another_value
Not
variables
|- foo = some_value
└ bar = another_value
This makes the structure simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jacobhjkim it was mainly because we wanted to store each Variable as a separate secret (to have proper access control / avoid limits on a secret) and the fact that we use KV store, so we needed a key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks for the answer 👍
Depends on #7948
Get Airflow Variables from Hashicorp Vault
Please only check the last commit
Make sure to mark the boxes below before creating PR: [x]
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.