HYPERFLEET-1143 - chore: remove kind from list schemas#58
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughVersion 1.0.21 removes the Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
schemas/core/openapi.yaml (1)
1689-1715:⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftCoordinate this list-schema break with downstream repos before release.
The linked
openshift-hyperfleet/hyperfleet-apirepo still serializesKindin these list responses, and its presenters/tests still assert it.openshift-hyperfleet/hyperfleet-sentinelmocks also still expect listkind. Publishing this OpenAPI ahead of those follow-up changes will put the released contract out of sync with real producers/consumers on day one. Please block the release until the dependent PRs land, or keep a compatibility field for one version.As per coding guidelines, "Validate changes against HyperFleet architecture standards from the linked architecture repository."
Also applies to: 1914-1935, 2265-2285, 2593-2613
🤖 Prompt for 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. In `@schemas/core/openapi.yaml` around lines 1689 - 1715, The new Array-list schema AdapterStatusList removes the legacy list-level "kind" which will break downstream repos (e.g., hyperfleet-api presenters/tests and hyperfleet-sentinel mocks); either coordinate and block the release until those dependent PRs land or make the change backward-compatible by adding an optional "kind" property to the list schemas (e.g., AdapterStatusList and the other list schemas referenced) with the same string value consumers expect and update the examples; ensure the schema names (AdapterStatusList and the other list types at the other ranges) include this optional field so existing serializers/tests continue to pass until downstream repos are updated.
🤖 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 `@CHANGELOG.md`:
- Around line 10-15: The changelog entry for version 1.0.21 removes the `kind`
property from the list response schemas (ClusterList, NodePoolList,
AdapterStatusList, ResourceList) but omits required downstream migration steps;
update the CHANGELOG.md entry to list explicit upgrade actions for consumers:
describe updating the `hyperfleet-api` handler/presenter and their tests to stop
expecting `kind`, and updating sentinel mock implementations/tests to reflect
the schema change (include example checklist or bullet points for
handler/presenter/test updates and sentinel mock/test changes), and add a brief
note that this is a breaking change so consumers must update before adopting the
tag.
In `@main.tsp`:
- Around line 32-33: The release version in the manifest (the version field set
to "1.0.21") must be bumped to a breaking-major version because removing `kind`
from all `*List` responses is a wire-contract break; update the version string
to the next major (e.g., "2.0.0") in the same location where version: "1.0.21"
is declared so consumers can recognize the breaking change and ensure the change
complies with HyperFleet architecture validation rules.
---
Outside diff comments:
In `@schemas/core/openapi.yaml`:
- Around line 1689-1715: The new Array-list schema AdapterStatusList removes the
legacy list-level "kind" which will break downstream repos (e.g., hyperfleet-api
presenters/tests and hyperfleet-sentinel mocks); either coordinate and block the
release until those dependent PRs land or make the change backward-compatible by
adding an optional "kind" property to the list schemas (e.g., AdapterStatusList
and the other list schemas referenced) with the same string value consumers
expect and update the examples; ensure the schema names (AdapterStatusList and
the other list types at the other ranges) include this optional field so
existing serializers/tests continue to pass until downstream repos are updated.
🪄 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: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: b9743276-1a13-4306-891f-c85c0c3ce768
📒 Files selected for processing (6)
CHANGELOG.mdmain.tspschemas/core/openapi.yamlshared/models/common/model.tspshared/models/resource/model.tspshared/models/statuses/example_adapter_status.tsp
💤 Files with no reviewable changes (3)
- shared/models/statuses/example_adapter_status.tsp
- shared/models/resource/model.tsp
- shared/models/common/model.tsp
| ## [1.0.21] - 2026-06-02 | ||
|
|
||
| ### Removed | ||
|
|
||
| - `kind` property from `ClusterList`, `NodePoolList`, `AdapterStatusList`, and `ResourceList` list response schemas (HYPERFLEET-1143) | ||
|
|
There was a problem hiding this comment.
Document the downstream migration steps in this release note.
This entry says the field was removed, but it omits the concrete follow-up required by known consumers (hyperfleet-api handler/presenter/test updates, plus sentinel mock/test updates). For a breaking contract change, the changelog should include the upgrade steps so downstream teams do not pick up the tag without the required code changes.
Also applies to: 203-204
🤖 Prompt for 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.
In `@CHANGELOG.md` around lines 10 - 15, The changelog entry for version 1.0.21
removes the `kind` property from the list response schemas (ClusterList,
NodePoolList, AdapterStatusList, ResourceList) but omits required downstream
migration steps; update the CHANGELOG.md entry to list explicit upgrade actions
for consumers: describe updating the `hyperfleet-api` handler/presenter and
their tests to stop expecting `kind`, and updating sentinel mock
implementations/tests to reflect the schema change (include example checklist or
bullet points for handler/presenter/test updates and sentinel mock/test
changes), and add a brief note that this is a breaking change so consumers must
update before adopting the tag.
|
/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 |
64f5006
into
openshift-hyperfleet:main
Summary
kindfromClusterList,NodePoolList,AdapterStatusList, andResourceListschemaskindfields (e.g.Cluster,NodePool) are unchangedChanges
shared/models/common/model.tsp— removedkind: stringfrom genericList<T>modelshared/models/resource/model.tsp— removedkind: stringfromResourceList(inline definition)shared/models/statuses/example_adapter_status.tsp— removedkindfrom example constantmain.tsp— version bump to 1.0.21schemas/core/openapi.yaml— regeneratedBreaking Change
List endpoints no longer return a
kindfield in the response body. Thehyperfleet-apirepo must be updated after this release:make generate-allKindassignments from handlers (cluster.go,node_pool.go,cluster_nodepools.go,cluster_status.go,nodepool_status.go)Kindfrompresenters/resource.goandpresenters/slice_filter.gopresenter_test.goandresource_test.goTest plan
spectral lintpasseskindabsent from all*Listschemas in generated OpenAPIkindstill present on individual resource schemas