fix(ci): bound qa-profile-evidence git fetch operations with timeout (#110282)

* fix(ci): bound qa-profile-evidence git fetch operations with timeout

* fix(ci): bound qa-profile-evidence git fetch operations with timeout

ci: retrigger checks

* test(ci): guard QA evidence fetch timeouts

Co-authored-by: wanyongstar <wan.yong@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
This commit is contained in:
wanyongstar
2026-07-18 13:34:43 +08:00
committed by GitHub
parent c1e5c1d4fa
commit e6534018e1
2 changed files with 21 additions and 2 deletions

View File

@@ -157,14 +157,14 @@ jobs:
exit 1
fi
git fetch --no-tags origin +refs/heads/main:refs/remotes/origin/main
timeout --signal=TERM --kill-after=10s 120s git fetch --no-tags origin +refs/heads/main:refs/remotes/origin/main
if git merge-base --is-ancestor "$selected_revision" refs/remotes/origin/main; then
trusted_reason="main-ancestor"
elif git tag --points-at "$selected_revision" | grep -Eq '^v'; then
trusted_reason="release-tag"
elif [[ "$INPUT_REF" =~ ^release/[0-9]{4}\.[0-9]+\.[0-9]+$ ]]; then
git fetch --no-tags origin "+refs/heads/${INPUT_REF}:refs/remotes/origin/${INPUT_REF}"
timeout --signal=TERM --kill-after=10s 120s git fetch --no-tags origin "+refs/heads/${INPUT_REF}:refs/remotes/origin/${INPUT_REF}"
release_branch_sha="$(git rev-parse "refs/remotes/origin/${INPUT_REF}")"
if [[ "$selected_revision" == "$release_branch_sha" ]]; then
trusted_reason="release-branch-head"