Skip to content

fix!: Users.Update returns only the response, as erchef sends no user - #141

Merged
tas50 merged 3 commits into
mainfrom
fix/users-update-uri
Nov 27, 2026
Merged

tas50 merged 3 commits into
mainfrom
fix/users-update-uri

Conversation

@tas50

@tas50 tas50 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Users.Update always returned an empty *User from a real Chef Server. erchef answers PUT /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.

Update now 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.Update returns (*Response, error).

Test plan

  • The unit fixture now replays erchef's {"uri"} body
  • go test ./... -race -count=2
  • cd integration && go test ./...
  • golangci-lint in both modules

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>
@tas50
tas50 merged commit 528099c into main Nov 27, 2026
6 checks passed
@tas50
tas50 deleted the fix/users-update-uri branch November 27, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant