Skip to content

HYPERFLEET-971 - feat: 409 Conflict responses + version bump + CHANGELOG#35

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift-hyperfleet:mainfrom
kuudori:HYPERFLEET-971
May 6, 2026
Merged

HYPERFLEET-971 - feat: 409 Conflict responses + version bump + CHANGELOG#35
openshift-merge-bot[bot] merged 2 commits into
openshift-hyperfleet:mainfrom
kuudori:HYPERFLEET-971

Conversation

@kuudori
Copy link
Copy Markdown
Contributor

@kuudori kuudori commented Apr 29, 2026

Summary

  • HYPERFLEET-971

Test Plan

  • Unit tests added/updated
  • make test-all passes
  • make lint passes
  • Helm chart changes validated with make test-helm (if applicable)
  • Deployed to a development cluster and verified (if Helm/config changes)
  • E2E tests passed (if cross-component or major changes)

Summary by CodeRabbit

  • Release

    • Bumped API to v1.0.10.
  • New Features

    • Documented HTTP 409 Conflict responses for cluster patch, nodepool create, and nodepool patch endpoints.
    • Added PUT adapter status endpoint semantics (upsert).
  • Documentation

    • Updated example status condition wording to use "Available=True" and fixed example typos.
    • Added release notes for v1.0.7–v1.0.10 in CHANGELOG.

@openshift-ci openshift-ci Bot requested review from Mischulee and tirthct April 29, 2026 17:52
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Walkthrough

Bumps API version to 1.0.10. Adds explicit HTTP 409 "conflicts with the current state of the server" responses to PATCH /clusters/{cluster_id}, POST /clusters/{cluster_id}/nodepools, and PATCH /clusters/{cluster_id}/nodepools/{nodepool_id}, and extends the corresponding service return unions to include ConflictResponse. Fixes a repeated typo (Avaliable → Available) in example constants/usages and changes example condition reason/message text from "Ready True" phrasing to "Available=True" wording. Updates CHANGELOG.md with release notes and compare links for 1.0.7–1.0.10.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding 409 Conflict responses, bumping the API version, and updating the CHANGELOG—all clearly reflected in the changeset.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@services/clusters.tsp`:
- Around line 66-70: The union return type includes ConflictResponse which is
undefined and breaks type checking; fix by either importing ConflictResponse
into the module where the union is declared or by defining ConflictResponse in a
shared models file (e.g., the common models) and then importing it; update the
imports at the top to include ConflictResponse (or add the ConflictResponse type
to ../models/common/model.tsp and export it) and ensure the function/type that
returns "Cluster | Error | NotFoundResponse | BadRequestResponse |
ConflictResponse" references the newly imported/defined ConflictResponse symbol.

In `@services/nodepools.tsp`:
- Around line 56-59: The referenced response types ConflictResponse,
BadRequestResponse, NotFoundResponse, and CreatedResponse are missing and
causing TypeSpec compilation failures; add canonical model definitions for these
symbols (e.g., basic models with status, message, and optional data fields) to
your shared models file (models/common/model.tsp) or import them from the
external TypeSpec module you use for common responses, then update usages in
services such as the NodePool, StatusesInternal, and Clusters operations to
reference the newly defined/imported types (look for usages named
ConflictResponse, BadRequestResponse, NotFoundResponse, CreatedResponse to
verify coverage).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 6bba99b4-1226-4173-82f3-7ee840b9489b

📥 Commits

Reviewing files that changed from the base of the PR and between 31fbfe1 and 9754d79.

📒 Files selected for processing (15)
  • CHANGELOG.md
  • aliases.tsp
  • main.tsp
  • models-core/cluster/example_cluster.tsp
  • models-core/nodepool/example_nodepool.tsp
  • models-gcp/cluster/example_cluster.tsp
  • models-gcp/nodepool/example_nodepool.tsp
  • models/common/model.tsp
  • models/statuses/example_adapter_status.tsp
  • schemas/core/openapi.yaml
  • schemas/core/swagger.yaml
  • schemas/gcp/openapi.yaml
  • schemas/gcp/swagger.yaml
  • services/clusters.tsp
  • services/nodepools.tsp

Comment thread services/clusters.tsp
Comment thread services/nodepools.tsp
Comment thread schemas/gcp/openapi.yaml Outdated
Comment thread aliases.tsp Outdated
Comment thread CHANGELOG.md Outdated
kuudori added 2 commits May 5, 2026 08:53
…source rejection

Add ConflictResponse to patchClusterById, createNodePool, and patchNodePoolById
to match backend behavior when operating on soft-deleted clusters. Bump API
version to 1.0.9 and update CHANGELOG with all unreleased features including
PATCH endpoints, Reconciled/Finalized conditions, and 409 Conflict responses.
…onstants

Rename ExampleAdapter{1,2}AvaliableReason/Message to Available (typo fix)
across all definition and reference sites. Replace hardcoded condition
strings in GCP nodepool examples with shared constants for consistency.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@schemas/gcp/openapi.yaml`:
- Around line 128-129: The 409 response blocks in schemas/gcp/openapi.yaml
declare the status but lack a typed response body; update each '409' response
(the three occurrences referenced) to include a content entry mirroring the
default problem response by adding "application/problem+json" with the same
schema reference used by the default RFC9457/problem schema (i.e., point the 409
content to the existing Problem/RFC9457 schema used by the default response) so
generated SDKs/docs have a concrete contract.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: f1676bad-15bf-4288-bc19-91c9e2d5a75b

📥 Commits

Reviewing files that changed from the base of the PR and between 5b6b07f and a78d705.

📒 Files selected for processing (14)
  • CHANGELOG.md
  • main.tsp
  • models-core/cluster/example_cluster.tsp
  • models-core/nodepool/example_nodepool.tsp
  • models-gcp/cluster/example_cluster.tsp
  • models-gcp/nodepool/example_nodepool.tsp
  • models/common/model.tsp
  • models/statuses/example_adapter_status.tsp
  • schemas/core/openapi.yaml
  • schemas/core/swagger.yaml
  • schemas/gcp/openapi.yaml
  • schemas/gcp/swagger.yaml
  • services/clusters.tsp
  • services/nodepools.tsp
✅ Files skipped from review due to trivial changes (4)
  • models/statuses/example_adapter_status.tsp
  • models-gcp/nodepool/example_nodepool.tsp
  • models-core/cluster/example_cluster.tsp
  • models-gcp/cluster/example_cluster.tsp
🚧 Files skipped from review as they are similar to previous changes (8)
  • main.tsp
  • CHANGELOG.md
  • services/nodepools.tsp
  • models-core/nodepool/example_nodepool.tsp
  • schemas/core/openapi.yaml
  • schemas/core/swagger.yaml
  • services/clusters.tsp
  • schemas/gcp/swagger.yaml

Comment thread schemas/gcp/openapi.yaml
@rafabene
Copy link
Copy Markdown
Contributor

rafabene commented May 6, 2026

/lgtm

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 6, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rafabene

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 May 6, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit ad64e3b into openshift-hyperfleet:main May 6, 2026
2 checks passed
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.

3 participants