-
Notifications
You must be signed in to change notification settings - Fork 12
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
Confusing priority of vault_url value sources #17
Comments
Hi @kazauwa! As you can see, I am still torn on this 😅 Maybe other users of pydantic-vault can weigh in on this?
You can always comment below if you want to express a more nuanced opinion ^^ In any case, sorry for the delay @kazauwa 😬 If this goes through (or I decide that in the end I want the change) I would gladly accept a PR for this, if you are still motivated. |
If we're going to refer to pydantic's list of priorities then I personally would say that defining So I basically agree with Igor - that's going to be a good candidate to be changed. |
I agree that it does make sense. Also by giving the link to Pydantic docs I didn't want to say "this is how we should do things", I was just trying to remember where my decision was coming from 😅 |
I agree that environment variables should override what is written in the |
Hi everyone! |
Thanks everyone! I am now convinced that this should change, for all environment variables used in the |
This is now released in 1.0.0, thank you again @kazauwa! 🚀 🎆 |
I encountered the problem that the
vault_url
value specified inclass Config
takes priority over theVAULT_ADDR
environment variable. In my head, it should be the opposite: we define a default value in the code, but we can override it externally by setting an environment variable (see 12-factor app). Although, I found out that this can be achieved by settingvault_url
toNone
, I still find this confusing.Luckily, it can be easily fixed by rearranging the order of reading vault URL sources in
_get_authenticated_vault_client()
:I can make a pull request with the change and cover them with tests if that's okay with you.
The text was updated successfully, but these errors were encountered: