-
Notifications
You must be signed in to change notification settings - Fork 667
CONSOLE-4987: Conditionally render Guided Tour based on capability and disable it for Console E2E tests #15926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@krishagarwal278: This pull request references CONSOLE-4987 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 the "4.22.0" version, but no target version was set. DetailsIn 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. |
📝 WalkthroughWalkthroughAdds a new capability feature flag, Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
|
@krishagarwal278: This pull request references CONSOLE-4987 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 the "4.22.0" version, but no target version was set. DetailsIn 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/public/components/app.tsx (1)
169-196: Backend capability nameGuidedTourFeatureis not defined in the OpenShift API and will never be emitted.The code searches for a capability named
GuidedTourFeature, but the OpenShift API enum (vendor/github.com/openshift/api/operator/v1/types_console.go) only definesLightspeedButtonandGettingStartedBanneras validConsoleCapabilityNamevalues. The kubebuilder validation enforces this enum restriction, meaning:
- The backend will never emit a capability named
GuidedTourFeatureguidedTourCapabilitywill always beundefined- The logic
guidedTourCapability?.visibility?.state !== 'Disabled'will always evaluate totrue- The flag
CONSOLE_CAPABILITY_GUIDEDTOUR_IS_ENABLEDwill always be enabled, regardless of intentAdd
GuidedTourFeatureto theConsoleCapabilityNameenum in the OpenShift API types, update the kubebuilder validation enum constraint, and ensure the backend handles emitting this capability.
725889f to
f26a5b3
Compare
|
@krishagarwal278: This pull request references CONSOLE-4987 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 the "4.22.0" version, but no target version was set. DetailsIn 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/public/components/app.tsx (1)
175-196: Backend API sync required: 'GuidedTourFeature' capability not registered.The backend API definition (
vendor/github.com/openshift/api/operator/v1/types_console.go:138) only registers"LightspeedButton"and"GettingStartedBanner"as valid capabilities. The frontend is searching for"GuidedTourFeature"(line 176), which doesn't exist in the API spec and will never be returned by the server.The condition
guidedTourCapability?.visibility?.state !== 'Disabled'evaluates totruewhenguidedTourCapabilityis undefined, accidentally enabling the tour for backwards compatibility. However, this bypasses API validation and will break if the backend enforces the capability enum.The API types must be updated to include
"GuidedTourFeature"in the ConsoleCapabilityName enum (line 138 ofvendor/github.com/openshift/api/operator/v1/types_console.go), or this frontend code needs to be reverted.
|
/retest |
f26a5b3 to
ff9fa0b
Compare
ff9fa0b to
9feb299
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: krishagarwal278 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@krishagarwal278: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/retest |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.