Skip to content

Backup fix helm upgrade secrets#16775

Closed
sowmya-sl wants to merge 4 commits into
openshift:mainfrom
sowmya-sl:backup-fix-helm-upgrade-secrets
Closed

Backup fix helm upgrade secrets#16775
sowmya-sl wants to merge 4 commits into
openshift:mainfrom
sowmya-sl:backup-fix-helm-upgrade-secrets

Conversation

@sowmya-sl

@sowmya-sl sowmya-sl commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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

  • New Features

    • Added support for selecting or creating a Basic authentication secret when installing Helm charts from a URL.
    • Added clearer guidance when registry authentication is required.
  • Bug Fixes

    • Improved authentication error messages for chart retrieval, installation, and upgrades.
    • Preserved authentication settings during URL-based chart upgrades.
  • Style

    • Standardized Helm release, chart, menu, heading, and empty-state text capitalization throughout the interface.

@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 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 17, 2026
@openshift-ci

openshift-ci Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci Bot added the component/backend Related to backend label Jul 17, 2026
@openshift-ci

openshift-ci Bot commented Jul 17, 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 component/helm Related to helm-plugin kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 17, 2026
@sowmya-sl
sowmya-sl force-pushed the backup-fix-helm-upgrade-secrets branch from f19ce60 to 9ebc9e5 Compare July 20, 2026 12:12
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This PR normalizes "Helm Release"/"Helm Releases" casing to "Helm release"/"Helm releases" (and related "Helm Chart" casing) across UI strings, locales, models, and Cypress integration tests. Separately, it adds Basic authentication secret selection/creation for URL-based Helm chart installs/upgrades, spanning new frontend UI, form state, and backend Go error handling with an added basicAuthSecretName parameter.

Changes

Helm release/chart casing normalization

Layer / File(s) Summary
Locale strings and model labels
frontend/packages/helm-plugin/locales/en/helm-plugin.json, frontend/packages/helm-plugin/src/models/helm.ts
Translation keys/values and HelmReleaseModel label/labelPlural updated to consistent "Helm release(s)" casing.
React components, actions, catalog, topology, list-page
frontend/packages/helm-plugin/src/actions/creators.ts, frontend/packages/helm-plugin/src/catalog/utils/catalog-utils.tsx, frontend/packages/helm-plugin/src/components/details-page/..., frontend/packages/helm-plugin/src/components/list-page/..., frontend/packages/helm-plugin/src/topology/helmFilters.ts, frontend/packages/helm-plugin/src/utils/helm-utils.ts, tests
Displayed strings, i18n keys, and mock data across release detail/overview/history/list pages, delete action, catalog details, and topology filters updated to match new casing.
Cypress page objects and step definitions
frontend/packages/helm-plugin/integration-tests/support/pages/helm/*, frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/*, .../common/common.ts, .../static-text/helm-text.ts
Page-object assertions and step-definition strings/test-ids updated to match new "Helm release" casing and delete/upgrade action labels.
Gherkin feature files
frontend/packages/helm-plugin/integration-tests/features/**/*.feature
Scenario titles and step text across all Helm feature files updated for consistent "Helm release(s)"/"Helm Chart" casing.

Basic authentication secret support for URL-based Helm installs/upgrades

Layer / File(s) Summary
Create basic-auth secret modal
frontend/packages/helm-plugin/src/components/forms/url-chart/HelmCreateBasicAuthSecretModal.tsx
New overlay modal component and useHelmCreateBasicAuthSecretModal hook to create a Kubernetes basic-auth Secret via k8sCreate.
URL chart form secret dropdown wiring
frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartForm.tsx, HelmURLInstallForm.tsx, HelmURLChartInstallPage.tsx, helm-oci-validation-utils.ts
Adds "Create authentication secret" action item wired to the new modal, and updates related help/validation text.
Install/upgrade form secret field and page wiring
frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmInstallUpgradeForm.tsx, HelmInstallUpgradePage.tsx, tests
Adds basicAuthSecretName/isURLInstall form fields, a secret-selection dropdown with missing-secret warning, and derives/submits the secret name via chart annotations and payload.
Backend basic-auth secret propagation and error handling
pkg/helm/actions/get_chart.go, install_chart.go, upgrade_release.go, upgrade_release_test.go, pkg/helm/handlers/handlers.go, handler_test.go
Adds basicAuthSecretName parameter to UpgradeReleaseAsync, propagates installation annotations, and wraps 401/unauthorized chart-location errors with basic-auth guidance.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

  • openshift/console#16607: Both PRs modify pkg/helm/actions/get_chart.go chart-location/auth handling for the same GetChartFromURL code path.

Suggested reviewers: therealjon

🚥 Pre-merge checks | ✅ 2 | ❌ 13

❌ Failed checks (3 warnings, 10 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ⚠️ Warning The title is related to the Helm secrets work, but it lacks the required Jira prefix and is too vague for the main change. Rename it to include a Jira key, e.g. "HELM-763: Backup fix helm upgrade secrets", and make it more specific to the auth-secret change.
Description check ⚠️ Warning The description is only the template comments and does not fill any required sections, so it is not review-ready. Fill in Analysis / Root cause, Solution description, Test setup, Test cases, Browser conformance, and any relevant screenshots or additional info.
Stable And Deterministic Test Names ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Test Structure And Quality ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Microshift Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Single Node Openshift (Sno) Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Topology-Aware Scheduling Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ote Binary Stdout Contract ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ipv6 And Disconnected Network Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Weak-Crypto ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Container-Privileges ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Sensitive-Data-In-Logs ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (2 passed)
Check name Status Explanation
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

…tching

- Pass basicAuthSecretName through UpgradeReleaseAsync to support
  auth credentials during chart upgrades
- Use __none__ sentinel to allow users to explicitly clear a secret
- Preserve installation annotation on upgrade to maintain URL-install
  tracking across revisions
- Return errors instead of logging on auth credential failures so
  the frontend can surface them
- Add 401/unauthorized detection in GetChartFromURL, InstallChartFromURL,
  and UpgradeReleaseAsync with actionable error messages
- Update handler signature, mock, and tests for the new parameter
…orms

- Add HelmCreateBasicAuthSecretModal for creating kubernetes.io/basic-auth
  secrets with username/password from within the Helm forms
- Add auth secret dropdown with 'None' and 'Create Secret' options to
  HelmInstallUpgradeForm, shown when upgrading a URL-installed chart
- Detect URL-installed charts via 'installation' annotation and read
  initial auth secret from 'helm.openshift.io/auth-secret' annotation
- Pass basicAuthSecretName through to the upgrade API payload
- Use __none__ sentinel to allow explicitly clearing a previously set secret
- Show warning when a previously referenced secret no longer exists
- Add auth secret dropdown to HelmURLChartForm for URL-based chart installs
- Lowercase 'release' after 'Helm' throughout: 'Helm Release' is not a
  proper noun, so use 'Helm release' and 'Helm releases' consistently
- Revert 'Helm Charts' back to 'Helm Chart(s)' to match existing
  convention across the codebase
- Update integration tests, step definitions, feature files, source
  code, and i18n strings to reflect the casing changes
@sowmya-sl
sowmya-sl force-pushed the backup-fix-helm-upgrade-secrets branch from 9ebc9e5 to e008fbb Compare July 20, 2026 12:14
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 20, 2026
- Remove public~ i18n namespace usage; use helm-plugin namespace
- Unify 'Create Secret' / 'Create authentication Secret' to
  'Create authentication secret'
- Use active voice: 'You can create a Helm release by...'
- Fix might/may usage (might = possibility, may = permission)
- Standardize 'Helm Chart(s)' to 'Helm Charts' globally
- Standardize '.tar file' and 'for example,' formatting
- Add missing article in helper text ('A secret with...')
- Unify 'Secret for Basic authentication' label across forms
- Lowercase standalone 'chart' when not preceded by 'Helm'
- Remove unnecessary optional chaining in HelmInstallUpgradeForm
- Update integration tests to reflect UI text changes

Co-authored-by: Cursor <cursoragent@cursor.com>
@sowmya-sl
sowmya-sl force-pushed the backup-fix-helm-upgrade-secrets branch from e008fbb to 58858ef Compare July 20, 2026 12:15

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
pkg/helm/handlers/handler_test.go (1)

140-148: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Exercise and assert the new authentication parameter.

The handler fake accepts but ignores basicAuthSecretName, while the auth-focused upgrade test always passes ""; regressions in forwarding, explicit selection, or "__none__" clearing could therefore pass.

  • pkg/helm/handlers/handler_test.go#L140-L148: add an expected secret name and assert the received argument.
  • pkg/helm/actions/upgrade_release_test.go#L778-L780: add explicit-secret and "__none__" cases, including annotation assertions.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/helm/handlers/handler_test.go` around lines 140 - 148, The
fakeUpgradeReleaseAsync helper in pkg/helm/handlers/handler_test.go:140-148 must
accept an expected basic-auth secret name and assert it matches the received
basicAuthSecretName argument. Extend the authentication-focused cases in
pkg/helm/actions/upgrade_release_test.go:778-780 to cover an explicitly selected
secret and "__none__" clearing, asserting the resulting annotations for both
cases.
frontend/packages/helm-plugin/src/components/forms/url-chart/HelmCreateBasicAuthSecretModal.tsx (1)

45-54: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

onClose fires even on the successful create path.

closeModal(true) (used both for cancel and, indirectly, after a successful create at line 79) always calls onClose?.(). This conflates "dismissed without saving" with "saved successfully." It's harmless today since consumers only toggle a boolean in both callbacks, but any future consumer relying on onClose to revert state would incorrectly fire on success too.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/packages/helm-plugin/src/components/forms/url-chart/HelmCreateBasicAuthSecretModal.tsx`
around lines 45 - 54, Update closeModal to distinguish successful saves from
dismissals: preserve the existing closeOverlay and blur behavior, but invoke
onClose only for cancellation/regular dismissal, not when closeModal(true) is
used after successful creation. Adjust the create-success call path and any
needed argument semantics around closeModal so saved completion does not trigger
onClose.
frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartForm.tsx (1)

36-63: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated basic-auth secret dropdown wiring, including a collision-prone sentinel value. Both files independently reimplement the same state, constants, and handlers for the "select/create Basic auth secret" dropdown; the shared root cause is that this logic isn't factored into a single hook, and both copies bake in CREATE_SECRET_KEY = 'create-secret', a value that could collide with a real user-created secret name (unlike NONE_SECRET_KEY = '__none__').

  • frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartForm.tsx#L36-L63: extract isCreateSecretModalOpen state, the CREATE_SECRET_KEY/NONE_SECRET_KEY constants, handleSecretSave, and handleSecretChange into a shared hook (e.g. useBasicAuthSecretField), and change CREATE_SECRET_KEY to a value less likely to collide with real secret names.
  • frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmInstallUpgradeForm.tsx#L77-L131: replace the duplicated block with the same shared hook, reusing the fixed, collision-safe sentinel constant.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartForm.tsx`
around lines 36 - 63, Extract the duplicated Basic auth secret dropdown state,
constants, and handlers from HelmURLChartForm.tsx lines 36-63 and
HelmInstallUpgradeForm.tsx lines 77-131 into a shared useBasicAuthSecretField
hook, and replace both local implementations with that hook. Change
CREATE_SECRET_KEY to a collision-safe sentinel distinct from real secret names,
while preserving NONE_SECRET_KEY and existing modal/save behavior; both files
must reuse the shared hook and sentinel.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/helm/actions/upgrade_release.go`:
- Around line 263-265: Update the annotation-copy logic in the release upgrade
flow to avoid dereferencing rel.Chart.Metadata when it is nil. Reuse the
existing nil-safe metadata or annotation lookup used earlier, while preserving
the current behavior of copying the “installation” value into
ch.Metadata.Annotations when present.

---

Nitpick comments:
In
`@frontend/packages/helm-plugin/src/components/forms/url-chart/HelmCreateBasicAuthSecretModal.tsx`:
- Around line 45-54: Update closeModal to distinguish successful saves from
dismissals: preserve the existing closeOverlay and blur behavior, but invoke
onClose only for cancellation/regular dismissal, not when closeModal(true) is
used after successful creation. Adjust the create-success call path and any
needed argument semantics around closeModal so saved completion does not trigger
onClose.

In
`@frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartForm.tsx`:
- Around line 36-63: Extract the duplicated Basic auth secret dropdown state,
constants, and handlers from HelmURLChartForm.tsx lines 36-63 and
HelmInstallUpgradeForm.tsx lines 77-131 into a shared useBasicAuthSecretField
hook, and replace both local implementations with that hook. Change
CREATE_SECRET_KEY to a collision-safe sentinel distinct from real secret names,
while preserving NONE_SECRET_KEY and existing modal/save behavior; both files
must reuse the shared hook and sentinel.

In `@pkg/helm/handlers/handler_test.go`:
- Around line 140-148: The fakeUpgradeReleaseAsync helper in
pkg/helm/handlers/handler_test.go:140-148 must accept an expected basic-auth
secret name and assert it matches the received basicAuthSecretName argument.
Extend the authentication-focused cases in
pkg/helm/actions/upgrade_release_test.go:778-780 to cover an explicitly selected
secret and "__none__" clearing, asserting the resulting annotations for both
cases.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: a63271f6-e0bb-4d0d-9eeb-c551bf918284

📥 Commits

Reviewing files that changed from the base of the PR and between a70992e and 58858ef.

📒 Files selected for processing (48)
  • frontend/packages/helm-plugin/integration-tests/features/helm-release.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release-after-upgrade.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-compatibility.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-installation-view.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-navigation.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/helm-page-tabs.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/install-helm-chart.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/install-url-chart.feature
  • frontend/packages/helm-plugin/integration-tests/features/helm/topology-helm-release.feature
  • frontend/packages/helm-plugin/integration-tests/support/constants/static-text/helm-text.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-details-page.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-page.ts
  • frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-compatibility.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts
  • frontend/packages/helm-plugin/locales/en/helm-plugin.json
  • frontend/packages/helm-plugin/src/actions/creators.ts
  • frontend/packages/helm-plugin/src/catalog/utils/catalog-utils.tsx
  • frontend/packages/helm-plugin/src/components/__tests__/helm-release-mock-data.ts
  • frontend/packages/helm-plugin/src/components/details-page/HelmReleaseDetails.tsx
  • frontend/packages/helm-plugin/src/components/details-page/history/HelmReleaseHistory.tsx
  • frontend/packages/helm-plugin/src/components/details-page/overview/HelmReleaseOverview.tsx
  • frontend/packages/helm-plugin/src/components/details-page/overview/__tests__/HelmReleaseOverview.spec.tsx
  • frontend/packages/helm-plugin/src/components/forms/__tests__/HelmInstallUpgradeForm.spec.tsx
  • frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmInstallUpgradeForm.tsx
  • frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmInstallUpgradePage.tsx
  • frontend/packages/helm-plugin/src/components/forms/url-chart/HelmCreateBasicAuthSecretModal.tsx
  • frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartForm.tsx
  • frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartInstallPage.tsx
  • frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLInstallForm.tsx
  • frontend/packages/helm-plugin/src/components/forms/url-chart/helm-oci-validation-utils.ts
  • frontend/packages/helm-plugin/src/components/list-page/HelmReleaseList.tsx
  • frontend/packages/helm-plugin/src/components/list-page/HelmReleaseListPage.tsx
  • frontend/packages/helm-plugin/src/components/list-page/HelmReleaseListRow.tsx
  • frontend/packages/helm-plugin/src/components/list-page/HelmTabbedPage.tsx
  • frontend/packages/helm-plugin/src/models/helm.ts
  • frontend/packages/helm-plugin/src/topology/helmFilters.ts
  • frontend/packages/helm-plugin/src/utils/__tests__/helm-utils.spec.ts
  • frontend/packages/helm-plugin/src/utils/helm-utils.ts
  • pkg/helm/actions/get_chart.go
  • pkg/helm/actions/install_chart.go
  • pkg/helm/actions/upgrade_release.go
  • pkg/helm/actions/upgrade_release_test.go
  • pkg/helm/handlers/handler_test.go
  • pkg/helm/handlers/handlers.go
💤 Files with no reviewable changes (1)
  • frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts

Comment on lines +263 to +265
if inst, ok := rel.Chart.Metadata.Annotations["installation"]; ok {
ch.Metadata.Annotations["installation"] = inst
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Guard previous chart metadata before copying annotations.

Line 263 dereferences rel.Chart.Metadata unconditionally, although the earlier logic explicitly treats that metadata as optional. A URL upgrade of a release with missing metadata can panic instead of returning an error; reuse a nil-safe annotation lookup here.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/helm/actions/upgrade_release.go` around lines 263 - 265, Update the
annotation-copy logic in the release upgrade flow to avoid dereferencing
rel.Chart.Metadata when it is nil. Reuse the existing nil-safe metadata or
annotation lookup used earlier, while preserving the current behavior of copying
the “installation” value into ch.Metadata.Annotations when present.

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/backend Related to backend component/helm Related to helm-plugin do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant