Skip to content

OCPBUGS-95593: show OCP version in About modal for non-admin users - #16987

Open
savio87 wants to merge 1 commit into
openshift:mainfrom
savio87:OCPBUGS-95593
Open

OCPBUGS-95593: show OCP version in About modal for non-admin users#16987
savio87 wants to merge 1 commit into
openshift:mainfrom
savio87:OCPBUGS-95593

Conversation

@savio87

@savio87 savio87 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes OCPBUGS-95593: Non-admin users see only the Kubernetes version in the About modal ("?" > "About"), but not the OpenShift version.

The About modal uses useClusterVersion() which watches the ClusterVersion resource via the K8s API. Non-admin users lack RBAC access to this resource, so the hook returns null and the OpenShift version is hidden.

The fix falls back to window.SERVER_FLAGS.releaseVersion, which is set by the console backend at startup and is available to all users regardless of RBAC. This pattern is already used elsewhere in the codebase (e.g. useTelemetry.ts).

Test plan

  • Admin users: version continues to come from ClusterVersion resource (with "Updating to..." state awareness)
  • Non-admin users: version falls back to SERVER_FLAGS.releaseVersion
  • Verify About modal shows OCP version for a non-admin user on a running cluster

Summary by CodeRabbit

  • Bug Fixes
    • The About modal now displays the OpenShift version using a fallback value when the cluster-derived version is unavailable.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 14, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@savio87: This pull request references Jira Issue OCPBUGS-95593, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

Fixes OCPBUGS-95593: Non-admin users see only the Kubernetes version in the About modal ("?" > "About"), but not the OpenShift version.

The About modal uses useClusterVersion() which watches the ClusterVersion resource via the K8s API. Non-admin users lack RBAC access to this resource, so the hook returns null and the OpenShift version is hidden.

The fix falls back to window.SERVER_FLAGS.releaseVersion, which is set by the console backend at startup and is available to all users regardless of RBAC. This pattern is already used elsewhere in the codebase (e.g. useTelemetry.ts).

Test plan

  • Admin users: version continues to come from ClusterVersion resource (with "Updating to..." state awareness)
  • Non-admin users: version falls back to SERVER_FLAGS.releaseVersion
  • Verify About modal shows OCP version for a non-admin user on a running cluster

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.

@openshift-ci
openshift-ci Bot requested review from Leo6Leo and rhamilto August 14, 2026 09:23
@openshift-ci openshift-ci Bot added the component/core Related to console core functionality label Aug 14, 2026
@openshift-ci

openshift-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: savio87
Once this PR has been reviewed and has the lgtm label, please assign vojtechszocs for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: cad866b5-b095-44fb-86d3-58083d07035b

📥 Commits

Reviewing files that changed from the base of the PR and between 85e1584 and f2ab0f2.

📒 Files selected for processing (1)
  • frontend/public/components/about-modal.tsx

Walkthrough

The About modal now uses window.SERVER_FLAGS.releaseVersion when the cluster-derived OpenShift version is unavailable.

Changes

About modal version display

Layer / File(s) Summary
OpenShift version fallback
frontend/public/components/about-modal.tsx
The modal falls back to window.SERVER_FLAGS.releaseVersion when getOpenShiftVersion(clusterVersion) returns a falsy value.

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

Merge Risk: ⚪ Minimal · up to f2ab0

The About modal now has a fallback that lets non-admin users see the OpenShift version while preserving the existing admin update-state behavior. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: leo6leo, rhamilto, logonoff

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the root cause, solution, and partial test plan, but it omits most required template sections, including screenshots, setup, browser conformance, additional info, and reviewers. Use the required headings and complete each section, including screenshots status, test setup, browser checks, additional information, and reviewers or assignees.
✅ Passed checks (14 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies the Jira issue and clearly states the primary fix: showing the OpenShift version for non-admin users.
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 The diff changes only about-modal.tsx to add a releaseVersion fallback. It adds no Ginkgo tests or dynamic test titles.
Test Structure And Quality ✅ Passed The pull request changes only frontend/public/components/about-modal.tsx and adds no Ginkgo test code, so these test-structure requirements do not apply.
Microshift Test Compatibility ✅ Passed The HEAD diff changes only frontend/public/components/about-modal.tsx and adds no Ginkgo e2e tests or test constructs, so MicroShift test compatibility does not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The parent-to-HEAD diff changes only frontend/public/components/about-modal.tsx; it adds no Ginkgo e2e tests or multi-node assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed The diff changes only a frontend About modal expression; it adds no deployment manifests, operators, controllers, replicas, affinity, topology spread, selectors, tolerations, or PDBs.
Ote Binary Stdout Contract ✅ Passed The PR diff contains only a frontend TSX version fallback; it adds no OTE binary code, process-level setup, or stdout write.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The commit changes only frontend/public/components/about-modal.tsx and adds no Ginkgo e2e tests or network-dependent test code; the check is not applicable.
No-Weak-Crypto ✅ Passed The PR only adds a SERVER_FLAGS.releaseVersion fallback in about-modal.tsx; the diff introduces no weak cryptography, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed The pull request changes only about-modal.tsx. The diff adds no container/Kubernetes manifest or privilege setting such as privileged, hostPID, SYS_ADMIN, or allowPrivilegeEscalation.
No-Sensitive-Data-In-Logs ✅ Passed The diff only adds a releaseVersion UI fallback. No logging calls were added, and releaseVersion is a server-provided version string, not sensitive log data.
✨ 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.

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 14, 2026
@openshift-ci

openshift-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Hi @savio87. Thanks for your PR.

I'm waiting for a openshift 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.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

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.

@savio87

savio87 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 14, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@savio87: This pull request references Jira Issue OCPBUGS-95593, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

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.

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@savio87: This pull request references Jira Issue OCPBUGS-95593, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Summary

Fixes OCPBUGS-95593: Non-admin users see only the Kubernetes version in the About modal ("?" > "About"), but not the OpenShift version.

The About modal uses useClusterVersion() which watches the ClusterVersion resource via the K8s API. Non-admin users lack RBAC access to this resource, so the hook returns null and the OpenShift version is hidden.

The fix falls back to window.SERVER_FLAGS.releaseVersion, which is set by the console backend at startup and is available to all users regardless of RBAC. This pattern is already used elsewhere in the codebase (e.g. useTelemetry.ts).

Test plan

  • Admin users: version continues to come from ClusterVersion resource (with "Updating to..." state awareness)
  • Non-admin users: version falls back to SERVER_FLAGS.releaseVersion
  • Verify About modal shows OCP version for a non-admin user on a running cluster

Summary by CodeRabbit

  • Bug Fixes
  • Improved the About modal’s OpenShift version display by using the server-provided release version when the cluster version is unavailable.

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

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Caution

CodeRabbit couldn't update its existing comment. The review summary may be out of date.

Error details
putComment timed out

@savio87

savio87 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

Labels

component/core Related to console core functionality jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants