-
Notifications
You must be signed in to change notification settings - Fork 113
Use PATCH semantics by default to set custom metadata #171
Use PATCH semantics by default to set custom metadata #171
Conversation
As was suggested in #168, switching to Specifically, by defaulting to |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
Thank you for this! Unfortunately, the upstream API only accepts
Great point. I added some flare to the code to support removing and updating values. Let me know what you think! |
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.
Unfortunately, the upstream API only accepts POST.
That's what I was afraid of. I figured it was easier to do the PR to get this going. This is exactly what I had in mind. Thanks!
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) |
@pickypg Thanks for the PR! Could you have a look at the failing lint job? |
@fhinkel sure, but I think it’s best to wait for @stephenplusplus (or you) to comment on the feedback to his modifications. |
This changes the default behavior from `POST` to `PATCH` so that the custom metadata passed into `VM#setMetadata` augments what is already set.
fd4ff7e
to
37194cf
Compare
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) |
@stephenplusplus this one is ready for you to review :) |
LGTM! @pickypg thank you for this! 🥇 |
Thanks for the handling everyone. I'm excited to see this get into the library so that I can remove the code in my GCF that was doing this manually! |
This changes the default behavior from
POST
toPATCH
so that the custom metadata passed intoVM#setMetadata
augments what is already set.Fixes #168