fix(cli): enterprise-portal preview helmEnabled does not reflect isHelmInstallEnabled#746
Open
kriscoleman wants to merge 1 commit into
Open
Conversation
…seCapabilities The enterprise-portal preview tool was not mapping IsHelmInstallEnabled, IsKurlInstallEnabled, or IsHelmAirgapEnabled from the Customer struct to the previewLicense struct. These fields were also missing from the types.Customer struct, so the vendor API response values were silently dropped during JSON deserialization. Add the three missing fields to types.Customer and wire them through customerToPreviewLicense() so the preview UI's licenseCapabilities object reflects the actual customer settings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
042345e to
d4ac083
Compare
Member
Author
#746 adds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IsHelmInstallEnabled,IsKurlInstallEnabled, andIsHelmAirgapEnabledfields totypes.Customerso the vendor API response values are deserialized instead of silently droppedcustomerToPreviewLicense()so the EP preview UI'slicenseCapabilitiesobject reflects actual customer settingsRoot Cause
types.Customerwas missingIsHelmInstallEnabled,IsKurlInstallEnabled, andIsHelmAirgapEnabledstruct fields. When the vendor API returned these values in its JSON response, Go'sjson.Unmarshalsilently discarded them. Additionally,customerToPreviewLicense()never mapped these fields from the customer to thepreviewLicensestruct, so they always defaulted tofalsein the preview UI regardless of the customer's actual settings.Test Plan
go build ./...passesgo test ./pkg/types/...— verifies JSON unmarshal/marshal/round-trip for all three new fieldsgo test ./cli/cmd/...— verifiescustomerToPreviewLicense()maps each new field correctlyreplicated enterprise-portal previewwith a customer that hasisHelmInstallEnabled: trueand confirmhelmEnabled: trueappears in the preview toolbarFixes: https://app.shortcut.com/replicated/story/137965
🤖 Generated with Claude Code