Skip to content

fix(cli): customer inspect does not surface isHelmInstallEnabled field#745

Open
kriscoleman wants to merge 3 commits into
mainfrom
fix/customer-inspect-helm-install-enabled
Open

fix(cli): customer inspect does not surface isHelmInstallEnabled field#745
kriscoleman wants to merge 3 commits into
mainfrom
fix/customer-inspect-helm-install-enabled

Conversation

@kriscoleman
Copy link
Copy Markdown
Member

@kriscoleman kriscoleman commented May 21, 2026

Summary

  • Add IsHelmInstallEnabled field with json:"isHelmInstallEnabled" tag to the Customer struct in pkg/types/customer.go
  • The Vendor API returns isHelmInstallEnabled in customer responses, but the CLI was only mapping to the retired isHelmVmDownloadEnabled tag — causing customer inspect --output json to silently drop the value

Root Cause

The Customer struct had no field for isHelmInstallEnabled. Go's JSON unmarshaler silently ignores unknown keys, so the API response value was lost.

Test Plan

  • replicated customer create --helm-install ... followed by replicated customer inspect --output json now includes isHelmInstallEnabled: true
  • Existing isHelmVmDownloadEnabled field preserved for backwards compatibility
  • go build ./... passes
  • go test ./pkg/types/... ./cli/print/... passes

Fixes: [sc-137962]

🤖 Generated with Claude Code

kriscoleman and others added 3 commits May 21, 2026 15:55
The Customer struct only mapped to the retired isHelmVmDownloadEnabled
JSON tag, which the Vendor API no longer returns. This caused
`customer inspect --output json` to silently drop the isHelmInstallEnabled
value. Add the field so the CLI correctly deserializes and surfaces it.

Fixes: https://app.shortcut.com/replicated/story/137962

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tallEnabled

Adds regression tests proving isHelmInstallEnabled deserializes correctly
from JSON into the Customer struct and appears in JSON output. Covers
unmarshal, marshal, round-trip, backwards compat for isHelmVmDownloadEnabled,
and end-to-end CustomerAttrs JSON rendering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@xavpaice xavpaice left a comment

Choose a reason for hiding this comment

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

LGTM, appreciate adding the tests. We add tests here specifically for IsHelmInstallEnabled and a more broad test also, are the specific tests redundant?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants