-
Notifications
You must be signed in to change notification settings - Fork 387
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
Don't send optional parameters unless explicitly specified #533
Conversation
This modifies functions to only send optional parameters when a value has explicitly been supplied. Doing so prevents "update" functions from clobbering preexisting values when they're not supplied. Additionally, all default parameter values have been changed to to None so that the Vault server can select the appropriate default value.
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update some of our documentation based on your changes. |
I also took the following notes while making the above changes. It contains comments about notable changes along with a few observations that I found important. Azure:
Database:
GCP:
GitHub:
LDAP:
MFA:
Okta:
PKI:
RADIUS:
System Backend:
Misc:
|
Codecov Report
@@ Coverage Diff @@
## develop #533 +/- ##
===========================================
+ Coverage 82.13% 83.03% +0.89%
===========================================
Files 56 55 -1
Lines 3029 2976 -53
===========================================
- Hits 2488 2471 -17
+ Misses 541 505 -36
Continue to review full report at Codecov.
|
As a heads-up, I think this sort of change is valuable and will help prevent a lot of previously seen footshoots. I simply haven't had the time to go through the PR in the depth required by the scope of changes. I.e., just want let ya know I haven't forgotten about this PR or anything ;) edit: But if it does seem like we have forgotten about it, feel free to comment here and/or hit us up on gitter.im/hvac/community! |
Generating a release today and planning on doing a minor release afterwards with this PR and #537 included. 👍 |
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.
Apologies for letting this PR linger for so long. Let's go ahead and shortly!
(I'm working to get the merge conflicts patched up now...) |
Is there a release expected for this one? It's currently blocking some work I have. I debugged for a while yesterday (sign/hmac & verify) only to find the same issue (locally made a fix, then found this PR). |
Apologies about that @ebpmp! Other responsibilities have kept me from getting this shipped as of yet. I will do my darndest to get that done this evening (i.e., sometime over the next 4-6 hours). |
* Only send optional parameters when supplied This modifies functions to only send optional parameters when a value has explicitly been supplied. Doing so prevents "update" functions from clobbering preexisting values when they're not supplied. Additionally, all default parameter values have been changed to to None so that the Vault server can select the appropriate default value. * Fix and extend Azure test case Co-authored-by: Jeffrey Hogan <jeff@jeffhogan.me>
* adjust CRL endpoint for retrieving CRL in DER and PEM format * adjusting tests, comments * adjust method to download only PEM format and convert response text to string due to pyton2.7 * Fixes typo: much -> must * Fixes close quotes in example usage of read_secret_version for those of us who are reckless copy-pasters * Don't send optional parameters unless explicitly specified (#533) * Only send optional parameters when supplied This modifies functions to only send optional parameters when a value has explicitly been supplied. Doing so prevents "update" functions from clobbering preexisting values when they're not supplied. Additionally, all default parameter values have been changed to to None so that the Vault server can select the appropriate default value. * Fix and extend Azure test case Co-authored-by: Jeffrey Hogan <jeff@jeffhogan.me> * Bump version: 0.9.6 → 0.10.0 * Changelog updates for v0.10.0 Co-authored-by: Moisés Guimarães de Medeiros <moisesguimaraes@users.noreply.github.com> Co-authored-by: Phil Herbert <9078954+philherbert@users.noreply.github.com> Co-authored-by: Marcus T <marcus.truscello@gmail.com>
Thank you so much. My tests are passing now after a lot of hair pulling. I built a competitive library to hvac and am in the process of decommissioning it now that I see how the |
Apologies in advance, this is a big PR. This fixes issue #527 in addition to a few other small things.
This PR primarily does two things:
This PR may contain breaking changes (depending on what your definition of "breaking" is). If anything, the "clobbering" side effect has been removed and some previously required parameters have been made optional.
I did my best to use the following pattern when creating the
params
value for API calls:Please let me know if you have any questions!