Repository navigation
Conversation
helm_upgrade always ran helm with --timeout 30s. With wait set, helm gives up after 30s on resources that are still becoming ready (an image pull is often longer), marks the release failed and the tool returns an error. Add a timeout input; 30s stays the default. Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
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.
runHelmCommandadds--timeout 30sto everyhelm upgradethehelm_upgradetool runs, and the tool has no way to change it. Helm's own default is5m0s. The timeout covers each Kubernetes operation, such as hook Jobs and, with--wait, the wait for resources to become ready. Sohelm_upgradewithwait: truefails for any release whose pods need more than 30 seconds (an image pull, a slow readiness probe, a migration hook). Helm then marks the revisionfailedand the tool reportsHelm upgrade command failed, though the rollout would have finished. The existing "upgrade with all options" test records that combination:--wait --timeout 30s.Change:
helm_upgradegets an optionaltimeoutinput, a Go duration (5m,90s). It is validated withtime.ParseDurationand must be positive, and it is passed as--timeout. Without it the tool still sends30s, so current callers and the existing test are unchanged. The other helm commands do not get a--timeout, as before.Tests (
TestHandleHelmUpgradeReleaseTimeout):wait: true, timeout: "5m"runshelm upgrade myapp stable/myapp --wait --timeout 5m0s, andsoon,0sand-1mare rejected before helm runs.go test -tags=test ./pkg/... ./internal/... ./cmd/...andgolangci-lint run --build-tags=testpass. The change merges cleanly with #109 and #110.AI disclosure: written with the help of Claude Code, reviewed and tested by me.