Skip to content

fix(roxctl): default image flavor to opensource - #22754

Draft
wangyusheng1985 wants to merge 1 commit into
stackrox:masterfrom
wangyusheng1985:repo-agent/89ec6e4c-3029
Draft

fix(roxctl): default image flavor to opensource#22754
wangyusheng1985 wants to merge 1 commit into
stackrox:masterfrom
wangyusheng1985:repo-agent/89ec6e4c-3029

Conversation

@wangyusheng1985

Copy link
Copy Markdown

Description

Change roxctl's default --image-defaults value to opensource for both release and development builds. This avoids selecting build-dependent RHACS or development image repositories when the flag is omitted.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

  • Ran the focused regression test for AddImageDefaults.
  • Ran gofmt and the complete roxctl/common/flags package test suite.

Have you created automated tests for your change? Explain here which validation activities you did manually and why so.

The regression test verifies both the flag's displayed default and the destination value are opensource; the package test suite provides additional coverage for the affected flags package.

Validation observed for this change:

  • go test ./roxctl/common/flags -run TestAddImageDefaultsUsesOpenSourceByDefault -count=1
  • gofmt -w roxctl/common/flags/imageFlavor.go roxctl/common/flags/imageFlavor_test.go && go test ./roxctl/common/flags -count=1

Fixes #3029

Signed-off-by: wangyusheng1985 <wangyusheng1985@users.noreply.github.com>
@openshift-ci

openshift-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

Hi @wangyusheng1985. Thanks for your PR.

I'm waiting for a stackrox member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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 kubernetes-sigs/prow repository.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: 9a2c458d-814b-4cc8-b0e4-30e64b0de20c

📥 Commits

Reviewing files that changed from the base of the PR and between a387985 and 48a9df2.

📒 Files selected for processing (2)
  • roxctl/common/flags/imageFlavor.go
  • roxctl/common/flags/imageFlavor_test.go

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Changes
    • The default image flavor is now set to the open-source release flavor across builds.
    • Development builds no longer automatically override the default image flavor.
  • Tests
    • Added coverage verifying the image flavor flag uses the open-source flavor by default.

Walkthrough

roxctl now uses the open-source image flavor by default. The previous non-release build override was removed. A test verifies the flag default and bound variable.

Changes

Image flavor default

Layer / File(s) Summary
Default selection and validation
roxctl/common/flags/imageFlavor.go, roxctl/common/flags/imageFlavor_test.go
The image flavor default is now defaults.ImageFlavorNameOpenSource. The non-release build override was removed. Tests verify flag registration and variable initialization.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 48a9d

roxctl now consistently defaults omitted image settings to the open-source image flavor, with test coverage confirming the displayed and applied default. No current merge-blocking risk remains.

Suggested reviewers: guzalv

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: setting roxctl's default image flavor to opensource.
Description check ✅ Passed The description explains the change, documents testing, links the related issue, and completes the required sections. The unchecked CI inspection item is non-critical and does not prevent the descript…
Linked Issues check ✅ Passed The changes satisfy issue #3029 by setting roxctl's default image flavor to defaults.ImageFlavorNameOpenSource for release and development builds, with regression coverage.
Out of Scope Changes check ✅ Passed All changes are directly related to issue #3029. The implementation change and regression test support the requested default image flavor behavior.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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.

Update roxctl default to opensource

1 participant