HYPERFLEET-971 - feat: 409 Conflict responses + version bump + CHANGELOG#35
Conversation
WalkthroughBumps 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)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (15)
CHANGELOG.mdaliases.tspmain.tspmodels-core/cluster/example_cluster.tspmodels-core/nodepool/example_nodepool.tspmodels-gcp/cluster/example_cluster.tspmodels-gcp/nodepool/example_nodepool.tspmodels/common/model.tspmodels/statuses/example_adapter_status.tspschemas/core/openapi.yamlschemas/core/swagger.yamlschemas/gcp/openapi.yamlschemas/gcp/swagger.yamlservices/clusters.tspservices/nodepools.tsp
…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.
There was a problem hiding this comment.
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
📒 Files selected for processing (14)
CHANGELOG.mdmain.tspmodels-core/cluster/example_cluster.tspmodels-core/nodepool/example_nodepool.tspmodels-gcp/cluster/example_cluster.tspmodels-gcp/nodepool/example_nodepool.tspmodels/common/model.tspmodels/statuses/example_adapter_status.tspschemas/core/openapi.yamlschemas/core/swagger.yamlschemas/gcp/openapi.yamlschemas/gcp/swagger.yamlservices/clusters.tspservices/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
|
/lgtm |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
ad64e3b
into
openshift-hyperfleet:main
Summary
Test Plan
make test-allpassesmake lintpassesmake test-helm(if applicable)Summary by CodeRabbit
Release
New Features
Documentation