Skip to content

CM-871: Updates featuregate check to include OpenShift/MicroShift featureset#383

Open
bharath-b-rh wants to merge 2 commits intoopenshift:masterfrom
bharath-b-rh:cm-871
Open

CM-871: Updates featuregate check to include OpenShift/MicroShift featureset#383
bharath-b-rh wants to merge 2 commits intoopenshift:masterfrom
bharath-b-rh:cm-871

Conversation

@bharath-b-rh
Copy link
Contributor

@bharath-b-rh bharath-b-rh commented Mar 17, 2026

Summary

Extends the TrustManager feature gate logic so it works on both OpenShift and MicroShift. The operator still requires an allowed cluster feature set and --unsupported-addon-features=TrustManager=true; the way the feature set is read is now platform-specific.

Changes

OpenShift

  • TrustManager is allowed when:
    • The featuregates.config.openshift.io CRD exists,
    • The cluster FeatureGate (featuregates.config.openshift.io/cluster) has spec.featureSet in CustomNoUpgrade, DevPreviewNoUpgrade, TechPreviewNoUpgrade, or OKD,
    • And --unsupported-addon-features=TrustManager=true is set.

MicroShift

  • MicroShift is detected by the presence of /etc/microshift/config.yaml.
  • On MicroShift, the feature set is read from the config file: apiServer.featureGates.featureSet (aligned with Enabling User Specified FeatureGates).
  • The same feature set values are allowed: CustomNoUpgrade, DevPreviewNoUpgrade, TechPreviewNoUpgrade. If the file or section is missing or invalid, TrustManager stays disabled.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 17, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 17, 2026

@bharath-b-rh: This pull request references CM-871 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 story to target either version "4.22." or "openshift-4.22.", but it targets "cert-manager-1.19" instead.

Details

In response to this:

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
Copy link

coderabbitai bot commented Mar 17, 2026

Walkthrough

Adds OpenShift/MicroShift feature-gate detection and public APIs to configure and query feature gates; replaces featuregate.* types with k8sfeaturegate.*; moves controller-runtime logger initialization to operator starter; updates operator startup to use new feature-gate helpers; expands unit and e2e tests for feature-set and TrustManager behavior.

Changes

Cohort / File(s) Summary
Feature gate core & tests
pkg/features/features.go, pkg/features/features_test.go
Replaced featuregate.* types with k8sfeaturegate.*. Added public APIs: SetupWithFlagValue, IsIstioCSRFeatureGateEnabled, IsTrustManagerFeatureGateEnabled. Implemented OpenShift CRD discovery, MicroShift config parsing, feature-set evaluation, and extensive unit tests with fake discovery and test server utilities.
Operator initialization
pkg/operator/.../setup_manager.go, pkg/operator/starter.go
Removed logger init from setup_manager.go; added early ctrl.SetLogger(klog.NewKlogr()) in starter.go. Replaced inline feature-gate checks with calls to the new features package helpers. Minor comment/trailing punctuation tweaks.
End-to-end tests
test/e2e/trustmanager_test.go
Refactored tests to accept SpecContext/context parameters, updated readiness helpers to use context, added TechPreview suite env var setup/restore, added a new suite for Default feature set behavior, and adjusted setup/teardown to patch UNSUPPORTED_ADDON_FEATURES.
E2E test utilities
test/e2e/utils_test.go
Added getSubscriptionEnvVar and waitForDeploymentEnvVarRemovedAndRollout helpers used by the updated e2e suites for reading Subscription env vars and ensuring deployment rollouts after env var changes.
Manifests & modules
manifest_file, go.mod
Updated manifest and module dependencies to accommodate new imports and test scaffolding.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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

@openshift-ci openshift-ci bot requested review from lunarwhite and swghosh March 17, 2026 11:41
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 17, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bharath-b-rh

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 Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 17, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/features/features.go`:
- Around line 191-194: The discovery call using
discoveryClient.ServerPreferredResources() treats any err as fatal and disables
TrustManager; instead, detect partial-discovery errors
(discovery.ErrGroupDiscoveryFailed) and only fail on genuine discovery failures.
Update the handling around resources, err returned by
ServerPreferredResources(): if err is non-nil and is not errors.Is(err,
discovery.ErrGroupDiscoveryFailed) then return the error, but if it is
ErrGroupDiscoveryFailed log or warn and continue using the returned resources to
decide TrustManager; import and use k8s.io/apimachinery/pkg/util/errors or
k8s.io/client-go/discovery to check ErrGroupDiscoveryFailed and ensure
TrustManager logic uses the available resources list rather than bailing out on
partial errors.

In `@test/e2e/trustmanager_test.go`:
- Around line 187-190: The comment above the Describe block "TrustManager with
Default feature set" incorrectly suggests using
E2E_GINKGO_LABEL_FILTER=Feature:TrustManager to exclude TechPreview; update the
comment and test labels so the Default suite does not share the same
Label("Feature:TrustManager") as the TechPreview suite: either change the
suggested filter to "E2E_GINKGO_LABEL_FILTER=Feature:TrustManager &&
!TechPreview" in the comment, or give this Describe a distinct label (e.g.,
Label("Feature:TrustManagerDefault")) and update the comment to recommend that
unique label; ensure you modify the Describe invocation that currently contains
Label("Feature:TrustManager") and the corresponding comment text.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a1fcc4dd-f1be-44bc-874a-17e7c448e989

📥 Commits

Reviewing files that changed from the base of the PR and between 8eb5d9e and dc5c6e8.

📒 Files selected for processing (5)
  • pkg/features/features.go
  • pkg/features/features_test.go
  • pkg/operator/setup_manager.go
  • pkg/operator/starter.go
  • test/e2e/trustmanager_test.go

@bharath-b-rh
Copy link
Contributor Author

/test e2e-operator-tech-preview

@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 18, 2026

@bharath-b-rh: This pull request references CM-871 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 story to target either version "4.22." or "openshift-4.22.", but it targets "cert-manager-1.19" instead.

Details

In response to this:

Summary

Extends the TrustManager feature gate logic so it works on both OpenShift and MicroShift. The operator still requires an allowed cluster feature set and --unsupported-addon-features=TrustManager=true; the way the feature set is read is now platform-specific.

Changes

OpenShift

  • TrustManager is allowed when:
  • The featuregates.config.openshift.io CRD exists,
  • The cluster FeatureGate (featuregates.config.openshift.io/cluster) has spec.featureSet in CustomNoUpgrade, DevPreviewNoUpgrade, TechPreviewNoUpgrade, or OKD,
  • And --unsupported-addon-features=TrustManager=true is set.

MicroShift

  • MicroShift is detected by the presence of /etc/microshift/config.yaml.
  • On MicroShift, the feature set is read from the config file: apiServer.featureGates.featureSet (aligned with Enabling User Specified FeatureGates).
  • The same feature set values are allowed: CustomNoUpgrade, DevPreviewNoUpgrade, TechPreviewNoUpgrade. If the file or section is missing or invalid, TrustManager stays disabled.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
pkg/features/features.go (1)

43-48: Consider using typed constant for "OKD" feature set.

The "OKD" string at line 47 is a magic string, unlike the other feature sets which use typed constants from ocpfeaturegate. If OKD is not defined in the OpenShift API, consider defining a local constant for consistency and to prevent typos.

♻️ Suggested improvement
+// FeatureSetOKD is the OKD feature set value (not defined in openshift/api).
+const FeatureSetOKD ocpfeaturegate.FeatureSet = "OKD"
+
 var allowedTrustManagerFeatureSets = sets.New[ocpfeaturegate.FeatureSet](
 	ocpfeaturegate.CustomNoUpgrade,
 	ocpfeaturegate.DevPreviewNoUpgrade,
 	ocpfeaturegate.TechPreviewNoUpgrade,
-	"OKD",
+	FeatureSetOKD,
 )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/features/features.go` around lines 43 - 48,
allowedTrustManagerFeatureSets currently contains a magic string "OKD" alongside
typed constants of type ocpfeaturegate.FeatureSet; define a local typed constant
(e.g., const OKDFeatureSet ocpfeaturegate.FeatureSet = "OKD") and replace the
plain "OKD" entry in the allowedTrustManagerFeatureSets set with that constant
to ensure type consistency and avoid typos when constructing the set in
pkg/features/features.go (look for allowedTrustManagerFeatureSets and
ocpfeaturegate.FeatureSet).
test/e2e/trustmanager_test.go (1)

244-248: Consider using Consistently for absence verification.

Using Eventually to verify that a resource does NOT exist will pass immediately if the resource is absent. For stronger verification that the ServiceAccount remains absent over time (not just initially missing), consider using Consistently instead.

♻️ Suggested improvement
 		By("verifying ServiceAccount is not created (TrustManager controller is not enabled for Default feature set)")
-		Eventually(func(g Gomega) {
+		Consistently(func(g Gomega) {
 			_, err := clientset.CoreV1().ServiceAccounts(trustManagerNamespace).Get(ctx, trustManagerServiceAccountName, metav1.GetOptions{})
 			g.Expect(apierrors.IsNotFound(err)).To(BeTrue(), "ServiceAccount %s/%s must not exist when cluster feature set is Default", trustManagerNamespace, trustManagerServiceAccountName)
 		}, lowTimeout, fastPollInterval).Should(Succeed())
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/trustmanager_test.go` around lines 244 - 248, The test currently
uses Eventually to assert absence of the ServiceAccount via
clientset.CoreV1().ServiceAccounts(trustManagerNamespace).Get(...), which can
pass immediately if the resource is absent; replace this check with Consistently
to ensure the ServiceAccount remains absent for the duration. Update the block
that calls Eventually(func(g Gomega) { _, err :=
clientset.CoreV1().ServiceAccounts(trustManagerNamespace).Get(ctx,
trustManagerServiceAccountName, metav1.GetOptions{});
g.Expect(apierrors.IsNotFound(err)).To(BeTrue(), ...) }, lowTimeout,
fastPollInterval).Should(Succeed()) to use Consistently with an appropriate
duration and poll interval, keeping the same Get call and IsNotFound assertion
and retaining trustManagerNamespace and trustManagerServiceAccountName.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/features/features_test.go`:
- Around line 232-235: The defer currently calls SetupWithFlagValue("") which is
a no-op and doesn't reset TrustManager; modify the test teardown to explicitly
reset the mutable feature gate (e.g. call
mutableFeatureGate.Set(featuregates.TrustManager, false) or reinitialize a fresh
feature gate via SetupWithFlagValue with an explicit "TrustManager=false" value)
so TrustManager is disabled after the test; locate calls to SetupWithFlagValue
and mutableFeatureGate.Set in the test and replace the defer with an explicit
reset to TrustManager=false (or recreate the gate) to avoid test pollution.
- Around line 216-226: The test currently expects isCRDInstalled to return an
error when discovery returns a partial result, but the implementation returns
(true, nil) if the partial resources include the target CRD; update the test so
the fakeDiscoveryWithPartialResult supplies an APIResourceList that includes the
target CRD name (openshiftFeatureGateCRDName) and assert ok == true and err ==
nil (instead of require.Error and assert.False). Ensure the call still uses
isCRDInstalled and openshiftFeatureGateCRDGroupVersion so the test reflects the
intended partial-result success path.

In `@pkg/features/features.go`:
- Around line 191-199: The behavior for handling partial discovery results
currently lets partial resources pass but the test expects an error; update
isCRDInstalled to match the test by treating any error from
discoveryClient.ServerPreferredResources() as fatal: if err != nil { return
false, fmt.Errorf("failed to discover resources: %w", err) } (remove the
special-case that only returns on empty resources) and update the outdated
comment to reflect that any discovery error causes an immediate return; ensure
the log.V(1).Info call is removed or adjusted accordingly since it will no
longer be reached in isCRDInstalled.

---

Nitpick comments:
In `@pkg/features/features.go`:
- Around line 43-48: allowedTrustManagerFeatureSets currently contains a magic
string "OKD" alongside typed constants of type ocpfeaturegate.FeatureSet; define
a local typed constant (e.g., const OKDFeatureSet ocpfeaturegate.FeatureSet =
"OKD") and replace the plain "OKD" entry in the allowedTrustManagerFeatureSets
set with that constant to ensure type consistency and avoid typos when
constructing the set in pkg/features/features.go (look for
allowedTrustManagerFeatureSets and ocpfeaturegate.FeatureSet).

In `@test/e2e/trustmanager_test.go`:
- Around line 244-248: The test currently uses Eventually to assert absence of
the ServiceAccount via
clientset.CoreV1().ServiceAccounts(trustManagerNamespace).Get(...), which can
pass immediately if the resource is absent; replace this check with Consistently
to ensure the ServiceAccount remains absent for the duration. Update the block
that calls Eventually(func(g Gomega) { _, err :=
clientset.CoreV1().ServiceAccounts(trustManagerNamespace).Get(ctx,
trustManagerServiceAccountName, metav1.GetOptions{});
g.Expect(apierrors.IsNotFound(err)).To(BeTrue(), ...) }, lowTimeout,
fastPollInterval).Should(Succeed()) to use Consistently with an appropriate
duration and poll interval, keeping the same Get call and IsNotFound assertion
and retaining trustManagerNamespace and trustManagerServiceAccountName.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c00f5dfa-d172-4bc4-b88f-80e8d4bf3c11

📥 Commits

Reviewing files that changed from the base of the PR and between dc5c6e8 and ac0399f.

📒 Files selected for processing (5)
  • pkg/features/features.go
  • pkg/features/features_test.go
  • pkg/operator/setup_manager.go
  • pkg/operator/starter.go
  • test/e2e/trustmanager_test.go

@bharath-b-rh
Copy link
Contributor Author

bharath-b-rh commented Mar 18, 2026

Depends on openshift/release#76300

…tureset

Signed-off-by: Bharath B <bhb@redhat.com>
@bharath-b-rh
Copy link
Contributor Author

/test ci/prow/fips-image-scan-cert-manager

@bharath-b-rh
Copy link
Contributor Author

/test fips-image-scan-operator

@bharath-b-rh
Copy link
Contributor Author

/test fips-image-scan-cert-manager

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
pkg/features/features_test.go (1)

151-160: Make the platform split explicit in these tests.

Line 156 currently treats OKD as universally allowed, and the MicroShift coverage never asserts that featureSet: OKD stays disabled. That mirrors the implementation bug instead of catching it.

Suggested coverage update
-func TestAllowedTrustManagerFeatureSets(t *testing.T) {
+func TestAllowedTrustManagerFeatureSets(t *testing.T) {
 	assert.True(t, allowedTrustManagerFeatureSets.Has(ocpfeaturegate.CustomNoUpgrade), "CustomNoUpgrade should be allowed")
 	assert.True(t, allowedTrustManagerFeatureSets.Has(ocpfeaturegate.DevPreviewNoUpgrade), "DevPreviewNoUpgrade should be allowed")
 	assert.True(t, allowedTrustManagerFeatureSets.Has(ocpfeaturegate.TechPreviewNoUpgrade), "TechPreviewNoUpgrade should be allowed")
-	assert.True(t, allowedTrustManagerFeatureSets.Has(FeatureSetOKD), "OKD should be allowed")
+	assert.True(t, allowedOpenShiftTrustManagerFeatureSets.Has(FeatureSetOKD), "OKD should be allowed on OpenShift")
+	assert.False(t, allowedMicroShiftTrustManagerFeatureSets.Has(FeatureSetOKD), "OKD should not be allowed on MicroShift")
+	t.Run("returns false for OKD on MicroShift", func(t *testing.T) {
+		dir := t.TempDir()
+		configPath := filepath.Join(dir, "config.yaml")
+		require.NoError(t, os.WriteFile(configPath, []byte("apiServer:\n  featureGates:\n    featureSet: OKD\n"), 0644))
+		microshiftConfigPath = configPath
+		assert.False(t, isMicroShiftFeatureSetEnabled())
+	})

Also applies to: 347-390

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/features/features_test.go` around lines 151 - 160, Test treats OKD as
universally allowed; update TestAllowedTrustManagerFeatureSets to make the
platform split explicit by adding platform-aware assertions: locate
TestAllowedTrustManagerFeatureSets and the allowedTrustManagerFeatureSets
variable and modify the test to assert FeatureSetOKD is allowed only for
non-MicroShift platforms and explicitly assert FeatureSetOKD is not allowed for
MicroShift (e.g., add a sub-test or conditional check that when platform ==
"microshift" the allowedTrustManagerFeatureSets.Has(FeatureSetOKD) returns
false), and mirror this pattern for the other affected tests mentioned (lines
~347-390) so the tests fail if the implementation incorrectly enables OKD for
MicroShift.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/features/features.go`:
- Around line 42-50: The shared var allowedTrustManagerFeatureSets incorrectly
includes FeatureSetOKD (OpenShift-only) and is reused for MicroShift; remove
FeatureSetOKD from allowedTrustManagerFeatureSets and instead either (a) create
a separate allowedTrustManagerFeatureSetsForOpenShift that adds FeatureSetOKD
for the OpenShift path, or (b) keep allowedTrustManagerFeatureSets limited to
ocpfeaturegate.CustomNoUpgrade, DevPreviewNoUpgrade, TechPreviewNoUpgrade and
conditionally append FeatureSetOKD only when evaluating the OpenShift
feature-gate path; update any code that references
allowedTrustManagerFeatureSets for MicroShift/API server featureGates checks to
use the MicroShift-only set and ensure FeatureSetOKD remains referenced only by
the OpenShift-specific set or conditional.

In `@test/e2e/trustmanager_test.go`:
- Around line 49-58: The test enables the UNSUPPORTED_ADDON_FEATURES env var via
patchSubscriptionWithEnvVars and rollouts via waitForDeploymentEnvVarAndRollout
in the BeforeAll blocks but never restores the original value, leaking cluster
state; modify the suites to read and save the current UNSUPPORTED_ADDON_FEATURES
value before patching (e.g., via the same loader/subscription helper), then add
an AfterAll (or a deferred cleanup) that calls patchSubscriptionWithEnvVars to
restore the saved original value and waits for operator rollout again with
waitForDeploymentEnvVarAndRollout to ensure the operator returns to its prior
config; reference the existing functions patchSubscriptionWithEnvVars,
waitForDeploymentEnvVarAndRollout and the env var name
UNSUPPORTED_ADDON_FEATURES when implementing the save-and-restore cleanup.

---

Nitpick comments:
In `@pkg/features/features_test.go`:
- Around line 151-160: Test treats OKD as universally allowed; update
TestAllowedTrustManagerFeatureSets to make the platform split explicit by adding
platform-aware assertions: locate TestAllowedTrustManagerFeatureSets and the
allowedTrustManagerFeatureSets variable and modify the test to assert
FeatureSetOKD is allowed only for non-MicroShift platforms and explicitly assert
FeatureSetOKD is not allowed for MicroShift (e.g., add a sub-test or conditional
check that when platform == "microshift" the
allowedTrustManagerFeatureSets.Has(FeatureSetOKD) returns false), and mirror
this pattern for the other affected tests mentioned (lines ~347-390) so the
tests fail if the implementation incorrectly enables OKD for MicroShift.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a56b97ae-d37c-474b-b7cd-42cff580bfac

📥 Commits

Reviewing files that changed from the base of the PR and between ac0399f and 6896676.

📒 Files selected for processing (5)
  • pkg/features/features.go
  • pkg/features/features_test.go
  • pkg/operator/setup_manager.go
  • pkg/operator/starter.go
  • test/e2e/trustmanager_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/operator/starter.go

@chiragkyal
Copy link
Member

/assign

Signed-off-by: Bharath B <bhb@redhat.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
test/e2e/trustmanager_test.go (1)

289-292: Consider a shorter duration for Consistently assertion.

Using lowTimeout (3 minutes) for a Consistently check means the test waits 3 minutes to verify the ServiceAccount remains absent. A shorter duration (e.g., 30-60 seconds) would typically suffice to confirm the controller isn't creating the resource, reducing test execution time while still providing confidence.

-		Consistently(func(g Gomega) {
-			_, err := clientset.CoreV1().ServiceAccounts(trustManagerNamespace).Get(ctx, trustManagerServiceAccountName, metav1.GetOptions{})
-			g.Expect(apierrors.IsNotFound(err)).To(BeTrue(), "ServiceAccount %s/%s must not exist when cluster feature set is Default", trustManagerNamespace, trustManagerServiceAccountName)
-		}, lowTimeout, fastPollInterval).Should(Succeed())
+		Consistently(func(g Gomega) {
+			_, err := clientset.CoreV1().ServiceAccounts(trustManagerNamespace).Get(ctx, trustManagerServiceAccountName, metav1.GetOptions{})
+			g.Expect(apierrors.IsNotFound(err)).To(BeTrue(), "ServiceAccount %s/%s must not exist when cluster feature set is Default", trustManagerNamespace, trustManagerServiceAccountName)
+		}, 30*time.Second, fastPollInterval).Should(Succeed())
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/trustmanager_test.go` around lines 289 - 292, The Consistently check
currently uses lowTimeout (3 minutes) which is longer than necessary; update the
call to Consistently in trustmanager_test.go (the block invoking
clientset.CoreV1().ServiceAccounts(...).Get(...) inside Consistently(func(g
Gomega) { ... }, lowTimeout, fastPollInterval)) to use a shorter duration (e.g.,
30s or 60s) instead of lowTimeout, keeping the same poll interval
(fastPollInterval) and assertion body to reduce test runtime.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@test/e2e/trustmanager_test.go`:
- Around line 289-292: The Consistently check currently uses lowTimeout (3
minutes) which is longer than necessary; update the call to Consistently in
trustmanager_test.go (the block invoking
clientset.CoreV1().ServiceAccounts(...).Get(...) inside Consistently(func(g
Gomega) { ... }, lowTimeout, fastPollInterval)) to use a shorter duration (e.g.,
30s or 60s) instead of lowTimeout, keeping the same poll interval
(fastPollInterval) and assertion body to reduce test runtime.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 58c58aec-03c2-48de-bbb4-01f5a5e1e46c

📥 Commits

Reviewing files that changed from the base of the PR and between 6896676 and 0dac2a4.

📒 Files selected for processing (2)
  • test/e2e/trustmanager_test.go
  • test/e2e/utils_test.go

@bharath-b-rh
Copy link
Contributor Author

/test e2e-operator-tech-preview

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 20, 2026

@bharath-b-rh: 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/prow/e2e-operator-tech-preview 0dac2a4 link false /test e2e-operator-tech-preview

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants