fix: add 60-second timeout to git fetch for mutable boilerplates-ref#55
Open
kitsuyui wants to merge 1 commit into
Open
fix: add 60-second timeout to git fetch for mutable boilerplates-ref#55kitsuyui wants to merge 1 commit into
kitsuyui wants to merge 1 commit into
Conversation
git fetch has no command-level timeout by default. Wrap the call with `timeout 60` to mirror the --max-time 30 used for curl downloads. A TCP hang (GitHub outage, NAT timeout, slow self-hosted runner) would otherwise block the job until GitHub Actions' global timeout-minutes. The timeout value is 60 s—2× the curl --max-time 30—to account for git's additional protocol negotiation overhead.
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
Add a 60-second wall-clock timeout to the
git fetchcall used when resolving mutableboilerplates-refvalues.Problem
action.ymlwraps curl downloads with--connect-timeout 10 --max-time 30, but thegit fetch --tags originon line 299 has no command-level timeout. A TCP hang (GitHub outage, NAT keepalive timeout, slow self-hosted runner) blocks the job until GitHub Actions' globaltimeout-minutes(default: 360 minutes).Change
Wrap the
git fetchwithtimeout 60:The 60-second value is 2× the
--max-time 30used for curl to account for git's additional protocol negotiation overhead.timeout(1)is part of GNU coreutils and is available on all GitHub-hosted Linux and macOS runners.Scope
Only affects the mutable-ref code path (branch name or tag name as
boilerplates-ref). Full SHA inputs skip thegit fetchentirely and are unaffected.