Conversation
|
Skipping CI for Draft Pull Request. |
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis pull request removes OpenShift 3 support across the entire codebase, including Helm charts, cluster validation logic, roxctl tools, and test suites. OpenShift 3 clusters are now rejected during validation, while OpenShift 4 becomes the only supported OpenShift variant. Test schema references are updated from OpenShift 4.1.0 to 4.12. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ❌ 3❌ Failed checks (3 warnings)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Trivy (0.69.3)Failed to read Trivy output file: ENOENT: no such file or directory, open '/inmem/1274/nsjail-3a766c9a-c8d9-4f4f-aeac-d6c27dc3e0a2/merged/.trivy-output.json' 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (3)
central/telemetry/centralclient/client.go (1)
117-119: Inconsistency: code rejects OpenShift 3.x clusters but telemetry still reports deprecated enum value.OpenShift 3.x is explicitly rejected in validation logic (
pkg/cluster/validation.gorejects clusters with this type, stating "OpenShift 3.x is not supported anymore"). However, telemetry here continues using the deprecatedOPENSHIFT_CLUSTERenum instead ofOPENSHIFT4_CLUSTER.This same pattern appears in
sensor/kubernetes/telemetry/gatherers/cluster.goand other codebase locations still referencing the deprecated enum. Since OpenShift 3.x clusters won't be accepted by the system, the telemetry can safely migrate toOPENSHIFT4_CLUSTERto:
- Provide accurate metrics (no confusion about OpenShift 3 vs 4)
- Align with the system's actual support scope
- Remove deprecated enum usage across the codebase
Update to
OPENSHIFT4_CLUSTERand audit other locations using the deprecated enum value for consistency.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@central/telemetry/centralclient/client.go` around lines 117 - 119, Telemetry is reporting the deprecated enum value OPENSHIFT_CLUSTER while validation rejects OpenShift 3.x; change the value assigned to orchestrator from storage.ClusterType_OPENSHIFT_CLUSTER.String() to storage.ClusterType_OPENSHIFT4_CLUSTER.String() in the client.go code (update the orchestrator assignment), and audit other usages such as sensor/kubernetes/telemetry/gatherers/cluster.go to replace storage.ClusterType_OPENSHIFT_CLUSTER with storage.ClusterType_OPENSHIFT4_CLUSTER so telemetry accurately reflects OpenShift 4.x and removes the deprecated enum.image/embed_charts.go (1)
272-279: Return a specific error for deprecatedOPENSHIFT_CLUSTER.
OPENSHIFT_CLUSTERcurrently falls through to a generic “invalid cluster type” message. An explicit branch improves operator diagnostics and aligns with the new OpenShift 3 deprecation messaging.Proposed patch
func (i *Image) addScripts(values *charts.MetaValues) ([]*loader.BufferedFile, error) { if values.ClusterType == storage.ClusterType_KUBERNETES_CLUSTER.String() { return i.scripts(values, k8sScriptsFileMap) } else if values.ClusterType == storage.ClusterType_OPENSHIFT4_CLUSTER.String() { return i.scripts(values, osScriptsFileMap) + } else if values.ClusterType == storage.ClusterType_OPENSHIFT_CLUSTER.String() { + return nil, errors.Errorf("unable to create sensor bundle for cluster %s: OpenShift 3.x is not supported anymore", + values.ClusterName) } return nil, errors.Errorf("unable to create sensor bundle, invalid cluster type for cluster %s", values.ClusterName) }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@image/embed_charts.go` around lines 272 - 279, The current branch logic treats storage.ClusterType_OPENSHIFT_CLUSTER as falling through to a generic "invalid cluster type" error; update the branching in the function handling values.ClusterType to add an explicit else-if for storage.ClusterType_OPENSHIFT_CLUSTER.String() that returns a clear, specific deprecation error (e.g., indicating OpenShift 3 is deprecated and directing operators to upgrade), while keeping the existing OPENSHIFT4 and KUBERNETES branches (references: values.ClusterType, storage.ClusterType_OPENSHIFT_CLUSTER, storage.ClusterType_OPENSHIFT4_CLUSTER, storage.ClusterType_KUBERNETES_CLUSTER, and the error return at the end).pkg/helm/charts/tests/securedclusterservices/testdata/helmtest/scanner-slim.test.yaml (1)
20-22: Add a negative case asserting OpenShift 3 is rejected.This block now only tests OpenShift 4. Given the de-support change, keep a regression test that
env.openshift: 3fails.Proposed patch
tests: - name: "on openshift 4" + - name: "on openshift 3 should fail" + set: + env.openshift: 3 + expectError: true + expect: | + .error | assertThat(contains("OpenShift 3"))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pkg/helm/charts/tests/securedclusterservices/testdata/helmtest/scanner-slim.test.yaml` around lines 20 - 22, Add a negative test case next to the existing "on openshift 4" entry that sets env.openshift: 3 and asserts the chart/template fails validation; specifically, under the same tests: array add an entry with name "on openshift 3" and a values block containing env.openshift: 3 and an expectation that rendering or validation fails (e.g., expectFailure / shouldRender: false / an assert that error is returned) so the test suite verifies OpenShift 3 is rejected. Ensure the new test mirrors the structure of the "on openshift 4" entry but uses env.openshift: 3 and the negative assertion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@image/templates/helm/stackrox-secured-cluster/internal/cluster-config.yaml.tpl.htpl`:
- Around line 7-11: The template currently treats any truthy ._rox.env.openshift
as OPENSHIFT4_CLUSTER; change the conditional in cluster-config.yaml.tpl.htpl to
explicitly check for the OpenShift 4 value (e.g. eq ._rox.env.openshift "4" or
the exact token your config uses) and render type: OPENSHIFT4_CLUSTER only in
that case; if ._rox.env.openshift is set to any other non-empty/unsupported
value, fail fast with a clear error (use the template fail function) instead of
coercing, otherwise render type: KUBERNETES_CLUSTER when ._rox.env.openshift is
unset/false.
In
`@image/templates/helm/stackrox-secured-cluster/internal/compatibility-translation.yaml`:
- Around line 13-16: The current template env.openshift only tests eq .rawValue
"OPENSHIFT4_CLUSTER", which silently treats any other value (including legacy
"OPENSHIFT_CLUSTER") as false and yields KUBERNETES manifests; update the
template to explicitly validate .rawValue against allowed values and fail-fast
on unsupported inputs: change the env.openshift logic to a conditional that
returns true only for "OPENSHIFT4_CLUSTER", returns false only for the explicit
"KUBERNETES_CLUSTER" token (if used), and calls the template fail/required
helper with a clear error message when .rawValue is "OPENSHIFT_CLUSTER" or any
other unsupported string so the build errors instead of generating incorrect
manifests (refer to env.openshift, .rawValue and the
cluster-config.yaml.tpl.htpl usage).
In `@pkg/renderer/central_db_test.go`:
- Around line 209-210: The test is asserting the wrong error substring; update
the assertion in central_db_test.go (the failing block around
require.Error(suite.T(), err) / assert.Contains(...)) to look for the new
message from pkg/cluster/validation.go — e.g., assert that err.Error() contains
"OpenShift 3.x is not supported anymore" (or assert exact equality against the
full error string returned by the validation function) so the test matches the
updated validation text for storage.ClusterType_OPENSHIFT_CLUSTER.
In `@pkg/renderer/kubernetes_test.go`:
- Around line 133-134: The test in kubernetes_test.go is asserting the wrong
error message for storage.ClusterType_OPENSHIFT_CLUSTER; update the assertion to
match the actual rejection text emitted by pkg/cluster/validation.go (e.g.
assert.Contains(suite.T(), err.Error(), "OpenShift 3.x is not supported
anymore") or a substring like "OpenShift 3.x") so the negative test checks the
real error message produced by the validation path.
---
Nitpick comments:
In `@central/telemetry/centralclient/client.go`:
- Around line 117-119: Telemetry is reporting the deprecated enum value
OPENSHIFT_CLUSTER while validation rejects OpenShift 3.x; change the value
assigned to orchestrator from storage.ClusterType_OPENSHIFT_CLUSTER.String() to
storage.ClusterType_OPENSHIFT4_CLUSTER.String() in the client.go code (update
the orchestrator assignment), and audit other usages such as
sensor/kubernetes/telemetry/gatherers/cluster.go to replace
storage.ClusterType_OPENSHIFT_CLUSTER with
storage.ClusterType_OPENSHIFT4_CLUSTER so telemetry accurately reflects
OpenShift 4.x and removes the deprecated enum.
In `@image/embed_charts.go`:
- Around line 272-279: The current branch logic treats
storage.ClusterType_OPENSHIFT_CLUSTER as falling through to a generic "invalid
cluster type" error; update the branching in the function handling
values.ClusterType to add an explicit else-if for
storage.ClusterType_OPENSHIFT_CLUSTER.String() that returns a clear, specific
deprecation error (e.g., indicating OpenShift 3 is deprecated and directing
operators to upgrade), while keeping the existing OPENSHIFT4 and KUBERNETES
branches (references: values.ClusterType, storage.ClusterType_OPENSHIFT_CLUSTER,
storage.ClusterType_OPENSHIFT4_CLUSTER, storage.ClusterType_KUBERNETES_CLUSTER,
and the error return at the end).
In
`@pkg/helm/charts/tests/securedclusterservices/testdata/helmtest/scanner-slim.test.yaml`:
- Around line 20-22: Add a negative test case next to the existing "on openshift
4" entry that sets env.openshift: 3 and asserts the chart/template fails
validation; specifically, under the same tests: array add an entry with name "on
openshift 3" and a values block containing env.openshift: 3 and an expectation
that rendering or validation fails (e.g., expectFailure / shouldRender: false /
an assert that error is returned) so the test suite verifies OpenShift 3 is
rejected. Ensure the new test mirrors the structure of the "on openshift 4"
entry but uses env.openshift: 3 and the negative assertion.
🪄 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: Pro
Run ID: f1f523e8-18f5-42e9-bd9e-440fd30dc2d6
⛔ Files ignored due to path filters (3)
generated/storage/cluster.pb.gois excluded by!**/*.pb.go,!**/generated/**go.sumis excluded by!**/*.sumproto/storage/proto.lockis excluded by!**/*.lock
📒 Files selected for processing (48)
CHANGELOG.mdcentral/cluster/datastore/datastore_impl_postgres_test.gocentral/clusters/zip/render_test.gocentral/telemetry/centralclient/client.gogo.modimage/embed_charts.goimage/templates/helm/shared/templates/02-scanner-v4-01-security.yamlimage/templates/helm/shared/templates/_openshift.tplimage/templates/helm/stackrox-secured-cluster/internal/cluster-config.yaml.tpl.htplimage/templates/helm/stackrox-secured-cluster/internal/compatibility-translation.yamlimage/templates/helm/stackrox-secured-cluster/internal/defaults/30-base-config.yaml.htplimage/templates/helm/stackrox-secured-cluster/sensor-chart-upgrade.md.htplimage/templates/helm/stackrox-secured-cluster/templates/_init.tpl.htplimage/templates/helm/stackrox-secured-cluster/templates/admission-controller.yamlimage/templates/helm/stackrox-secured-cluster/values.yaml.htplpkg/cluster/validation.gopkg/cluster/validation_test.gopkg/helm/charts/tests/centralservices/testdata/helmtest/central.test.yamlpkg/helm/charts/tests/centralservices/testdata/helmtest/injected-cabundle-cm.test.yamlpkg/helm/charts/tests/centralservices/testdata/helmtest/openshift-auth.test.yamlpkg/helm/charts/tests/centralservices/testdata/helmtest/openshift-autosense.test.yamlpkg/helm/charts/tests/centralservices/testdata/helmtest/openshift-monitoring.test.yamlpkg/helm/charts/tests/centralservices/testdata/helmtest/scanner-v4.test.yamlpkg/helm/charts/tests/centralservices/testdata/helmtest/scanner.test.yamlpkg/helm/charts/tests/securedclusterservices/feature-flags/testdata/helmtest/admission-controller-config-disabled/admission-control.test.yamlpkg/helm/charts/tests/securedclusterservices/feature-flags/testdata/helmtest/admission-controller-config/admission-control.test.yamlpkg/helm/charts/tests/securedclusterservices/flavor/testdata/helmtest/development_build-non-release/development_build.test.yamlpkg/helm/charts/tests/securedclusterservices/flavor/testdata/helmtest/development_build-release/development_build.test.yamlpkg/helm/charts/tests/securedclusterservices/flavor/testdata/helmtest/opensource-non-release/opensource.test.yamlpkg/helm/charts/tests/securedclusterservices/flavor/testdata/helmtest/opensource-release/opensource.test.yamlpkg/helm/charts/tests/securedclusterservices/flavor/testdata/helmtest/override/override.test.yamlpkg/helm/charts/tests/securedclusterservices/flavor/testdata/helmtest/rhacs/rhacs.test.yamlpkg/helm/charts/tests/securedclusterservices/flavor/testdata/helmtest/stackrox/stackrox.test.yamlpkg/helm/charts/tests/securedclusterservices/testdata/helmtest/admission-control.test.yamlpkg/helm/charts/tests/securedclusterservices/testdata/helmtest/audit-logs.test.yamlpkg/helm/charts/tests/securedclusterservices/testdata/helmtest/env.test.yamlpkg/helm/charts/tests/securedclusterservices/testdata/helmtest/injected-cabundle-cm.test.yamlpkg/helm/charts/tests/securedclusterservices/testdata/helmtest/legacy-settings.test.yamlpkg/helm/charts/tests/securedclusterservices/testdata/helmtest/openshift-monitoring.test.yamlpkg/helm/charts/tests/securedclusterservices/testdata/helmtest/scanner-slim.test.yamlpkg/helm/charts/tests/securedclusterservices/testdata/helmtest/scanner-v4.test.yamlpkg/renderer/central_db_test.gopkg/renderer/kubernetes_test.goproto/storage/cluster.protoroxctl/central/generate/generate_test.goroxctl/central/generate/k8s.goroxctl/sensor/generate/openshift.gotests/roxctl/bats-tests/cluster/sensor-generate-bundle.bats
💤 Files with no reviewable changes (6)
- image/templates/helm/stackrox-secured-cluster/templates/_init.tpl.htpl
- central/cluster/datastore/datastore_impl_postgres_test.go
- image/templates/helm/stackrox-secured-cluster/values.yaml.htpl
- image/templates/helm/stackrox-secured-cluster/internal/defaults/30-base-config.yaml.htpl
- roxctl/central/generate/generate_test.go
- pkg/helm/charts/tests/securedclusterservices/feature-flags/testdata/helmtest/admission-controller-config/admission-control.test.yaml
| {{- if not ._rox.env.openshift }} | ||
| type: KUBERNETES_CLUSTER | ||
| {{- else }} | ||
| type: {{ if eq (int ._rox.env.openshift) 4 -}} OPENSHIFT4_CLUSTER {{- else -}} OPENSHIFT_CLUSTER {{ end }} | ||
| type: OPENSHIFT4_CLUSTER | ||
| {{- end }} |
There was a problem hiding this comment.
Avoid silently coercing non-4 OpenShift values to OPENSHIFT4_CLUSTER.
Current logic treats any truthy ._rox.env.openshift as OpenShift 4. That can mask unsupported values instead of failing fast.
Proposed patch
{{- if ._rox.clusterName }}
clusterName: {{ ._rox.clusterName }}
{{- end }}
managedBy: {{ ._rox.managedBy }}
clusterConfig:
staticConfig:
{{- if not ._rox.env.openshift }}
type: KUBERNETES_CLUSTER
- {{- else }}
+ {{- else if eq (toString ._rox.env.openshift) "4" }}
type: OPENSHIFT4_CLUSTER
+ {{- else }}
+ {{- fail (printf "Unsupported env.openshift value %v: OpenShift 3.x is not supported anymore" ._rox.env.openshift) }}
{{- end }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| {{- if not ._rox.env.openshift }} | |
| type: KUBERNETES_CLUSTER | |
| {{- else }} | |
| type: {{ if eq (int ._rox.env.openshift) 4 -}} OPENSHIFT4_CLUSTER {{- else -}} OPENSHIFT_CLUSTER {{ end }} | |
| type: OPENSHIFT4_CLUSTER | |
| {{- end }} | |
| {{- if not ._rox.env.openshift }} | |
| type: KUBERNETES_CLUSTER | |
| {{- else if eq (toString ._rox.env.openshift) "4" }} | |
| type: OPENSHIFT4_CLUSTER | |
| {{- else }} | |
| {{- fail (printf "Unsupported env.openshift value %v: OpenShift 3.x is not supported anymore" ._rox.env.openshift) }} | |
| {{- end }} |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@image/templates/helm/stackrox-secured-cluster/internal/cluster-config.yaml.tpl.htpl`
around lines 7 - 11, The template currently treats any truthy
._rox.env.openshift as OPENSHIFT4_CLUSTER; change the conditional in
cluster-config.yaml.tpl.htpl to explicitly check for the OpenShift 4 value (e.g.
eq ._rox.env.openshift "4" or the exact token your config uses) and render type:
OPENSHIFT4_CLUSTER only in that case; if ._rox.env.openshift is set to any other
non-empty/unsupported value, fail fast with a clear error (use the template fail
function) instead of coercing, otherwise render type: KUBERNETES_CLUSTER when
._rox.env.openshift is unset/false.
| type: | | ||
| env: | ||
| openshift: {{ if eq .rawValue "OPENSHIFT4_CLUSTER" }} 4 {{ else }} {{ eq .rawValue "OPENSHIFT_CLUSTER" }} {{ end }} | ||
| openshift: {{ eq .rawValue "OPENSHIFT4_CLUSTER" }} | ||
There was a problem hiding this comment.
Unsupported OPENSHIFT_CLUSTER is now silently translated to Kubernetes.
Line 15 maps every non-OPENSHIFT4_CLUSTER value to false. In image/templates/helm/stackrox-secured-cluster/internal/cluster-config.yaml.tpl.htpl (Lines 5-11), that resolves to type: KUBERNETES_CLUSTER.
This means legacy OPENSHIFT_CLUSTER input can produce incorrect manifests instead of a hard failure.
Proposed fail-fast fix
cluster:
name: |
clusterName: {{ .value }}
type: |
- env:
- openshift: {{ eq .rawValue "OPENSHIFT4_CLUSTER" }}
+ {{- if eq .rawValue "OPENSHIFT4_CLUSTER" }}
+ env:
+ openshift: true
+ {{- else if eq .rawValue "OPENSHIFT_CLUSTER" }}
+ {{- fail "cluster.type=OPENSHIFT_CLUSTER is no longer supported; use OPENSHIFT4_CLUSTER" }}
+ {{- else }}
+ env:
+ openshift: false
+ {{- end }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| type: | | |
| env: | |
| openshift: {{ if eq .rawValue "OPENSHIFT4_CLUSTER" }} 4 {{ else }} {{ eq .rawValue "OPENSHIFT_CLUSTER" }} {{ end }} | |
| openshift: {{ eq .rawValue "OPENSHIFT4_CLUSTER" }} | |
| type: | | |
| {{- if eq .rawValue "OPENSHIFT4_CLUSTER" }} | |
| env: | |
| openshift: true | |
| {{- else if eq .rawValue "OPENSHIFT_CLUSTER" }} | |
| {{- fail "cluster.type=OPENSHIFT_CLUSTER is no longer supported; use OPENSHIFT4_CLUSTER" }} | |
| {{- else }} | |
| env: | |
| openshift: false | |
| {{- end }} | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@image/templates/helm/stackrox-secured-cluster/internal/compatibility-translation.yaml`
around lines 13 - 16, The current template env.openshift only tests eq .rawValue
"OPENSHIFT4_CLUSTER", which silently treats any other value (including legacy
"OPENSHIFT_CLUSTER") as false and yields KUBERNETES manifests; update the
template to explicitly validate .rawValue against allowed values and fail-fast
on unsupported inputs: change the env.openshift logic to a conditional that
returns true only for "OPENSHIFT4_CLUSTER", returns false only for the explicit
"KUBERNETES_CLUSTER" token (if used), and calls the template fail/required
helper with a clear error message when .rawValue is "OPENSHIFT_CLUSTER" or any
other unsupported string so the build errors instead of generating incorrect
manifests (refer to env.openshift, .rawValue and the
cluster-config.yaml.tpl.htpl usage).
| require.Error(suite.T(), err) | ||
| assert.Contains(suite.T(), err.Error(), "You have specified OpenShift version 3") |
There was a problem hiding this comment.
Assertion is checking the wrong error message.
pkg/cluster/validation.go now reports OpenShift 3.x is not supported anymore for storage.ClusterType_OPENSHIFT_CLUSTER, so this substring check is brittle and likely fails against the current renderer path.
Proposed fix
- require.Error(suite.T(), err)
- assert.Contains(suite.T(), err.Error(), "You have specified OpenShift version 3")
+ require.ErrorContains(suite.T(), err, "OpenShift 3.x is not supported anymore")📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| require.Error(suite.T(), err) | |
| assert.Contains(suite.T(), err.Error(), "You have specified OpenShift version 3") | |
| require.ErrorContains(suite.T(), err, "OpenShift 3.x is not supported anymore") |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pkg/renderer/central_db_test.go` around lines 209 - 210, The test is
asserting the wrong error substring; update the assertion in central_db_test.go
(the failing block around require.Error(suite.T(), err) / assert.Contains(...))
to look for the new message from pkg/cluster/validation.go — e.g., assert that
err.Error() contains "OpenShift 3.x is not supported anymore" (or assert exact
equality against the full error string returned by the validation function) so
the test matches the updated validation text for
storage.ClusterType_OPENSHIFT_CLUSTER.
| require.Error(suite.T(), err) | ||
| assert.Contains(suite.T(), err.Error(), "You have specified OpenShift version 3") |
There was a problem hiding this comment.
This negative test is pinned to the wrong error text.
For storage.ClusterType_OPENSHIFT_CLUSTER, pkg/cluster/validation.go currently emits OpenShift 3.x is not supported anymore, so this assertion is likely to fail even though the rejection path is working.
Proposed fix
- require.Error(suite.T(), err)
- assert.Contains(suite.T(), err.Error(), "You have specified OpenShift version 3")
+ require.ErrorContains(suite.T(), err, "OpenShift 3.x is not supported anymore")📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| require.Error(suite.T(), err) | |
| assert.Contains(suite.T(), err.Error(), "You have specified OpenShift version 3") | |
| require.ErrorContains(suite.T(), err, "OpenShift 3.x is not supported anymore") |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pkg/renderer/kubernetes_test.go` around lines 133 - 134, The test in
kubernetes_test.go is asserting the wrong error message for
storage.ClusterType_OPENSHIFT_CLUSTER; update the assertion to match the actual
rejection text emitted by pkg/cluster/validation.go (e.g.
assert.Contains(suite.T(), err.Error(), "OpenShift 3.x is not supported
anymore") or a substring like "OpenShift 3.x") so the negative test checks the
real error message produced by the validation path.
🚀 Build Images ReadyImages are ready for commit 993ba4f. To use with deploy scripts: export MAIN_IMAGE_TAG=4.11.x-642-g993ba4fc6b |
…openshift.io/v1 (openshift 4 only).
Adjust computation in central/graphql/resolvers/cluster_vulnerabilities_postgres_test.go
… given the new validation
d65dd89 to
993ba4f
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #19937 +/- ##
==========================================
- Coverage 49.56% 49.56% -0.01%
==========================================
Files 2764 2764
Lines 208346 208330 -16
==========================================
- Hits 103271 103260 -11
+ Misses 97423 97420 -3
+ Partials 7652 7650 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/test all |
Description
change me!
User-facing documentation
Testing and quality
Automated testing
How I validated my change
change me!