Skip to content

fix: update Sonarcloud unit test configuration#82104

Open
dhaiducek wants to merge 2 commits into
openshift:mainfrom
dhaiducek:dynamic-scoring-sonar
Open

fix: update Sonarcloud unit test configuration#82104
dhaiducek wants to merge 2 commits into
openshift:mainfrom
dhaiducek:dynamic-scoring-sonar

Conversation

@dhaiducek

@dhaiducek dhaiducek commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Updates the Stolostron Dynamic Scoring Framework CI SonarCloud configuration for both main and release-5.1 to run Go unit tests against a properly initialized Kubernetes envtest environment. The SonarCloud job scripts now set HOME=/tmp, run make setup-envtest, derive ENVTEST_K8S_VERSION from the k8s.io/api module version, generate KUBEBUILDER_ASSETS, and compute SONAR_GO_TEST_ARGS from go list ./... while excluding e2e packages. The pipelines also introduce and wire a Go 1.26 builder image (stolostron_builder_go1.26-linux) for these builds.

Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
@openshift-ci
openshift-ci Bot requested review from mikeshng and tesshuflower July 17, 2026 19:41
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 1c8b4a94-fa9c-4498-b783-bb21e9ed1e9b

📥 Commits

Reviewing files that changed from the base of the PR and between 555a095 and 048f2fd.

⛔ Files ignored due to path filters (2)
  • ci-operator/jobs/stolostron/dynamic-scoring-framework/stolostron-dynamic-scoring-framework-main-presubmits.yaml is excluded by !ci-operator/jobs/**
  • ci-operator/jobs/stolostron/dynamic-scoring-framework/stolostron-dynamic-scoring-framework-release-5.1-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (2)
  • ci-operator/config/stolostron/dynamic-scoring-framework/stolostron-dynamic-scoring-framework-main.yaml
  • ci-operator/config/stolostron/dynamic-scoring-framework/stolostron-dynamic-scoring-framework-release-5.1.yaml

Walkthrough

The main and release CI configurations add a Go 1.26 builder image to controller and addon builds and extend SonarCloud workflows with envtest initialization, Kubernetes API version detection, and filtered Go test arguments.

Changes

Dynamic scoring framework CI

Layer / File(s) Summary
Go 1.26 builder wiring
ci-operator/config/stolostron/dynamic-scoring-framework/stolostron-dynamic-scoring-framework-main.yaml, ci-operator/config/stolostron/dynamic-scoring-framework/stolostron-dynamic-scoring-framework-release-5.1.yaml
Both configurations define the stolostron_builder_go1.26-linux image and pass it as an optional input to the controller and addon image builds.
SonarCloud envtest setup
ci-operator/config/stolostron/dynamic-scoring-framework/stolostron-dynamic-scoring-framework-main.yaml, ci-operator/config/stolostron/dynamic-scoring-framework/stolostron-dynamic-scoring-framework-release-5.1.yaml
Both SonarCloud workflows set up envtest assets, derive ENVTEST_K8S_VERSION, define SELF, exclude e2e packages from SONAR_GO_TEST_ARGS, and invoke the existing Prow make target.

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

Possibly related PRs

Suggested labels: lgtm

Suggested reviewers: mikeshng, tesshuflower, amp-rh

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: updating Sonarcloud test configuration.
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.
Stable And Deterministic Test Names ✅ Passed PR only changes ci-operator YAML/job config; no Ginkgo test titles were added or changed, and no It/Describe/Context/When patterns appear in the diff.
Test Structure And Quality ✅ Passed No Ginkgo test code changed; the PR only updates ci-operator/job YAML, so the test-structure checklist is not applicable.
Microshift Test Compatibility ✅ Passed Only ci-operator YAML/job config changed; no new Ginkgo e2e tests or Go test files were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only CI/job YAML changed; no new Ginkgo e2e tests or SNO-sensitive assumptions were introduced.
Topology-Aware Scheduling Compatibility ✅ Passed Only ci-operator and Prow job YAML changed; no deployment manifests, controllers, or scheduling fields like affinity/nodeSelector were introduced.
Ote Binary Stdout Contract ✅ Passed Only ci-operator YAML/job configs changed; no Go binaries, TestMain, suite setup, or stdout-writing process code was touched.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS: Diff only updates ci-operator SonarCloud/config YAML and generated presubmits; no Go/Ginkgo e2e tests or hardcoded IP/public-host network calls were added.
No-Weak-Crypto ✅ Passed PASS: The PR only edits CI YAMLs; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons were added.
Container-Privileges ✅ Passed The only changed YAMLs add builder inputs and Sonar test commands; neither file contains privileged, hostPID/Network/IPC, SYS_ADMIN, root, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The new sonarcloud commands only export env vars and run make; no echo/set -x/printenv or secret values are logged.
✨ 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.

Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
@dhaiducek

Copy link
Copy Markdown
Contributor Author

/pj-rehearse auto-ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@dhaiducek: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci

openshift-ci Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhaiducek

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

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@dhaiducek: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-stolostron-dynamic-scoring-framework-release-5.1-images stolostron/dynamic-scoring-framework presubmit Ci-operator config changed
pull-ci-stolostron-dynamic-scoring-framework-release-5.1-sonarcloud stolostron/dynamic-scoring-framework presubmit Ci-operator config changed
pull-ci-stolostron-dynamic-scoring-framework-main-images stolostron/dynamic-scoring-framework presubmit Ci-operator config changed
pull-ci-stolostron-dynamic-scoring-framework-main-sonarcloud stolostron/dynamic-scoring-framework presubmit Ci-operator config changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@dhaiducek

Copy link
Copy Markdown
Contributor Author

/pj-rehearse ack

Looks like the new EnvTest setup is working. The Sonarcloud config hasn't been fast-forwarded to 5.1, so the failure there is expected.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@dhaiducek: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jul 17, 2026
@dhaiducek

Copy link
Copy Markdown
Contributor Author

/cc @rokej

@openshift-ci
openshift-ci Bot requested a review from rokej July 17, 2026 20:19
@openshift-ci

openshift-ci Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

@dhaiducek: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/stolostron/dynamic-scoring-framework/release-5.1/sonarcloud 048f2fd link unknown /pj-rehearse pull-ci-stolostron-dynamic-scoring-framework-release-5.1-sonarcloud

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant