From fd136276017aa62cd5b2d43e770ebb13b61e1699 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 20 Aug 2026 08:19:48 -0700 Subject: [PATCH] Make Netlify queue mode update idempotent Unset the existing queue mode before recreating it with production function scope. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 94db1c6d-c054-464e-8b19-b6c448fef95f --- .github/scripts/pull-request-dashboard/test_rollout.py | 4 +++- .github/workflows/pull-request-dashboard-deploy-webhook.yml | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/scripts/pull-request-dashboard/test_rollout.py b/.github/scripts/pull-request-dashboard/test_rollout.py index 3d5432dff387..626060864be0 100644 --- a/.github/scripts/pull-request-dashboard/test_rollout.py +++ b/.github/scripts/pull-request-dashboard/test_rollout.py @@ -169,12 +169,14 @@ def test_webhook_deployment_automates_queue_rollout(self) -> None: canary_default = body.index("queue_mode=canary") stable_guard = body.index("stable_queue_ready=true") all_selection = body.index("queue_mode=all") + environment_remove = body.index("env:unset PR_DASHBOARD_QUEUE_MODE") environment_write = body.index( 'env:set PR_DASHBOARD_QUEUE_MODE "$queue_mode"' ) self.assertLess(canary_default, stable_guard) self.assertLess(stable_guard, all_selection) - self.assertLess(all_selection, environment_write) + self.assertLess(all_selection, environment_remove) + self.assertLess(environment_remove, environment_write) if __name__ == "__main__": diff --git a/.github/workflows/pull-request-dashboard-deploy-webhook.yml b/.github/workflows/pull-request-dashboard-deploy-webhook.yml index fa52b2185fce..b3f66eaae15a 100644 --- a/.github/workflows/pull-request-dashboard-deploy-webhook.yml +++ b/.github/workflows/pull-request-dashboard-deploy-webhook.yml @@ -88,6 +88,10 @@ jobs: --site "$NETLIFY_SITE_ID" \ --auth "$NETLIFY_AUTH_TOKEN" \ --force || true + npx --yes netlify-cli@26.0.2 env:unset PR_DASHBOARD_QUEUE_MODE \ + --site "$NETLIFY_SITE_ID" \ + --auth "$NETLIFY_AUTH_TOKEN" \ + --force || true npx --yes netlify-cli@26.0.2 env:set OTELBOT_SHARED_WORKFLOWS_CLIENT_ID "$OTELBOT_SHARED_WORKFLOWS_CLIENT_ID" \ --context production \ --scope functions \