Skip to content

feat(lint): discover helm charts from EC Config manifests#718

Open
emosbaugh wants to merge 4 commits intomainfrom
emosbaugh/20260506/ec-config-helmchart-validation
Open

feat(lint): discover helm charts from EC Config manifests#718
emosbaugh wants to merge 4 commits intomainfrom
emosbaugh/20260506/ec-config-helmchart-validation

Conversation

@emosbaugh
Copy link
Copy Markdown
Member

Summary

Add support for discovering HelmChart declarations from embeddedcluster.replicated.com/v1beta1 Config manifest extensions.helmCharts.

This allows validation to properly match EC Config helm charts against local chart archives, preventing false-positive warnings for charts declared in EC Config manifests.

Changes

  • DiscoverECConfigHelmCharts() scans manifest globs for EC Config documents and extracts spec.extensions.helmCharts[].chart entries
  • DiscoverHelmChartManifests() now merges both kots HelmChart manifests and EC Config helm chart declarations
  • Duplicate detection works across both source types
  • Unit tests and integration test scenarios added for valid matches and missing archives

emosbaugh added 2 commits May 6, 2026 13:24
Add support for discovering HelmChart declarations from
embeddedcluster.replicated.com/v1beta1 Config manifest extensions.helmCharts.
This allows validation to properly match EC Config helm charts against local
chart archives, preventing false-positive warnings for charts declared in EC
Config manifests.
Comment thread pkg/lint2/helmchart.go
Move struct declarations inside the yaml.v3 decode loop in both
parseHelmChartManifest and parseECConfigHelmCharts. yaml.v3's decoder
modifies the target in place and does not clear fields absent in the
current document, causing phantom entries or false duplicates in
multi-document YAML files.

Also removes unreachable return after the infinite for loop in
parseHelmChartManifest.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2f7950a. Configure here.

Comment thread pkg/lint2/helmchart.go Outdated
Comment thread pkg/lint2/validation_integration_test.go
- parseECConfigHelmCharts: use ecConfigAPIVersion constant from
  embedded_cluster.go instead of hardcoded string to prevent silent
  discovery failures if the API version changes.
- TestLintValidation_ECConfigMissingArchive: use t.Fatalf instead of
  t.Errorf for the warnings length check to prevent index-out-of-bounds
  panic when result.Warnings is empty.
@emosbaugh
Copy link
Copy Markdown
Member Author

[sc-137591]

Copy link
Copy Markdown
Member

@kriscoleman kriscoleman left a comment

Choose a reason for hiding this comment

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

:shipit:

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants