Repository navigation
fix!: Users.Update returns only the response, as erchef sends no user - #141
Merged
Merged
Conversation
erchef answers PUT /users/<name> with only {"uri": ...}
(oc_chef_wm_named_user:finalize_update_body, kept for opscode-account
compatibility), so Update always decoded an empty *User. The unit fixture
and cinc-server-ng both echo the whole user, which hid it. Update now
returns (*Response, error), the shape the package already uses for creates
the server answers with a URI. AGENTS.md lists the cinc-server-ng
difference.
BREAKING CHANGE: Users.Update returns (*Response, error).
Signed-off-by: Tim Smith <tsmith84@proton.me>
Signed-off-by: Tim Smith <tsmith84@proton.me>
Moved up the list, so it no longer sits against the /_stats bullet that the cinc-server-ng v0.22.0 bump removes. Signed-off-by: Tim Smith <tsmith84@proton.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users.Updatealways returned an empty*Userfrom a real Chef Server. erchef answersPUT /users/<name>with only{"uri": ...}(oc_chef_wm_named_user:finalize_update_body); a comment there says this is kept for opscode-account compatibility. Our unit fixture and cinc-server-ng both echo the whole user, which hid the bug.Updatenow returns(*Response, error), the same shape the package already uses for creates the server answers with a URI. Client, org and group PUTs do echo the object on erchef, so those methods are unchanged. AGENTS.md now lists the cinc-server-ng difference.Breaking:
Users.Updatereturns(*Response, error).Test plan
{"uri"}bodygo test ./... -race -count=2cd integration && go test ./...