Skip to content

Commit 57e4994

Browse files
committed
ci: speed up release validation
1 parent fc2d957 commit 57e4994

16 files changed

Lines changed: 427 additions & 292 deletions

.agents/skills/openclaw-testing/SKILL.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ PRs, main pushes, and ad hoc broad CI checks do not spend Docker/package time or
160160
all-plugin runtime time on release-only product coverage.
161161

162162
If a full run is already active on a newer `origin/main`, prefer watching that
163-
run over dispatching a duplicate. If you accidentally dispatch a stale duplicate,
164-
cancel it and monitor the current run.
163+
run over dispatching a duplicate. Do not cancel release, release-check, or child
164+
workflow runs unless Peter explicitly asks for cancellation.
165165

166166
The child-dispatch jobs record the child run ids. The final
167167
`Verify full validation` job re-queries those child runs and is the canonical
@@ -174,9 +174,11 @@ Supported umbrella groups are `all`, `ci`, `plugin-prerelease`,
174174
`release-checks`, `install-smoke`, `cross-os`, `live-e2e`, `package`, `qa`,
175175
`qa-parity`, `qa-live`, and `npm-telegram`. Use the narrowest group that covers
176176
the failed box. After a targeted release-check fix, do not restart the full
177-
umbrella by habit: dispatch the matching `rerun_group`, cancel older duplicate
178-
runs for the same target/group, and rerun only the parent verifier/evidence step
179-
after the child is green unless the release evidence is stale.
177+
umbrella by habit: dispatch the matching `rerun_group` and rerun only the parent
178+
verifier/evidence step after the child is green unless the release evidence is
179+
stale. For a single failed live/E2E shard, use
180+
`-f rerun_group=live-e2e -f live_suite_filter=<suite_id>` so the Blacksmith
181+
workflow only spends setup and queue time on that suite.
180182

181183
### Release Evidence
182184

.github/workflows/full-release-validation.yml

Lines changed: 26 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ on:
5353
- qa-parity
5454
- qa-live
5555
- npm-telegram
56+
live_suite_filter:
57+
description: Optional exact live suite id for focused live/E2E reruns; blank runs all selected live suites
58+
required: false
59+
default: ""
60+
type: string
5661
npm_telegram_package_spec:
5762
description: Optional published package spec for the post-publish Telegram E2E lane
5863
required: false
@@ -83,7 +88,7 @@ permissions:
8388

8489
concurrency:
8590
group: full-release-validation-${{ inputs.ref }}-${{ inputs.rerun_group }}
86-
cancel-in-progress: true
91+
cancel-in-progress: false
8792

8893
env:
8994
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
@@ -123,6 +128,7 @@ jobs:
123128
NPM_TELEGRAM_PACKAGE_SPEC: ${{ inputs.npm_telegram_package_spec }}
124129
EVIDENCE_PACKAGE_SPEC: ${{ inputs.evidence_package_spec }}
125130
RERUN_GROUP: ${{ inputs.rerun_group }}
131+
LIVE_SUITE_FILTER: ${{ inputs.live_suite_filter }}
126132
run: |
127133
{
128134
echo "## Full release validation"
@@ -131,6 +137,9 @@ jobs:
131137
echo "- Target SHA: \`${TARGET_SHA}\`"
132138
echo "- Child workflow ref: \`${CHILD_WORKFLOW_REF}\`"
133139
echo "- Rerun group: \`${RERUN_GROUP}\`"
140+
if [[ -n "${LIVE_SUITE_FILTER// }" ]]; then
141+
echo "- Live suite filter: \`${LIVE_SUITE_FILTER}\`"
142+
fi
134143
if [[ "$RERUN_GROUP" == "all" || "$RERUN_GROUP" == "ci" ]]; then
135144
echo "- Normal CI: \`CI\` with \`target_ref=${TARGET_SHA}\`"
136145
else
@@ -213,19 +222,6 @@ jobs:
213222
echo "Dispatched ${workflow}: https://github.com/${GITHUB_REPOSITORY}/actions/runs/${run_id}"
214223
echo "run_id=${run_id}" >> "$GITHUB_OUTPUT"
215224
216-
cleanup_child_run() {
217-
local exit_code=$?
218-
trap - EXIT INT TERM
219-
local child_status
220-
child_status="$(gh run view "$run_id" --json status --jq '.status' 2>/dev/null || true)"
221-
if [[ "$child_status" != "completed" ]]; then
222-
echo "Cancelling child ${workflow} run ${run_id} after parent exit (${exit_code})."
223-
gh run cancel "$run_id" || gh api -X POST "repos/${GITHUB_REPOSITORY}/actions/runs/${run_id}/force-cancel" || true
224-
fi
225-
return "$exit_code"
226-
}
227-
trap cleanup_child_run EXIT INT TERM
228-
229225
while true; do
230226
status="$(gh run view "$run_id" --json status --jq '.status')"
231227
if [[ "$status" == "completed" ]]; then
@@ -252,23 +248,6 @@ jobs:
252248
echo "- Target SHA: \`${TARGET_SHA}\`"
253249
} >> "$GITHUB_STEP_SUMMARY"
254250
255-
cancel_same_sha_push_ci() {
256-
local run_ids run_id
257-
run_ids="$(
258-
gh run list --workflow ci.yml --limit 100 --json databaseId,event,headSha,status \
259-
--jq 'map(select(.event == "push" and .headSha == env.TARGET_SHA and (.status == "queued" or .status == "in_progress" or .status == "waiting" or .status == "pending"))) | .[].databaseId'
260-
)"
261-
if [[ -z "${run_ids// }" ]]; then
262-
return 0
263-
fi
264-
while IFS= read -r run_id; do
265-
[[ -n "${run_id// }" ]] || continue
266-
echo "Cancelling same-SHA push CI run ${run_id}; Full Release Validation dispatches the full manual CI child for ${TARGET_SHA}."
267-
gh run cancel "$run_id" || gh api -X POST "repos/${GITHUB_REPOSITORY}/actions/runs/${run_id}/force-cancel" || true
268-
done <<< "$run_ids"
269-
}
270-
271-
cancel_same_sha_push_ci
272251
dispatch_and_wait ci.yml -f target_ref="$TARGET_SHA" -f include_android=true
273252
274253
plugin_prerelease:
@@ -328,19 +307,6 @@ jobs:
328307
echo "Dispatched ${workflow}: https://github.com/${GITHUB_REPOSITORY}/actions/runs/${run_id}"
329308
echo "run_id=${run_id}" >> "$GITHUB_OUTPUT"
330309
331-
cleanup_child_run() {
332-
local exit_code=$?
333-
trap - EXIT INT TERM
334-
local child_status
335-
child_status="$(gh run view "$run_id" --json status --jq '.status' 2>/dev/null || true)"
336-
if [[ "$child_status" != "completed" ]]; then
337-
echo "Cancelling child ${workflow} run ${run_id} after parent exit (${exit_code})."
338-
gh run cancel "$run_id" || gh api -X POST "repos/${GITHUB_REPOSITORY}/actions/runs/${run_id}/force-cancel" || true
339-
fi
340-
return "$exit_code"
341-
}
342-
trap cleanup_child_run EXIT INT TERM
343-
344310
while true; do
345311
status="$(gh run view "$run_id" --json status --jq '.status')"
346312
if [[ "$status" == "completed" ]]; then
@@ -391,6 +357,7 @@ jobs:
391357
MODE: ${{ inputs.mode }}
392358
RELEASE_PROFILE: ${{ inputs.release_profile }}
393359
RERUN_GROUP: ${{ inputs.rerun_group }}
360+
LIVE_SUITE_FILTER: ${{ inputs.live_suite_filter }}
394361
run: |
395362
set -euo pipefail
396363
@@ -430,19 +397,6 @@ jobs:
430397
echo "Dispatched ${workflow}: https://github.com/${GITHUB_REPOSITORY}/actions/runs/${run_id}"
431398
echo "run_id=${run_id}" >> "$GITHUB_OUTPUT"
432399
433-
cleanup_child_run() {
434-
local exit_code=$?
435-
trap - EXIT INT TERM
436-
local child_status
437-
child_status="$(gh run view "$run_id" --json status --jq '.status' 2>/dev/null || true)"
438-
if [[ "$child_status" != "completed" ]]; then
439-
echo "Cancelling child ${workflow} run ${run_id} after parent exit (${exit_code})."
440-
gh run cancel "$run_id" || gh api -X POST "repos/${GITHUB_REPOSITORY}/actions/runs/${run_id}/force-cancel" || true
441-
fi
442-
return "$exit_code"
443-
}
444-
trap cleanup_child_run EXIT INT TERM
445-
446400
while true; do
447401
status="$(gh run view "$run_id" --json status --jq '.status')"
448402
if [[ "$status" == "completed" ]]; then
@@ -471,20 +425,29 @@ jobs:
471425
echo "- Cross-OS mode: \`${MODE}\`"
472426
echo "- Release profile: \`${RELEASE_PROFILE}\`"
473427
echo "- Rerun group: \`${RERUN_GROUP}\`"
428+
if [[ -n "${LIVE_SUITE_FILTER// }" ]]; then
429+
echo "- Live suite filter: \`${LIVE_SUITE_FILTER}\`"
430+
fi
474431
} >> "$GITHUB_STEP_SUMMARY"
475432
476433
child_rerun_group="$RERUN_GROUP"
477434
if [[ "$child_rerun_group" == "release-checks" ]]; then
478435
child_rerun_group=all
479436
fi
480437
481-
dispatch_and_wait openclaw-release-checks.yml \
482-
-f ref="$TARGET_SHA" \
483-
-f expected_sha="$TARGET_SHA" \
484-
-f provider="$PROVIDER" \
485-
-f mode="$MODE" \
486-
-f release_profile="$RELEASE_PROFILE" \
438+
args=(
439+
-f ref="$TARGET_SHA"
440+
-f expected_sha="$TARGET_SHA"
441+
-f provider="$PROVIDER"
442+
-f mode="$MODE"
443+
-f release_profile="$RELEASE_PROFILE"
487444
-f rerun_group="$child_rerun_group"
445+
)
446+
if [[ -n "${LIVE_SUITE_FILTER// }" ]]; then
447+
args+=(-f live_suite_filter="$LIVE_SUITE_FILTER")
448+
fi
449+
450+
dispatch_and_wait openclaw-release-checks.yml "${args[@]}"
488451
489452
npm_telegram:
490453
name: Run post-publish Telegram E2E
@@ -538,19 +501,6 @@ jobs:
538501
echo "Dispatched npm-telegram-beta-e2e.yml: https://github.com/${GITHUB_REPOSITORY}/actions/runs/${run_id}"
539502
echo "run_id=${run_id}" >> "$GITHUB_OUTPUT"
540503
541-
cleanup_child_run() {
542-
local exit_code=$?
543-
trap - EXIT INT TERM
544-
local child_status
545-
child_status="$(gh run view "$run_id" --json status --jq '.status' 2>/dev/null || true)"
546-
if [[ "$child_status" != "completed" ]]; then
547-
echo "Cancelling npm-telegram-beta-e2e.yml child run ${run_id} after parent exit (${exit_code})."
548-
gh run cancel "$run_id" || gh api -X POST "repos/${GITHUB_REPOSITORY}/actions/runs/${run_id}/force-cancel" || true
549-
fi
550-
return "$exit_code"
551-
}
552-
trap cleanup_child_run EXIT INT TERM
553-
554504
while true; do
555505
status="$(gh run view "$run_id" --json status --jq '.status')"
556506
if [[ "$status" == "completed" ]]; then

0 commit comments

Comments
 (0)