mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-25 09:01:12 +00:00
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:
4
.github/workflows/qa-profile-evidence.yml
vendored
4
.github/workflows/qa-profile-evidence.yml
vendored
@@ -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"
|
||||
|
||||
@@ -4317,6 +4317,25 @@ printf '%s\n' "\${CURL_SUCCESS_IP:-203.0.113.7}"
|
||||
},
|
||||
);
|
||||
|
||||
it("bounds QA profile selected-ref fetches", () => {
|
||||
const validateSelectedRef = expectDefined(
|
||||
readQaProfileEvidenceWorkflow().jobs.validate_selected_ref.steps.find(
|
||||
(step: WorkflowStep) => step.name === "Validate selected ref",
|
||||
),
|
||||
"QA profile selected-ref validation step",
|
||||
);
|
||||
const gitFetchLines = validateSelectedRef.run
|
||||
.split("\n")
|
||||
.filter((line: string) => line.includes("git fetch"));
|
||||
|
||||
expect(gitFetchLines).toHaveLength(2);
|
||||
expect(
|
||||
gitFetchLines.every((line: string) =>
|
||||
line.trimStart().startsWith("timeout --signal=TERM --kill-after=10s 120s git fetch"),
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("keeps maturity scorecard generated QA evidence handoff strict", () => {
|
||||
const maturityWorkflow = readMaturityScorecardWorkflow();
|
||||
const qaEvidenceWorkflow = readQaProfileEvidenceWorkflow();
|
||||
|
||||
Reference in New Issue
Block a user