Draft
Conversation
Moves the existing lint integration test and its testdata into test/integration/ so each test category has its own package and can be run independently. Adds test/canary/semver_compat_test.go as the first canary test: verifies that Masterminds/semver/v3 can parse chart versions with +up build metadata (e.g. 108.0.0+up1.0.0-rc.1). Fails if the replace directive in go.mod is removed or overridden, giving early warning before a bad semver/v3 or helm bump reaches CI.
Covers the two semver libraries used directly in production code. blang/semver (v3.5.1): pins Make(), MustParse(), Build field append that generates +up chart versions in pkg/helm/export.go, Major field arithmetic used in pkg/auto/versioning.go, and Patch manipulation for packageVersion encoding. Masterminds/semver v1 (v1.5.0): pins NewVersion() parsing of +up chart versions, the critical Equal() behaviour that ignores build metadata (which drives the fallthrough to Metadata() comparison in pkg/options/validate.go), and the Minor()/Major()/Patch() accessors used in pkg/validate/pull_requests.go.
All helm.sh/helm/v3 sub-package imports now follow the helm<SubPackage> naming convention (e.g. helmRepo, helmChart, helmLoader, helmCLI). Previously several files used unnamed imports or inconsistent aliases for the same package. Adopting a consistent naming pattern makes it straightforward to grep for usages of any specific external helm API across the codebase, which is essential when auditing compatibility before bumping helm or writing canary tests for each imported sub-package.
Add canary tests covering all helm.sh/helm/v3 APIs used in production: - helmChart/helmChartUtil (Metadata, Load, CRDObjects, LoadChartfile, SaveChartfile) - helmRepo (NewIndexFile, IndexFile.Entries, LoadIndexFile) - helmRegistry/helmAction/helmCLI/helmGetter (IsOCI, NewClient, LoginOpt*, PushOpt*, Configuration.Init, EnvSettings, NewOCIGetter) Tests use real fixtures from rancher/charts (fleet Chart.yaml, index.yaml first 100 lines with 4 elemental versions) to verify compatibility with actual chart data structures and the `<version>+up<upstream>` format.
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.
No description provided.