Skip to content

fix: show Helm tab when APIs are available but no instances exist - #17145

Open
sowmya-sl wants to merge 1 commit into
openshift:mainfrom
openshift-helm:helm-tab-visibility-fix
Open

fix: show Helm tab when APIs are available but no instances exist#17145
sowmya-sl wants to merge 1 commit into
openshift:mainfrom
openshift-helm:helm-tab-visibility-fix

Conversation

@sowmya-sl

@sowmya-sl sowmya-sl commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The useDetectHelmChartRepositories hook incorrectly set the OPENSHIFT_HELM feature flag to false when both HelmChartRepository and ProjectHelmChartRepository API calls succeeded but returned empty lists. This hid the Helm tab on clusters where the CRDs are installed but no repository instances exist.

Changed the else branch to set the flag to true, correctly distinguishing between CRDs not installed (404 response, hide) and CRDs installed but no instances (success with empty list, show). Removed the dead hasEnabledHelmCharts helper and simplified the detection logic. Updated unit tests accordingly.

Analysis / Root cause:

Solution description:

Screenshots / screen recording:

Test setup:

Test cases:

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:

Reviewers and assignees:

Summary by CodeRabbit

  • Bug Fixes
    • Improved Helm feature detection when no repositories are configured or all repositories are disabled.
    • Helm functionality now remains available when at least one repository request succeeds, even if another request fails.
    • Helm detection continues to handle complete repository-request failures appropriately, including preserving existing not-found behavior and polling controls.

The useDetectHelmChartRepositories hook incorrectly set the
OPENSHIFT_HELM feature flag to false when both HelmChartRepository
and ProjectHelmChartRepository API calls succeeded but returned
empty lists. This hid the Helm tab on clusters where the CRDs are
installed but no repository instances exist.

Changed the else branch to set the flag to true, correctly
distinguishing between CRDs not installed (404 response, hide)
and CRDs installed but no instances (success with empty list,
show). Removed the dead hasEnabledHelmCharts helper and simplified
the detection logic. Updated unit tests accordingly.
@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
openshift-ci Bot requested review from baijum and webbnh September 4, 2026 09:36
@openshift-ci openshift-ci Bot added the component/helm Related to helm-plugin label Sep 4, 2026
@openshift-ci

openshift-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sowmya-sl

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 Sep 4, 2026
@coderabbitai

coderabbitai Bot commented Sep 4, 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: Enterprise

Run ID: cbfe2a3c-07cd-4c1b-a7a3-ce3a12df2434

📥 Commits

Reviewing files that changed from the base of the PR and between 0a757d6 and 9dba397.

📒 Files selected for processing (2)
  • frontend/packages/helm-plugin/src/providers/__tests__/helm-detection-provider.spec.ts
  • frontend/packages/helm-plugin/src/providers/helm-detection-provider.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Walkthrough

Helm detection now enables the Helm feature flag when repository discovery returns empty, disabled, or partial results. It handles complete request failure separately and removes the unused repository-content helper and its tests.

Changes

Helm detection

Layer / File(s) Summary
Update Helm detection outcomes
frontend/packages/helm-plugin/src/providers/helm-detection-provider.ts, frontend/packages/helm-plugin/src/providers/__tests__/helm-detection-provider.spec.ts
The provider enables Helm unless all repository requests fail. Tests cover empty results, disabled repositories, and partial request failure. Obsolete helper imports and tests were removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 9dba3

Helm visibility is now enabled when repository APIs are available but return no instances, while complete API-failure handling remains unchanged. The change is ready to merge.

Suggested reviewers: logonoff

🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title clearly describes the Helm tab visibility fix, but it does not include the required Jira issue prefix. Prefix the title with the Jira issue key, for example, "CONSOLE-XXXX: fix: show Helm tab when APIs are available but no instances exist".
Description check ⚠️ Warning The description explains the root cause and solution, but it does not complete the required template sections. Test cases, test setup, browser conformance, additional information, and reviewer details… Complete the required template sections. Add test setup, explicit test cases, browser conformance results, screenshots or state that they are not applicable, additional information, and reviewers or assignees.
✅ Passed checks (13 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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 PASS. The pull request changes only Jest test titles in helm-detection-provider.spec.ts. All added titles are static string literals. They contain no pod names, timestamps, UUIDs, node names, namesp…
Test Structure And Quality ✅ Passed PASS: The pull request changes only TypeScript Jest tests and the Helm provider. The changed test file uses describe, it, beforeEach, afterEach, waitFor, and Jest mocks. It contains no Ginkg…
Microshift Test Compatibility ✅ Passed PASS: The pull request changes only a frontend TypeScript provider and its Jest test. It adds no Ginkgo e2e tests and introduces no MicroShift compatibility condition covered by this check.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS: The pull request changes only the Helm provider and its Jest unit-test file. The added tests use Jest describe/it, not Ginkgo e2e tests, and they test API response handling only. They contai…
Topology-Aware Scheduling Compatibility ✅ Passed PASS. The pull request changes only a frontend Helm detection provider and its unit tests. The diff contains no deployment manifests, operator code, controllers, replica settings, affinity, topology s…
Ote Binary Stdout Contract ✅ Passed PASS. The pull request changes only two frontend TypeScript files in the Helm provider and its unit tests. The diff adds no stdout or logging write. The existing console.log is in a hook error callb…
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS: The pull request changes only frontend TypeScript implementation and a Jest/React unit test. The changed test uses mocked Kubernetes list calls and does not add Ginkgo e2e tests, IPv4 assumption…
No-Weak-Crypto ✅ Passed PASS. The commit changes only Helm detection logic and its tests. The added code contains no MD5, SHA1, DES, 3DES, RC4, Blowfish, or ECB usage, custom cryptography, or secret/token comparisons. Reposi…
Container-Privileges ✅ Passed PASS. The pull request changes only two TypeScript provider/test files. The exact diff contains no container or Kubernetes manifest changes and no occurrences of privileged, hostPID, hostNetwork
No-Sensitive-Data-In-Logs ✅ Passed PASS: The pull request adds no logging. The only console.log remains unchanged from the parent revision, and the changed files contain no sensitive-data fields or new logger calls. The added test er…
Full details: Description check

Explanation

The description explains the root cause and solution, but it does not complete the required template sections. Test cases, test setup, browser conformance, additional information, and reviewer details are missing.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci

openshift-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

@sowmya-sl: all tests passed!

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. component/helm Related to helm-plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant