From 18771f98e4891be84bc4e83cc617f75601814990 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 17:39:24 +0000 Subject: [PATCH] ci: fall back to the old guard script path on the base checkout --- .github/workflows/cost-map-guard.yml | 7 ++++++- .github/workflows/spend-logs-guard.yml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cost-map-guard.yml b/.github/workflows/cost-map-guard.yml index b0ac841fd15..cfa0fc0fa87 100644 --- a/.github/workflows/cost-map-guard.yml +++ b/.github/workflows/cost-map-guard.yml @@ -49,7 +49,12 @@ jobs: HEAD_SHA: ${{ github.event.pull_request.head.sha }} HEAD_REF: ${{ github.event.pull_request.head.ref }} run: | - uv run --no-project python scripts/ci_cd/cost_map_guard.py --base "$MERGE_BASE" --head "$HEAD_SHA" --head-ref "$HEAD_REF" + guard=scripts/ci_cd/cost_map_guard.py + # TODO: Drop the legacy path after this lands on main. + if [ ! -f "$guard" ]; then + guard=ci_cd/cost_map_guard.py + fi + uv run --no-project python "$guard" --base "$MERGE_BASE" --head "$HEAD_SHA" --head-ref "$HEAD_REF" - name: Check whether the pull request changes the cost map id: changed env: diff --git a/.github/workflows/spend-logs-guard.yml b/.github/workflows/spend-logs-guard.yml index 37703437c03..26523450013 100644 --- a/.github/workflows/spend-logs-guard.yml +++ b/.github/workflows/spend-logs-guard.yml @@ -42,4 +42,9 @@ jobs: MERGE_BASE: ${{ steps.revisions.outputs.merge_base }} HEAD_SHA: ${{ github.event.pull_request.head.sha }} run: | - uv run --no-project --with pydantic==2.14.1 python scripts/ci_cd/spend_logs_guard.py --base "$MERGE_BASE" --head "$HEAD_SHA" --approver kerry-berri --reviews "$RUNNER_TEMP/reviews.json" + guard=scripts/ci_cd/spend_logs_guard.py + # TODO: Drop the legacy path after this lands on main. + if [ ! -f "$guard" ]; then + guard=ci_cd/spend_logs_guard.py + fi + uv run --no-project --with pydantic==2.14.1 python "$guard" --base "$MERGE_BASE" --head "$HEAD_SHA" --approver kerry-berri --reviews "$RUNNER_TEMP/reviews.json"