Removing no_unique_dist_dir and switching binary to a flat name
changed the _dist/ directory structure goreleaser produces. The
existing make dist target (used by release.yml for Azure uploads)
walks _dist/ subdirectories and names archives after them, so it
would have started producing incorrectly named artifacts. Restoring
the OS-arch subdirectory layout keeps that path working; the new
archives section in this file names GitHub Release assets
independently, so it is unaffected.
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
setup-go's cache restores from a key derived on go.sum contents,
which a malicious PR could poison to smuggle tampered dependencies
into a release build. Release jobs run rarely enough that the cache
isn't worth the exposure.
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
build-cross now runs goreleaser exclusively, and goreleaser sources
linker flags from .goreleaser.yaml (builds.ldflags), not the Makefile
LDFLAGS variable. The build-cross: LDFLAGS += -extldflags "-static"
prerequisite was a leftover from the mitchellh/gox era (075c096af)
and has had no effect since. Static linking is already set in
.goreleaser.yaml, so this only removes dead wiring.
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
Helm ships binaries via Azure with no cosign, SBOM, or provenance,
and the upstream release.yml is gated to helm/helm so it can't be
exercised on a fork. This adds a self-contained release-signed
workflow plus the .goreleaser.yaml archive/sbom/checksum/signs
config it needs, modeled on goreleaser/example-secure, to demo the
full pipeline end-to-end before proposing it upstream.
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
TestInstallRelease_Wait_Interrupted and
TestInstallRelease_RollbackOnFailure_Interrupted assert that the detached
installation goroutine has exited by sleeping a fixed 10s -- exactly the
FailingKubeClient WaitDuration the goroutine blocks on. Sleeping the same
duration the goroutine takes is a zero-margin race: if the goroutine
finishes a hair after the fixed sleep elapses (scheduler jitter under load),
getGoroutineCount() has not decremented yet and the assertion flakes.
Replace the fixed sleep + point-in-time assert with is.Eventually polling
getGoroutineCount() (30s ceiling, 10ms tick). It returns as soon as the
goroutine has actually finished and no longer races the exact wait
duration. Test-only; no change to install behavior.
Signed-off-by: Nikolaus Schuetz <nikolauspschuetz@gmail.com>
- Replace `err == io.EOF` with `errors.Is(err, io.EOF)` (errorlint).
- Match Chart.lock by full tar path ("chart-with-lock/Chart.lock")
instead of path.Base to avoid false positives from subchart lock files.
- Break out of the loop after finding the entry (early exit).
Signed-off-by: Ilya Kiselev <kis-ilya-a@yandex.ru>
Closes#32396.
StampModTimes now normalizes the supplied time to UTC and truncates to
whole seconds before stamping. Without this, an SDK caller passing a
local-timezone or sub-second time.Time would produce a Chart.lock
generated: field with a timezone offset or fractional seconds, making
the lock file content non-reproducible across machines even when the
same SOURCE_DATE_EPOCH value is used — defeating the purpose of the
feature.
Also add:
- testdata/charts/chart-with-lock fixture: a minimal chart with a
Chart.lock whose generated: timestamp predates SOURCE_DATE_EPOCH.
- TestRunWithSourceDateEpochStampsLockGenerated: packages the fixture
with SourceDateEpoch set to a non-UTC, sub-second time.Time and
asserts that the resulting archive's Chart.lock entry has both the
correct tar modtime and the correct (normalized) generated: value in
the marshaled YAML.
Signed-off-by: Ilya Kiselev <kis-ilya-a@yandex.ru>
If the CLI-side description validation is removed, the unicode/utf8 import becomes unused and should also be dropped.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: MrJack <36191829+biagiopietro@users.noreply.github.com>
Move description length validation to the beginning of Run(), before
IsReachable(), so programmatic callers get an immediate validation
error instead of a potentially misleading cluster reachability failure.
Signed-off-by: MrJack <36191829+biagiopietro@users.noreply.github.com>
Remove duplicate rollback-with-description.txt fixture that had
identical content to rollback.txt.
Signed-off-by: MrJack <36191829+biagiopietro@users.noreply.github.com>
Add a new --description flag to the helm rollback command that allows
users to specify a custom description explaining why the rollback was
performed. This description is stored in the release metadata.
Changes:
- Add Description field to the Rollback action struct
- Add --description flag to the rollback CLI command
- Add 512 character limit validation for the description
- Default to 'Rollback to <version>' when no description is provided
The description flag is optional and follows the same pattern used by
the install and upgrade commands.
Closes #XXXX
Signed-off-by: MrJack <36191829+biagiopietro@users.noreply.github.com>