Skip to content

Renovate safety configs#315

Draft
nicholasSUSE wants to merge 4 commits intomasterfrom
renovate-safety-configs
Draft

Renovate safety configs#315
nicholasSUSE wants to merge 4 commits intomasterfrom
renovate-safety-configs

Conversation

@nicholasSUSE
Copy link
Copy Markdown
Collaborator

No description provided.

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.
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.

1 participant