Skip to content

OCPBUGS-95590: Hide Builds and ImageStreams nav items when Build capability is disabled - #16613

Open
sampadasawant-36 wants to merge 1 commit into
openshift:release-4.20from
sampadasawant-36:CONSOLE-5140-hide-builds-nav-when-capability-disabled
Open

OCPBUGS-95590: Hide Builds and ImageStreams nav items when Build capability is disabled#16613
sampadasawant-36 wants to merge 1 commit into
openshift:release-4.20from
sampadasawant-36:CONSOLE-5140-hide-builds-nav-when-capability-disabled

Conversation

@sampadasawant-36

@sampadasawant-36 sampadasawant-36 commented Jun 12, 2026

Copy link
Copy Markdown

Fixes

https://issues.redhat.com/browse/CONSOLE-5140

Analysis / Root cause

On OCP 4.20.x with baselineCapabilitySet: None and Build capability not enabled, the admin perspective Builds nav section remained visible because:

  1. The admin Builds section header (console.navigation/section) was gated only on "required": ["OPENSHIFT"] — always true on any OpenShift cluster regardless of Build capability state.
  2. The ImageStreams nav item inside the Builds section had no flag guard. Since imagestreams.image.openshift.io APIs are always present on OpenShift (independent of the Build capability), ImageStreams always appeared — keeping the section non-empty and visible.

As a result, users on clusters with Build capability disabled see a Builds section in the admin nav containing only ImageStreams, with no BuildConfigs or Builds items (those are already correctly gated by OPENSHIFT_BUILDCONFIG / OPENSHIFT_BUILD flags).

The Developer perspective Builds nav item already has "required": ["OPENSHIFT_BUILDCONFIG"] and does not need to be changed.

Solution Description

  • Added "flags": { "required": ["OPENSHIFT_BUILDCONFIG"] } to the admin imagestreams nav item in console-app/console-extensions.json, so it is hidden when buildconfigs.build.openshift.io is absent.
  • Changed the admin builds section flag from "required": ["OPENSHIFT"] to "required": ["OPENSHIFT_BUILDCONFIG"], so the entire Builds section header is also hidden when Build capability is disabled.

Test setup

  1. Create a cluster with baselineCapabilitySet: None and Build capability not enabled
  2. Verify oc api-resources | grep build shows no buildconfigs.build.openshift.io
  3. Confirm admin Builds section and ImageStreams nav item are hidden
  4. Confirm Developer → Builds nav item is hidden
  5. Enable Build capability, re-verify both items reappear correctly

…ility is disabled

When the Build capability is disabled (baselineCapabilitySet: None), the
builds.build.openshift.io and buildconfigs.build.openshift.io APIs are not
present. However, the admin perspective Builds nav section was still visible
because:

1. The admin "Builds" section header only required the generic OPENSHIFT flag
   (always true on OpenShift), not the Build-specific capability flag.
2. The "ImageStreams" nav item inside the Builds section had no flag guard,
   and imagestreams.image.openshift.io APIs are always present on OpenShift
   regardless of the Build capability state.

Fix:
- Add "flags": { "required": ["OPENSHIFT_BUILDCONFIG"] } to the admin
  ImageStreams nav item so it is hidden when BuildConfig APIs are absent.
- Change the admin Builds section flag from OPENSHIFT to OPENSHIFT_BUILDCONFIG
  so the section header itself is hidden when Build capability is disabled.

The Developer perspective Builds nav item already has the correct flag guard
("required": ["OPENSHIFT_BUILDCONFIG"]) and does not need to be changed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 12, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@sampadasawant-36: This pull request references CONSOLE-5140 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 bug to target the "4.20.z" version, but no target version was set.

Details

In response to this:

Fixes

https://issues.redhat.com/browse/CONSOLE-5140

Analysis / Root cause

On OCP 4.20.x with baselineCapabilitySet: None and Build capability not enabled, the admin perspective Builds nav section remained visible because:

  1. The admin Builds section header (console.navigation/section) was gated only on "required": ["OPENSHIFT"] — always true on any OpenShift cluster regardless of Build capability state.
  2. The ImageStreams nav item inside the Builds section had no flag guard. Since imagestreams.image.openshift.io APIs are always present on OpenShift (independent of the Build capability), ImageStreams always appeared — keeping the section non-empty and visible.

As a result, users on clusters with Build capability disabled see a Builds section in the admin nav containing only ImageStreams, with no BuildConfigs or Builds items (those are already correctly gated by OPENSHIFT_BUILDCONFIG / OPENSHIFT_BUILD flags).

The Developer perspective Builds nav item already has "required": ["OPENSHIFT_BUILDCONFIG"] and does not need to be changed.

Solution Description

  • Added "flags": { "required": ["OPENSHIFT_BUILDCONFIG"] } to the admin imagestreams nav item in console-app/console-extensions.json, so it is hidden when buildconfigs.build.openshift.io is absent.
  • Changed the admin builds section flag from "required": ["OPENSHIFT"] to "required": ["OPENSHIFT_BUILDCONFIG"], so the entire Builds section header is also hidden when Build capability is disabled.

Test setup

  1. Create a cluster with baselineCapabilitySet: None and Build capability not enabled
  2. Verify oc api-resources | grep build shows no buildconfigs.build.openshift.io
  3. Confirm admin Builds section and ImageStreams nav item are hidden
  4. Confirm Developer → Builds nav item is hidden
  5. Enable Build capability, re-verify both items reappear correctly

Made with Cursor

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 Jun 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: cdb345bc-5a7b-4263-8137-37e0f7ed28ac

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ 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 and usage tips.

@openshift-ci
openshift-ci Bot requested review from TheRealJon and cajieh June 12, 2026 16:27
@openshift-ci openshift-ci Bot added the component/core Related to console core functionality label Jun 12, 2026
@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sampadasawant-36
Once this PR has been reviewed and has the lgtm label, please assign logonoff 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

@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Hi @sampadasawant-36. 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.

Regular contributors should join the org to skip this step.

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.

@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 Jun 12, 2026
@dpateriya

Copy link
Copy Markdown

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 12, 2026
@sampadasawant-36

Copy link
Copy Markdown
Author

/retest

@pmeida

pmeida commented Jul 7, 2026

Copy link
Copy Markdown

Hi @sampadasawant-36 ,

https://redhat.atlassian.net/browse/OCPBUGS-95590 - this is the new link to the created jira item.

Do you mind changing the title from CONSOLE-5140: to OCPBUGS-95590: so that the ART tooling can automatically update the ticket?

also: I have assigned you to the item

Thanks for taking care of this.

@sampadasawant-36 sampadasawant-36 changed the title CONSOLE-5140: Hide Builds and ImageStreams nav items when Build capability is disabled OCPBUGS-95590: Hide Builds and ImageStreams nav items when Build capability is disabled Aug 14, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. 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

@sampadasawant-36: This pull request references Jira Issue OCPBUGS-95590, which is invalid:

  • expected the bug to target either version "4.20.z." or "openshift-4.20.z.", but it targets "5.0.z" instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-95590 to depend on a bug targeting a version in 4.21.0, 4.21.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

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.

Details

In response to this:

Fixes

https://issues.redhat.com/browse/CONSOLE-5140

Analysis / Root cause

On OCP 4.20.x with baselineCapabilitySet: None and Build capability not enabled, the admin perspective Builds nav section remained visible because:

  1. The admin Builds section header (console.navigation/section) was gated only on "required": ["OPENSHIFT"] — always true on any OpenShift cluster regardless of Build capability state.
  2. The ImageStreams nav item inside the Builds section had no flag guard. Since imagestreams.image.openshift.io APIs are always present on OpenShift (independent of the Build capability), ImageStreams always appeared — keeping the section non-empty and visible.

As a result, users on clusters with Build capability disabled see a Builds section in the admin nav containing only ImageStreams, with no BuildConfigs or Builds items (those are already correctly gated by OPENSHIFT_BUILDCONFIG / OPENSHIFT_BUILD flags).

The Developer perspective Builds nav item already has "required": ["OPENSHIFT_BUILDCONFIG"] and does not need to be changed.

Solution Description

  • Added "flags": { "required": ["OPENSHIFT_BUILDCONFIG"] } to the admin imagestreams nav item in console-app/console-extensions.json, so it is hidden when buildconfigs.build.openshift.io is absent.
  • Changed the admin builds section flag from "required": ["OPENSHIFT"] to "required": ["OPENSHIFT_BUILDCONFIG"], so the entire Builds section header is also hidden when Build capability is disabled.

Test setup

  1. Create a cluster with baselineCapabilitySet: None and Build capability not enabled
  2. Verify oc api-resources | grep build shows no buildconfigs.build.openshift.io
  3. Confirm admin Builds section and ImageStreams nav item are hidden
  4. Confirm Developer → Builds nav item is hidden
  5. Enable Build capability, re-verify both items reappear correctly

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.

@sampadasawant-36

Copy link
Copy Markdown
Author

/retest

@sampadasawant-36

Copy link
Copy Markdown
Author

@logonoff could you please take a look and approve when you get a chance? This is a small config-only change — just adding OPENSHIFT_BUILDCONFIG flag guards to the admin Builds section header and ImageStreams nav item so they are hidden when the Build capability is disabled. Thanks!

@sampadasawant-36

Copy link
Copy Markdown
Author

/retest

@sampadasawant-36

Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@sampadasawant-36: This pull request references Jira Issue OCPBUGS-95590, which is invalid:

  • expected the bug to target either version "4.20.z." or "openshift-4.20.z.", but it targets "5.0.z" instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-95590 to depend on a bug targeting a version in 4.21.0, 4.21.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

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.

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.

@sampadasawant-36

Copy link
Copy Markdown
Author

Hi @logonoff and @pmeida — could one of you please review this PR and help set the Release Note field (or mark it as 'Release Note Not Required') on OCPBUGS-95590? The Jira bot is flagging the PR as invalid until that field is set. Fix version has already been updated to 4.20.z. Thanks!

@logonoff

Copy link
Copy Markdown
Member

Hi @logonoff and @pmeida — could one of you please review this PR and help set the Release Note field (or mark it as 'Release Note Not Required') on OCPBUGS-95590? The Jira bot is flagging the PR as invalid until that field is set. Fix version has already been updated to 4.20.z. Thanks!

Bugfixes must start at the latest in-development version (i.e., your target branch must be main). As I see #16891 is the PR targeting main, this PR will not have jira/valid-bug until then.

@openshift-ci

openshift-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

@sampadasawant-36: 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-gcp-console 59f14eb link true /test e2e-gcp-console

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.

@sampadasawant-36

Copy link
Copy Markdown
Author

Thanks @logonoff for the context! Understood — the fix needs to land on main first via #16891 before this release-4.20 backport can get jira/valid-bug.

PR #16891 (by @Leo6Leo) has all CI passing and jira/valid-bug already set. Could you review and approve it when you get a chance? That will unblock this backport PR as well. Thanks!

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/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants