HYPERFLEET-1154 - feat: add 204 no content response to PUT status endpoints#66
Conversation
📝 WalkthroughWalkthroughVersion 1.0.26 adds a 204 No Content success response to the cluster, nodepool, and resource status PUT endpoints in TypeSpec contracts (statuses-internal.tsp, resources-internal.tsp) and the generated OpenAPI schema (openapi.yaml). Operation docs are expanded to describe 400 rejection versus silent-discard 204 conditions. Version fields bumped in main.tsp, package.json, and openapi.yaml. CHANGELOG.md gains a 1.0.26 entry and updated compare links. Estimated code review effort: 2 (Simple) | ~10 minutes CWE-1021 note: 204 "silently discarded" responses on write endpoints give no error signal to adapters submitting stale/duplicate/invalid data — clients cannot distinguish "accepted" from "silently dropped" without out-of-band monitoring. No authentication/authorization changes reviewed here; verify auth on these PUT endpoints remains enforced upstream since this diff only touches response contracts, not auth middleware. 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kuudori The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c0862ff
into
openshift-hyperfleet:main
Summary
Documents the 204 No Content response that the API returns when an adapter status
report is silently discarded. This behavior has existed since the original adapter
status implementation but was never declared in the OpenAPI spec.
What changed
204 response added to
putClusterStatuses,putNodePoolStatuses, andputResourceStatuses— the API returns 204 when a report is discarded due tostale generation, duplicate observed time, or subsequent Unknown Available status.
@doc descriptions updated on all three PUT endpoints to explain when and why
204 is returned, so adapter developers understand the discard semantics.
Backfilled v1.0.25 changelog — HYPERFLEET-1278 (remove email format constraint
from audit fields) bumped the version but missed the changelog entry.
Files
core/services/statuses-internal.tspcore/services/resources-internal.tspmain.tspschemas/core/openapi.yamlCHANGELOG.mdVerification
./build-schema.sh— builds successfullynpx spectral lint schemas/core/openapi.yaml --fail-severity warn— zero warnings