Skip to content

HYPERFLEET-1154 - feat: add 204 no content response to PUT status endpoints#66

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift-hyperfleet:mainfrom
tirthct:hyperfleet-1154
Jul 9, 2026
Merged

HYPERFLEET-1154 - feat: add 204 no content response to PUT status endpoints#66
openshift-merge-bot[bot] merged 2 commits into
openshift-hyperfleet:mainfrom
tirthct:hyperfleet-1154

Conversation

@tirthct

@tirthct tirthct commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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, and
    putResourceStatuses — the API returns 204 when a report is discarded due to
    stale 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

File Change
core/services/statuses-internal.tsp Added 204 + updated @doc for cluster and nodepool PUT
core/services/resources-internal.tsp Added 204 + updated @doc for resource PUT
main.tsp Version bump 1.0.25 → 1.0.26
schemas/core/openapi.yaml Regenerated
CHANGELOG.md Added 1.0.26 entry + backfilled missing 1.0.25 entry

Verification

  • ./build-schema.sh — builds successfully
  • npx spectral lint schemas/core/openapi.yaml --fail-severity warn — zero warnings
  • All three PUT statuses operations have 204 in generated spec
  • @doc descriptions mention discard behavior

@openshift-ci openshift-ci Bot requested review from Mischulee and ciaranRoche July 9, 2026 19:38
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Version 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)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Sec-02: Secrets In Log Output ✅ Passed No slog/logr/zap/fmt.Print logging calls with token/password/credential/secret fields or interpolated strings were found outside tests/examples.
No Hardcoded Secrets ✅ Passed No CWE-798 hardcoded credentials found; matches are docs/example emails, URLs, and a packageManager hash, not secrets.
No Weak Cryptography ✅ Passed No banned crypto primitives, custom crypto, or secret comparisons found in the PR’s changed files; no CWE-327/CWE-208 exposure.
No Injection Vectors ✅ Passed Diff only changes TSP/OpenAPI/docs; no CWE-89/78/79/502 sinks (SQL, exec.Command, template.HTML, yaml.Unmarshal) appear in the touched files.
No Privileged Containers ✅ Passed PR only changes TypeSpec/OpenAPI files; no Kubernetes/OpenShift manifests or Dockerfiles were modified, and no privileged settings were introduced.
No Pii Or Sensitive Data In Logs ✅ Passed No new logging statements in the diff; only docs/spec/version changes. CWE-532 not implicated.
Title check ✅ Passed The title clearly matches the main change: adding 204 responses to PUT status endpoints.
Description check ✅ Passed The description is directly related to the changeset and accurately describes the spec, docs, version bump, and changelog updates.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Comment @coderabbitai help to get the list of available commands.

@kuudori

kuudori commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 9, 2026

Copy link
Copy Markdown

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved label Jul 9, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit c0862ff into openshift-hyperfleet:main Jul 9, 2026
3 checks passed
@tirthct tirthct deleted the hyperfleet-1154 branch July 9, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants