feat: integrate embedded-cluster CLI lint into release lint pipeline#696
Merged
feat: integrate embedded-cluster CLI lint into release lint pipeline#696
Conversation
Adds EC lint as an opt-in linter (disabled by default) that runs the embedded-cluster CLI against manifest directories and surfaces results alongside Helm, Preflight, and Support Bundle lint output. - New ECLinterConfig type with disabled-by-default IsEnabled() semantics - Discovers EC version automatically from the EmbeddedCluster Config manifest - Downloads the EC CLI binary from S3 by version, caches it alongside other tools - Supports binary-path config field and REPLICATED_EMBEDDED_CLUSTER_BINARY_PATH env var to bypass the resolver - Configurable --disable checks with sensible defaults Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ries Replaces manifestBaseDirs with ExpandManifestGlobs which expands the manifest glob patterns from .replicated config to actual YAML file paths, applying the same gitignore and hidden-path filtering as other linters. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Kots uses LinterConfig where nil Disabled means enabled, so it requires an explicit boolPtr(true). Also adds a nil-check in ApplyDefaults to default Kots to disabled when a repl-lint section exists but omits Kots. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lyDefaults Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on path Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use json.NewDecoder loop in LintEmbeddedCluster to handle trailing content after JSON output (matches parseTroubleshootJSON approach) - Iterate YAML documents in parseECVersionFromFile to find EC Config in non-first documents of multi-document YAML files - Move DiscoverECVersion after binary path resolution so it is skipped when a binary path is explicitly provided (no version needed) - Skip DownloadWithFallback for EC since version is always explicit; fallback to latest is unsupported and produced a misleading error message Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…o-discovery mode The early return for "No lintable resources found" ran before the EC linting block, silently skipping EC lint even when explicitly enabled. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ills - Remove KotsLinterConfig; all linters use LinterConfig (or ECLinterConfig) - ECLinterConfig embeds LinterConfig and inherits IsEnabled() - mergeECLinterConfig delegates the Disabled field to mergeLinterConfig - nil Disabled is a transient parse state; ApplyDefaults always fills every linter's Disabled field before IsEnabled() is called - Defaults (on/off) live in one place: the nil-fill block in ApplyDefaults - Add tests for linter defaults, ApplyDefaults idempotency, and mergeECLinterConfig Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… file paths Joining all expanded manifest paths produced an unreadably long string in both table and JSON output. Individual messages already carry their own file path from the EC lint output, so a short summary label is sufficient here. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add lint_types.go with generic LintIssue interface, FileLintResult[T], and LintOutput[T] — shared across all linting tools - Rename Troubleshoot-prefixed types/functions to generic names: TroubleshootIssue→LintIssue, TroubleshootFileResult→FileLintResult, TroubleshootLintResult→LintOutput, parseTroubleshootJSON→parseLintJSON, convertTroubleshootResultToMessages→convertLintOutputToMessages, formatTroubleshootMessage→formatLintMessage - Standardize on json:"info" (dropping unused json:"infos" — troubleshoot lint output only contains errors and warnings) - Remove dead PreflightLintResult/PreflightFileResult and SupportBundleLintResult/SupportBundleFileResult types - Remove ecFileResult/ecLintOutput; EC lint now parses directly into LintOutput[ecLintIssue], eliminating convertECResultToMessages Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 788fa97. Configure here.
sgalsaleh
approved these changes
Apr 21, 2026
NoaheCampbell
approved these changes
Apr 21, 2026
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
embeddedcluster.replicated.com/v1beta1Config manifest (spec.version) — no separate config needed; supports multi-document YAML fileshttps://tf-embedded-cluster-binaries.s3.us-east-1.amazonaws.com/releases/{version}-{os}-{arch}.tgz) and caches it alongside other tools; version resolution via replicated.app/ping is not supported for EC so the fallback path is skippedbinary-pathconfig field andREPLICATED_EMBEDDED_CLUSTER_BINARY_PATHenv var to bypass the resolver — version discovery is skipped when a binary path is provideddisable-checkslist with defaults (helmchart-archive,ecconfig-helmchart-archive)LinterConfig(orECLinterConfigwhich embeds it);ApplyDefaultsis the single source of truth for which linters are on/off by default —nilis a transient parse state, never reachesIsEnabled()at runtimeExample config
Test plan
replicated release lintwithout EC config — EC section shows as disabled.replicated, point at a manifests dir with anEmbeddedCluster/Configmanifest — version is auto-discovered, binary is downloaded and linting runsREPLICATED_EMBEDDED_CLUSTER_BINARY_PATHto a local binary — resolver is bypassed, version discovery is skippedembedded_cluster_resultsfieldlinting failedexit code🤖 Generated with Claude Code