From a9bc5e39d530f0cb9e235c16dcbfa3b66f89320c Mon Sep 17 00:00:00 2001 From: core-fe Date: Wed, 20 May 2026 17:36:09 -0700 Subject: [PATCH] ci: reduce scheduled runner load and prep prebaked browsers --- .gitea/workflows/ci.yml | 2 +- .gitea/workflows/continuous-synth-e2e.yml | 14 +++++++++++++- .gitea/workflows/e2e-chat.yml | 9 ++++++++- .gitea/workflows/e2e-staging-canvas.yml | 9 ++++++++- .gitea/workflows/gitea-merge-queue.yml | 8 ++++++-- .gitea/workflows/status-reaper.yml | 19 ++++++------------- 6 files changed, 42 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index fb8adaa85..a96e96d15 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -319,7 +319,7 @@ jobs: with: node-version: '22' - if: always() - run: rm -f package-lock.json && npm install + run: npm ci --include=optional --prefer-offline - if: always() run: npm run build - if: always() diff --git a/.gitea/workflows/continuous-synth-e2e.yml b/.gitea/workflows/continuous-synth-e2e.yml index 41f8dd4ac..8b5f08546 100644 --- a/.gitea/workflows/continuous-synth-e2e.yml +++ b/.gitea/workflows/continuous-synth-e2e.yml @@ -43,6 +43,18 @@ name: Continuous synthetic E2E (staging) on: schedule: + # Every 30 minutes, on :02 and :32. This keeps a recurring SaaS + # behavior probe while cutting runner occupancy from this workflow by + # roughly two thirds; fast liveness belongs in the lighter smoke/heartbeat + # probes, not in a full tenant/workspace synth every 10 minutes. + # + # Previous cadence was every 10 minutes (:02 :12 :22 :32 :42 :52). + # The current operator-host runner pool is the bottleneck, so full + # synth E2E is deliberately lower-cadence until it moves to a dedicated + # runner host or warm-runtime pool. + # + # Historical notes from the 10-minute shape: + # # Every 10 minutes, on :02 :12 :22 :32 :42 :52. Three constraints: # 1. Stay off the top-of-hour. GitHub Actions scheduler drops # :00 firings under high load (own docs: @@ -66,7 +78,7 @@ on: # fires = ~30 min cadence; closer to the 20-min target than the # current shape and provides a real degradation alarm if drops # get worse. - - cron: '2,12,22,32,42,52 * * * *' + - cron: '2,32 * * * *' permissions: contents: read # No issue-write here — failures surface as red runs in the workflow diff --git a/.gitea/workflows/e2e-chat.yml b/.gitea/workflows/e2e-chat.yml index c17c17d07..986e5dab0 100644 --- a/.gitea/workflows/e2e-chat.yml +++ b/.gitea/workflows/e2e-chat.yml @@ -230,7 +230,14 @@ jobs: - name: Install Playwright browsers if: needs.detect-changes.outputs.chat == 'true' working-directory: canvas - run: npx playwright install --with-deps chromium + run: | + PREBAKED_PLAYWRIGHT=/ms-playwright + if [ -d "${PREBAKED_PLAYWRIGHT}" ] && find "${PREBAKED_PLAYWRIGHT}" -maxdepth 3 -type f -name 'chrome' | grep -q .; then + echo "Using prebaked Playwright Chromium from ${PREBAKED_PLAYWRIGHT}" + echo "PLAYWRIGHT_BROWSERS_PATH=${PREBAKED_PLAYWRIGHT}" >> "$GITHUB_ENV" + exit 0 + fi + npx playwright install --with-deps chromium - name: Start canvas dev server (background) if: needs.detect-changes.outputs.chat == 'true' diff --git a/.gitea/workflows/e2e-staging-canvas.yml b/.gitea/workflows/e2e-staging-canvas.yml index 6f55179bb..c0c57a70c 100644 --- a/.gitea/workflows/e2e-staging-canvas.yml +++ b/.gitea/workflows/e2e-staging-canvas.yml @@ -169,7 +169,14 @@ jobs: - name: Install Playwright browsers if: needs.detect-changes.outputs.canvas == 'true' timeout-minutes: 10 - run: npx playwright install --with-deps chromium + run: | + PREBAKED_PLAYWRIGHT=/ms-playwright + if [ -d "${PREBAKED_PLAYWRIGHT}" ] && find "${PREBAKED_PLAYWRIGHT}" -maxdepth 3 -type f -name 'chrome' | grep -q .; then + echo "Using prebaked Playwright Chromium from ${PREBAKED_PLAYWRIGHT}" + echo "PLAYWRIGHT_BROWSERS_PATH=${PREBAKED_PLAYWRIGHT}" >> "$GITHUB_ENV" + exit 0 + fi + npx playwright install --with-deps chromium - name: Run staging canvas E2E if: needs.detect-changes.outputs.canvas == 'true' diff --git a/.gitea/workflows/gitea-merge-queue.yml b/.gitea/workflows/gitea-merge-queue.yml index bb45e8536..c8628f37b 100644 --- a/.gitea/workflows/gitea-merge-queue.yml +++ b/.gitea/workflows/gitea-merge-queue.yml @@ -13,8 +13,12 @@ name: gitea-merge-queue # - add `merge-queue-hold` to pause a queued PR without removing it on: - schedule: - - cron: '*/5 * * * *' + # Schedule moved to operator-config: + # /etc/cron.d/molecule-core-merge-queue -> + # /usr/local/bin/molecule-core-cron-bot.sh merge-queue + # + # The queue bot still processes one PR per tick, but no longer occupies + # one of the shared Actions runners just to poll. workflow_dispatch: permissions: diff --git a/.gitea/workflows/status-reaper.yml b/.gitea/workflows/status-reaper.yml index 9ddd63d59..ae55d8f87 100644 --- a/.gitea/workflows/status-reaper.yml +++ b/.gitea/workflows/status-reaper.yml @@ -53,19 +53,12 @@ name: status-reaper # `inputs:` block here. Gitea 1.22.6 rejects the whole workflow as # "unknown on type" when `workflow_dispatch.inputs.X` is present. on: - # SCHEDULE RE-ENABLED 2026-05-12 rev3 — interim disable (mc#645) reverted now that - # rev3 widens DEFAULT_SWEEP_LIMIT 10 → 30 (covers retroactive-failure timing window). - # Sibling watchdog re-enabled in the same PR with timeout-minutes raised 5 → 15. - schedule: - # Every 5 minutes. Off-zero alignment with sibling cron workflows: - # ci-required-drift (`:17`), main-red-watchdog (`:05`), - # railway-pin-audit (`:23`). 5-min cadence gives a tight enough - # close on schedule-triggered false-reds that main-red-watchdog - # (hourly :05) almost never files an issue on the false case. - # rev3 keeps `*/5` unchanged per hongming-pc2 03:25Z review: - # "trades window-width-cheap for cadence-loady" — N=30 widens - # the lookback cheaply without doubling runner load via `*/2`. - - cron: '*/5 * * * *' + # Schedule moved to operator-config: + # /etc/cron.d/molecule-core-status-reaper -> + # /usr/local/bin/molecule-core-cron-bot.sh status-reaper + # + # This keeps the 5-minute compensation cadence but stops a maintenance + # bot from consuming Gitea Actions runner slots during PR merge waves. workflow_dispatch: # Compensating-status POST needs write on repo statuses; no other -- 2.52.0