Skip to content

HYPERFLEET-1272 - feat: rename query string params#8

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift-hyperfleet:mainfrom
rh-amarin:HYPERFLEET-1272
Jun 25, 2026
Merged

HYPERFLEET-1272 - feat: rename query string params#8
openshift-merge-bot[bot] merged 1 commit into
openshift-hyperfleet:mainfrom
rh-amarin:HYPERFLEET-1272

Conversation

@rh-amarin

@rh-amarin rh-amarin commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

This is to align with spec version 1.0.24

Changed the dependency in package.json to point to a tag in the hyperfleet-api-spec repository instead of main

@openshift-ci openshift-ci Bot requested review from Mischulee and pnguyen44 June 25, 2026 09:41
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • API Updates
    • Bumped the API spec (OpenAPI/Swagger) to version 1.0.25.
    • Updated pagination for multiple list endpoints to use size instead of pageSize (and removed related ordering query parameter wiring).
    • Resource payloads and references now consistently require kind (including ObjectReference).
    • size is an integer (min 1) with a default of 20.
  • Bug Fixes
    • Tightened request/response schema contracts across channels, clusters, node pools, versions, and WIF configs.

Walkthrough

API and service versions were bumped to 1.0.25. List endpoints for channels, channel versions, clusters, cluster nodepools, nodepools, and wifconfigs now use QueryParams.size instead of pageSize, and shared order parameter definitions were adjusted. Several resource, request, response, and reference schemas now require kind. CWE-16 applies to spec/config drift; no CVE is identifiable from the diff.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: renaming query string params in the API spec.
Description check ✅ Passed The description is related to the changeset because it mentions the spec alignment and dependency update.
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 non-test/example log statements with token/password/credential/secret fields or interpolation were found; no CWE-532 exposure in PR delta.
No Hardcoded Secrets ✅ Passed No CWE-798/CWE-321 hardcoded credentials or embedded creds; only non-secret integrity hashes and example UUIDs appeared.
No Weak Cryptography ✅ Passed No CWE-327/CWE-328/CWE-208 issues detected; repo scan found no crypto/md5, crypto/des, crypto/rc4, SHA1-for-security, ECB, custom crypto, or secret-comparison code.
No Injection Vectors ✅ Passed Touched files are spec/version metadata only; no exec.Command, template.HTML, yaml.Unmarshal, or query string concat patterns were present.
No Privileged Containers ✅ Passed No K8s/OpenShift manifests, Helm templates, or Dockerfiles are changed; repo search found no privileged/host* or root settings.
No Pii Or Sensitive Data In Logs ✅ Passed Touched files are spec/package metadata only; no slog/logr/zap/fmt.Print* or raw request/response logging found. No CWE-532 exposure.

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

✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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/template/openapi.yaml`:
- Around line 31-33: The OpenAPI QueryParams contract is being changed from
pageSize to size before the rest of the stack is ready, which will break
generated clients and the live service. Update the shared QueryParams source to
keep pageSize as a deprecated alias alongside size, and align the API
implementation, integration tests, and Sentinel client references
(QueryParamsPageSize, PageSize) before regenerating schemas/template and related
generated artifacts. Do not edit generated files directly; make the contract
change in the source definitions that feed generation so all consumers stay in
sync.
🪄 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: c978727e-66ba-4b8a-9980-2c4be28fac9b

📥 Commits

Reviewing files that changed from the base of the PR and between 25d89d9 and 842d2a8.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • main.tsp
  • schemas/template/openapi.yaml
  • schemas/template/swagger.yaml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)

Comment on lines 31 to 33
- $ref: '#/components/parameters/QueryParams.page'
- $ref: '#/components/parameters/QueryParams.pageSize'
- $ref: '#/components/parameters/QueryParams.orderBy'
- $ref: '#/components/parameters/QueryParams.size'
- $ref: '#/components/parameters/QueryParams.order'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

pageSizesize is an uncoordinated contract break.

The linked API implementation and clients are not on this contract yet: openshift-hyperfleet/hyperfleet-api/pkg/services/types.go still prefers pageSize, its integration tests still call QueryParamsPageSize(...), and openshift-hyperfleet/hyperfleet-sentinel/internal/client/client.go still emits PageSize. Publishing only size here will desync generated clients and the running service. Keep a deprecated pageSize alias in the shared QueryParams source until the API, Sentinel, and generated clients land together, then regenerate schemas/template/*.
As per coding guidelines, "DO NOT modify generated files in schemas/ or tsp-output-template/ directly." As per path instructions, "Validate changes against HyperFleet architecture standards from the linked architecture repository."

Also applies to: 240-242, 463-465, 781-783, 1122-1124, 1160-1163, 1378-1387

🤖 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/template/openapi.yaml` around lines 31 - 33, The OpenAPI QueryParams
contract is being changed from pageSize to size before the rest of the stack is
ready, which will break generated clients and the live service. Update the
shared QueryParams source to keep pageSize as a deprecated alias alongside size,
and align the API implementation, integration tests, and Sentinel client
references (QueryParamsPageSize, PageSize) before regenerating schemas/template
and related generated artifacts. Do not edit generated files directly; make the
contract change in the source definitions that feed generation so all consumers
stay in sync.

Sources: Coding guidelines, Path instructions, Linked repositories

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
schemas/template/openapi.yaml (1)

31-33: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

pageSizesize is an uncoordinated contract break (CWE-16). Edited directly in a generated artifact.

Two problems persist:

  1. Consumers not aligned. hyperfleet-api/pkg/services/types.go still prefers pageSize (and its tests assert that precedence), hyperfleet-sentinel/internal/client/client.go still emits PageSize, and integration suites still call openapi.QueryParamsPageSize(...) / QueryParamsOrderBy(...). Publishing size-only (and dropping orderBy) here desyncs generated clients from the live service. Land a deprecated pageSize alias in the shared QueryParams source until API, Sentinel, and generated clients cut over together.
  2. Wrong edit surface. This is a generated file; the rename and the orderBy/OrderDirection removal must be made in the TypeSpec source and regenerated, not hand-edited here.

As per coding guidelines: "DO NOT modify generated files in schemas/ or tsp-output-template/ directly." As per path instructions: "Validate changes against HyperFleet architecture standards from the linked architecture repository."

Also applies to: 240-242, 463-465, 781-783, 1122-1124, 1160-1163, 1378-1387

🤖 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/template/openapi.yaml` around lines 31 - 33, The OpenAPI contract
change was made in a generated artifact instead of the source, and it breaks
consumers still relying on QueryParams.pageSize and QueryParamsOrderBy. Move the
rename/removal into the TypeSpec source that generates QueryParams, keep a
deprecated pageSize alias until hyperfleet-api/pkg/services/types.go,
hyperfleet-sentinel/internal/client/client.go, and the integration tests are
updated together, and then regenerate schemas/openapi.yaml rather than editing
it directly.

Sources: Coding guidelines, Path instructions, Linked repositories

🤖 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 `@package.json`:
- Line 10: The hyperfleet core spec dependency has been bumped to a contract
version that switches list pagination from pageSize to size, but downstream
clients in this repo still build and parse pageSize. Revert or defer the
package.json hyperfleet version change until the generated contract and all list
clients are updated together, and keep the dependency pinned to the last
compatible spec version referenced by the hyperfleet package entry.

In `@schemas/template/openapi.yaml`:
- Line 1544: The OpenAPI change making request-body `kind` required looks like
accidental generated drift, not a scoped manual edit. Update the TypeSpec source
definitions for the affected POST bodies (channel, cluster, nodepool, version,
and wifconfig) to mark `kind` as required/optional correctly, then regenerate
the OpenAPI YAML instead of editing `schemas/template/openapi.yaml` directly.
Also confirm this breaking contract change is intentional, aligned with the
`pkg/api/*_types.go` and handler behavior, and recorded in the changelog.

---

Duplicate comments:
In `@schemas/template/openapi.yaml`:
- Around line 31-33: The OpenAPI contract change was made in a generated
artifact instead of the source, and it breaks consumers still relying on
QueryParams.pageSize and QueryParamsOrderBy. Move the rename/removal into the
TypeSpec source that generates QueryParams, keep a deprecated pageSize alias
until hyperfleet-api/pkg/services/types.go,
hyperfleet-sentinel/internal/client/client.go, and the integration tests are
updated together, and then regenerate schemas/openapi.yaml rather than editing
it directly.
🪄 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: 9712c3ed-aac9-4eb9-9cbc-00d835040a88

📥 Commits

Reviewing files that changed from the base of the PR and between 842d2a8 and 00bb8b2.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • main.tsp
  • package.json
  • schemas/template/openapi.yaml
  • schemas/template/swagger.yaml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)
🚧 Files skipped from review as they are similar to previous changes (2)
  • main.tsp
  • schemas/template/swagger.yaml

Comment thread package.json
},
"dependencies": {
"hyperfleet": "github:openshift-hyperfleet/hyperfleet-api-spec#main"
"hyperfleet": "github:openshift-hyperfleet/hyperfleet-api-spec#v1.0.24"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== package.json ==\n'
cat -n package.json | sed -n '1,40p'

printf '\n== search for pageSize / size in spec files ==\n'
rg -n '"pageSize"|pageSize|orderBy|size' . --glob '!node_modules' --glob '!schemas/**' --glob '!tsp-output-template/**' || true

printf '\n== main.tsp / changelog references ==\n'
rg -n '`@info`|v1\.0\.24|v1\.0\.25|pageSize|size' main.tsp CHANGELOG.md schemas/template/openapi.yaml 2>/dev/null || true

Repository: openshift-hyperfleet/hyperfleet-api-spec-template

Length of output: 2863


Hold this core spec bump until downstream list clients switch to size (package.json:10). hyperfleet-api and hyperfleet-sentinel still build/parse pageSize, while this repo now publishes size in the generated contract. Shipping v1.0.24 here creates a breaking pagination mismatch for list endpoints.

🤖 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 `@package.json` at line 10, The hyperfleet core spec dependency has been bumped
to a contract version that switches list pagination from pageSize to size, but
downstream clients in this repo still build and parse pageSize. Revert or defer
the package.json hyperfleet version change until the generated contract and all
list clients are updated together, and keep the dependency pinned to the last
compatible spec version referenced by the hyperfleet package entry.

Sources: Path instructions, Linked repositories

Comment thread schemas/template/openapi.yaml
@rafabene

Copy link
Copy Markdown

/lgtm

@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

[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-merge-bot openshift-merge-bot Bot merged commit 15e51e6 into openshift-hyperfleet:main Jun 25, 2026
3 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.

2 participants