fix(cf): recover managed service instance update from empty 202 body - #5432
Merged
norman-abramovitz merged 1 commit intoJun 10, 2026
Merged
Conversation
CF V3 PATCH /v3/service_instances/{guid} on a managed instance returns
202 with an empty body and the job link in the Location header. fw-capi
unconditionally unmarshals the body, so every parameter edit surfaced
"parsing job response: unexpected end of JSON input" to the user.
Create and delete already recover from this fw-capi bug; add the same
shim to the update path: GET the instance, short-poll while the broker
update is in flight, then surface 502 + the broker's description on
failure or a fast-path COMPLETE envelope on success.
norman-abramovitz
approved these changes
Jun 10, 2026
norman-abramovitz
left a comment
Contributor
There was a problem hiding this comment.
A temporary fix is put in place to handle the CAPI library failing to return the object identifier in the body, as with many other CAPI calls. Once the CAPI library is fixed this temporary fix will be removed.
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.
Problem
Editing a managed service instance's parameters failed with:
CF V3 answers
PATCH /v3/service_instances/{guid}on a managed instance with 202 + an empty body, putting the job link in theLocationheader. The capi client library unconditionally unmarshals the response body as a Job, so the empty body produced the JSON parse error — even though CF had accepted the update and the broker operation was already under way. Non-empty parameters force a broker round-trip (async 202), which is why the bug only showed when parameters were supplied.Fix
The create and delete paths already recover from this capi-client behavior; this adds the same recovery to the update path. When the parse error occurs, the handler now:
last_operationso the user sees the real outcome instead of a client-side parse artifact.
Testing
Follow up
The capi library will be modified to read the associated object from the header instead of assuming it is being returned in the body like many of the capi api calls.
Closes #5431