Skip to content

OSAC-3160: Add GPU columns to InstanceType CLI table rendering - #128

Merged
omer-vishlitzky merged 4 commits into
osac-project:mainfrom
Tzif-Morgen:feat/OSAC-3160-gpu-table-columns
Aug 10, 2026
Merged

omer-vishlitzky merged 4 commits into
osac-project:mainfrom
Tzif-Morgen:feat/OSAC-3160-gpu-table-columns

Conversation

@Tzif-Morgen

@Tzif-Morgen Tzif-Morgen commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

OSAC-3160: Add GPU columns to InstanceType CLI table rendering

Jira: OSAC-3160
Story type: [DEV]

Summary

Adds GPUS and GPU NAME columns to the InstanceType CLI table output (both public and private APIs), so users can identify which InstanceTypes include GPU hardware at a glance. Uses CEL has() guards to safely render blank values for non-GPU InstanceTypes.

Changes

  • internal/rendering/tables/osac.public.v1.InstanceType.yaml — Added GPUS, GPU NAME columns between MEMORY and STATE
  • internal/rendering/tables/osac.private.v1.InstanceType.yaml — Same GPU columns for the private/admin API
  • internal/rendering/table_renderer_test.go — Added "Optional GPU columns" test block verifying GPU-enabled and non-GPU InstanceType rendering; hoisted shared renderInstanceTypes helper

Example Output

image

Testing

  • Unit tests: 2 new specs in "Optional GPU columns" block — GPU-enabled rendering and non-GPU blank columns
  • CEL compilation: Existing "Compiles CEL expressions successfully for all table definitions" test covers nil-safety of has() guards for both public and private YAMLs
  • Integration tests: Not affected — no API or server changes, table rendering only

Acceptance Criteria

  • AC-1: InstanceType CLI table includes GPUS and GPU NAME columns
  • AC-2: GPU columns appear between MEMORY and STATE columns
  • AC-3: Non-GPU InstanceTypes show 0 / - in GPU columns
  • AC-4: GPU-enabled InstanceTypes show count and resource_name

Summary by CodeRabbit

  • New Features
    • Added GPU count and GPU resource name columns to instance type tables.
    • Displays configured GPU details for GPU-enabled instance types.
    • Shows 0 and - placeholders when GPU information is unavailable.

@openshift-ci-robot

openshift-ci-robot commented Aug 4, 2026 •

Copy link
Copy Markdown

@Tzif-Morgen: This pull request references OSAC-3160 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

OSAC-3160: Add GPU columns to InstanceType CLI table rendering

Jira: OSAC-3160
Story type: [DEV]

Summary

Adds GPU COUNT, GPU DEVICE, and GPU RESOURCE columns to the InstanceType CLI table output (both public and private APIs), so users can identify which InstanceTypes include GPU hardware at a glance. Uses CEL has() guards to safely render blank values for non-GPU InstanceTypes.

Changes

  • internal/rendering/tables/osac.public.v1.InstanceType.yaml — Added GPU COUNT, GPU DEVICE, GPU RESOURCE columns between MEMORY and STATE
  • internal/rendering/tables/osac.private.v1.InstanceType.yaml — Same GPU columns for the private/admin API
  • internal/rendering/table_renderer_test.go — Added "Optional GPU columns" test block verifying GPU-enabled and non-GPU InstanceType rendering; hoisted shared renderInstanceTypes helper

Testing

  • Unit tests: 2 new specs in "Optional GPU columns" block — GPU-enabled rendering and non-GPU blank columns
  • CEL compilation: Existing "Compiles CEL expressions successfully for all table definitions" test covers nil-safety of has() guards
  • Integration tests: Not affected — no API or server changes, table rendering only

Acceptance Criteria

  • AC-1: InstanceType CLI table includes GPU COUNT, GPU DEVICE, and GPU RESOURCE columns
  • AC-2: GPU columns appear between MEMORY and STATE columns
  • AC-3: Non-GPU InstanceTypes show 0 / - / - in GPU columns
  • AC-4: GPU-enabled InstanceTypes show count, pci_device_selector, and resource_name

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e2e768c1-39be-4589-ad09-86472f126b44

📥 Commits

Reviewing files that changed from the base of the PR and between 0d5b856 and 082c33e.

📒 Files selected for processing (3)
  • fulfillment-service/internal/rendering/table_renderer_test.go
  • fulfillment-service/internal/rendering/tables/osac.private.v1.InstanceType.yaml
  • fulfillment-service/internal/rendering/tables/osac.public.v1.InstanceType.yaml
🚧 Files skipped from review as they are similar to previous changes (3)
  • fulfillment-service/internal/rendering/tables/osac.public.v1.InstanceType.yaml
  • fulfillment-service/internal/rendering/tables/osac.private.v1.InstanceType.yaml
  • fulfillment-service/internal/rendering/table_renderer_test.go

Walkthrough

Instance type tables now include GPU count and resource name columns. Tests cover GPU-enabled instances and fallback values for instances without GPU configuration.

Changes

GPU instance type table rendering

Layer / File(s) Summary
Add GPU table columns
fulfillment-service/internal/rendering/tables/osac.private.v1.InstanceType.yaml, fulfillment-service/internal/rendering/tables/osac.public.v1.InstanceType.yaml
Both table definitions add GPU count and resource name columns. Missing GPU data renders 0 or -.
Validate GPU column rendering
fulfillment-service/internal/rendering/table_renderer_test.go
Tests reuse the instance-type rendering helper, update integer-column expectations, and verify GPU and non-GPU output.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: eliorerz, omer-vishlitzky

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the addition of GPU columns to InstanceType CLI table rendering.
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.
No-Hardcoded-Secrets ✅ Passed The complete PR delta adds only GPU table expressions and unit-test fixtures; scans found no credential names, embedded credentials, private-key material, or long base64/hex secrets.
No-Weak-Crypto ✅ Passed The complete OSAC-3160 diff only adds GPU table expressions and rendering tests; it adds no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons.
No-Injection-Vectors ✅ Passed The PR adds only static CEL expressions and test data; changed files contain no SQL concatenation, shell execution, eval/exec, pickle.loads, unsafe yaml.load, os.system, or dangerouslySetInnerHTML.
Container-Privileges ✅ Passed The PR changes only table-rendering Go tests and InstanceType CEL YAML; added-line scanning found no privileged, host namespace, SYS_ADMIN, root, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The PR adds GPU table output and buffered test fixtures only; the PR range adds no logging calls or sensitive literals, and the GPU resource name is infrastructure metadata, not a secret or PII.
Ai-Attribution ✅ Passed AI use is documented, and all four OSAC-3160 commits have Assisted-by: Claude Code; none has an AI Co-Authored-By trailer.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 `@fulfillment-service/internal/rendering/table_renderer_test.go`:
- Around line 202-250: Extend the “Optional GPU columns” coverage around
renderInstanceTypes to exercise the private InstanceType table as well as the
existing public type. Add equivalent GPU-enabled and non-GPU cases that verify
configured GPU values and the 0/- fallback output, or parameterize the test
helper to accept both API types while preserving the current assertions.
🪄 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: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 72ec578d-b431-44c8-8211-0bc29c7274ce

📥 Commits

Reviewing files that changed from the base of the PR and between 6b3599b and b98c7ba.

📒 Files selected for processing (3)
  • fulfillment-service/internal/rendering/table_renderer_test.go
  • fulfillment-service/internal/rendering/tables/osac.private.v1.InstanceType.yaml
  • fulfillment-service/internal/rendering/tables/osac.public.v1.InstanceType.yaml

Comment thread fulfillment-service/internal/rendering/table_renderer_test.go
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@ygalblum ygalblum left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/approve
/lgtm

@openshift-ci

openshift-ci Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Tzif-Morgen, ygalblum

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 Aug 9, 2026
Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Tzif <tmorgens@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Tzif <tmorgens@redhat.com>
… NAME

Remove the GPU DEVICE column (pci_device_selector) from the InstanceType
table — not useful at a glance. Rename GPU COUNT to GPUs and GPU RESOURCE
to GPU NAME for clarity.

Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Tzif <tmorgens@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Tzif <tmorgens@redhat.com>
@omer-vishlitzky

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Aug 10, 2026
@omer-vishlitzky
omer-vishlitzky merged commit 12ac434 into osac-project:main Aug 10, 2026
29 of 30 checks passed
eliorerz pushed a commit that referenced this pull request Sep 18, 2026
…-page

OSAC-3604: Storage Tiers list page

This branch was previously deployed

1 inactive deployment
e2e-test — 281b2802 Deployed Aug 10, 2026 by Tzif-Morgen via e2e-bmaas-full-install / e2e #1023
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.

4 participants