From a56de5f12291479df347e2eaa3b8769e5f240ef3 Mon Sep 17 00:00:00 2001 From: Aditya Sheth Date: Wed, 18 Nov 2026 11:35:22 +0530 Subject: [PATCH 1/3] needs_ci_dev / needs_ci_dev:lite and needs_sandbox:dev: CI k8s in the dev account (ENG-226579) - needs_ci_dev, needs_ci_dev:lite: add the label and start ci_k8s_full_dev.yml / ci_k8s_lite_dev.yml (vscode), which run the suite pods in the dev region's account and remove the label when they finish. - needs_sandbox:dev: `sandbox :test_tube:` and sandbox.yml region=dev. `dev` moves from the hours group to the region group: until now `needs_sandbox:dev` matched the hours group and started a us-west-2 sandbox. - stop_sandbox stops the dev sandbox too. Co-Authored-By: Claude Opus 5.5 --- entrypoint.sh | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 69e744f..7d74aae 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,7 +2,7 @@ # Varun Chopra # # This action runs every time a comment is added to a pull request. -# Accepts the following commands: shipit, needs_ci, needs_sandbox, e2e_needs_sandbox +# Accepts the following commands: shipit, needs_ci, needs_ci_dev, needs_sandbox, e2e_needs_sandbox set -e @@ -64,7 +64,7 @@ ci_k8s_request() { # ci_k8s_request : start a CI k8s run of this # one here also starts or stops the CI k8s sandbox (sandbox.yml). Never fails the action. # # A regional label (`sandbox :australia:` from needs_sandbox:ap) passes its region, the -# needs_sandbox suffix (eu, ca, gov, uae, wu, ap). Which regions have a CI k8s sandbox is +# needs_sandbox suffix (eu, ca, gov, uae, wu, ap, dev -- dev: the dev region's account). Which regions have a CI k8s sandbox is # sandbox.yml's own list (its region input's options): it rejects any other (HTTP 422), # which leaves the fleet's sandbox alone. sandbox_k8s_request() { # sandbox_k8s_request [region]: start or stop this PR's CI k8s sandbox @@ -214,6 +214,26 @@ if [[ $comment_body == "needs_ci:lite" ]]; then fi fi +# CI k8s with its suite pods in the dev region's account: needs_ci_dev (full) and +# needs_ci_dev:lite. The label, and its run (ci_k8s_full_dev.yml / ci_k8s_lite_dev.yml), +# which removes the label when it finishes. No fleet side and no ci_verified to reset. +if [[ $comment_body == "needs_ci_dev" || $comment_body == "needs_ci_dev:lite" ]]; then + already_needs_ci_dev=false + for label in $labels; do + if [[ "$label" == "$comment_body" ]]; then + already_needs_ci_dev=true + fi + done + if [[ "$already_needs_ci_dev" == false ]]; then + add_label "$comment_body" + if [[ $comment_body == "needs_ci_dev" ]]; then + ci_k8s_request "ci_k8s_full_dev.yml" + else + ci_k8s_request "ci_k8s_lite_dev.yml" + fi + fi +fi + if [[ $comment_body == "needs_ci${alt_python_version}" ]]; then for label in $labels; do case $label in @@ -309,7 +329,7 @@ if [[ $comment_body =~ ^(e2e_)?needs_sandbox(:${alternate_python_version})(:(eu| fi fi -elif [[ $comment_body =~ ^(e2e_)?needs_sandbox(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?([ \t]*)?$ ]]; then +elif [[ $comment_body =~ ^(e2e_)?needs_sandbox(:(eu|gov|ca|uae|wu|ap|dev))?(:(([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?([ \t]*)?$ ]]; then for label in $labels; do case $label in sandbox) @@ -333,6 +353,9 @@ elif [[ $comment_body =~ ^(e2e_)?needs_sandbox(:(eu|gov|ca|uae|wu|ap))?(:(dev|([ "sandbox :australia:") already_needs_sandbox=true ;; + "sandbox :test_tube:") + already_needs_sandbox=true + ;; *) echo "Unknown label $label" ;; @@ -357,6 +380,10 @@ elif [[ $comment_body =~ ^(e2e_)?needs_sandbox(:(eu|gov|ca|uae|wu|ap))?(:(dev|([ elif [[ $comment_body =~ (e2e_)?needs_sandbox:ap ]]; then add_label "sandbox :australia:" sandbox_k8s_request start ap + elif [[ $comment_body =~ (e2e_)?needs_sandbox:dev ]]; then + # The dev region's account: CI k8s only (no fleet host polls this label). + add_label "sandbox :test_tube:" + sandbox_k8s_request start dev else add_label "sandbox" sandbox_k8s_request start @@ -395,6 +422,10 @@ if [[ $comment_body == "stop_sandbox" ]]; then remove_label "sandbox%20:australia:" sandbox_k8s_request stop ap ;; + "sandbox :test_tube:") + remove_label "sandbox%20:test_tube:" + sandbox_k8s_request stop dev + ;; sandbox:${alternate_python_version}) remove_label "sandbox:${alternate_python_version}" ;; From fd322bf2f8606eeae63da84eb4f58af064a18841 Mon Sep 17 00:00:00 2001 From: Aditya Sheth Date: Wed, 18 Nov 2026 14:24:25 +0530 Subject: [PATCH 2/3] needs_ci_dev: dispatch ci_k8s_full.yml / ci_k8s_lite.yml with account dev The dev runs are now a job of the existing CI k8s workflows (vscode#125595), not files of their own. ci_k8s_request takes an optional account; a prod request's payload is unchanged. Co-Authored-By: Claude Opus 5.5 --- entrypoint.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 7d74aae..a56af57 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -50,13 +50,15 @@ AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}" # workflow. A label added with GITHUB_TOKEN starts no workflow, so it is started with # workflow_dispatch, which GITHUB_TOKEN may trigger (needs `actions: write`). Never fails # the action. -ci_k8s_request() { # ci_k8s_request : start a CI k8s run of this PR +ci_k8s_request() { # ci_k8s_request [account]: start a CI k8s run of this PR [[ "${CI_K8S_TRIGGER:-false}" == "true" ]] || return 0 - local ref + local ref inputs ref=$(jq -r '.repository.default_branch // "master"' "$GITHUB_EVENT_PATH") - curl -sSL -o /dev/null -w "dispatch $1: HTTP %{http_code}\n" \ + # account: dev runs in the dev region's account (the workflow's dev job); none: prod. + inputs="\"pr\":\"${number}\"${2:+,\"account\":\"$2\"}" + curl -sSL -o /dev/null -w "dispatch $1 ${2:-prod}: HTTP %{http_code}\n" \ -H "${AUTH_HEADER}" -H "${API_HEADER}" -X POST -H "Content-Type: application/json" \ - -d "{\"ref\":\"${ref}\",\"inputs\":{\"pr\":\"${number}\"}}" \ + -d "{\"ref\":\"${ref}\",\"inputs\":{${inputs}}}" \ "${URI}/repos/${GITHUB_REPOSITORY}/actions/workflows/${1}/dispatches" || true } @@ -214,9 +216,9 @@ if [[ $comment_body == "needs_ci:lite" ]]; then fi fi -# CI k8s with its suite pods in the dev region's account: needs_ci_dev (full) and -# needs_ci_dev:lite. The label, and its run (ci_k8s_full_dev.yml / ci_k8s_lite_dev.yml), -# which removes the label when it finishes. No fleet side and no ci_verified to reset. +# CI k8s in the dev region's account: needs_ci_dev (full) and needs_ci_dev:lite. The +# label, and its run (ci_k8s_full.yml / ci_k8s_lite.yml with account dev), which removes +# the label when it finishes. No fleet side and no ci_verified to reset. if [[ $comment_body == "needs_ci_dev" || $comment_body == "needs_ci_dev:lite" ]]; then already_needs_ci_dev=false for label in $labels; do @@ -227,9 +229,9 @@ if [[ $comment_body == "needs_ci_dev" || $comment_body == "needs_ci_dev:lite" ]] if [[ "$already_needs_ci_dev" == false ]]; then add_label "$comment_body" if [[ $comment_body == "needs_ci_dev" ]]; then - ci_k8s_request "ci_k8s_full_dev.yml" + ci_k8s_request "ci_k8s_full.yml" dev else - ci_k8s_request "ci_k8s_lite_dev.yml" + ci_k8s_request "ci_k8s_lite.yml" dev fi fi fi From 893a3f89589884f4d205673fed99cdd42798107a Mon Sep 17 00:00:00 2001 From: Aditya Sheth Date: Thu, 19 Nov 2026 16:10:03 +0530 Subject: [PATCH 3/3] needs_ci_dev: dispatch with ef_region dev-us, not account dev The vscode workflows (vscode#125595) take the EF region the run happens in. Co-Authored-By: Claude Opus 5.5 --- entrypoint.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index a56af57..746cc2f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -50,13 +50,13 @@ AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}" # workflow. A label added with GITHUB_TOKEN starts no workflow, so it is started with # workflow_dispatch, which GITHUB_TOKEN may trigger (needs `actions: write`). Never fails # the action. -ci_k8s_request() { # ci_k8s_request [account]: start a CI k8s run of this PR +ci_k8s_request() { # ci_k8s_request [ef_region]: start a CI k8s run of this PR [[ "${CI_K8S_TRIGGER:-false}" == "true" ]] || return 0 local ref inputs ref=$(jq -r '.repository.default_branch // "master"' "$GITHUB_EVENT_PATH") - # account: dev runs in the dev region's account (the workflow's dev job); none: prod. - inputs="\"pr\":\"${number}\"${2:+,\"account\":\"$2\"}" - curl -sSL -o /dev/null -w "dispatch $1 ${2:-prod}: HTTP %{http_code}\n" \ + # ef_region: dev-us runs in the dev region (the workflow's dev job); none: us-west-2. + inputs="\"pr\":\"${number}\"${2:+,\"ef_region\":\"$2\"}" + curl -sSL -o /dev/null -w "dispatch $1 ${2:-us-west-2}: HTTP %{http_code}\n" \ -H "${AUTH_HEADER}" -H "${API_HEADER}" -X POST -H "Content-Type: application/json" \ -d "{\"ref\":\"${ref}\",\"inputs\":{${inputs}}}" \ "${URI}/repos/${GITHUB_REPOSITORY}/actions/workflows/${1}/dispatches" || true @@ -66,7 +66,7 @@ ci_k8s_request() { # ci_k8s_request [account]: start a CI k8s r # one here also starts or stops the CI k8s sandbox (sandbox.yml). Never fails the action. # # A regional label (`sandbox :australia:` from needs_sandbox:ap) passes its region, the -# needs_sandbox suffix (eu, ca, gov, uae, wu, ap, dev -- dev: the dev region's account). Which regions have a CI k8s sandbox is +# needs_sandbox suffix (eu, ca, gov, uae, wu, ap, dev -- dev: the dev region, dev-us). Which regions have a CI k8s sandbox is # sandbox.yml's own list (its region input's options): it rejects any other (HTTP 422), # which leaves the fleet's sandbox alone. sandbox_k8s_request() { # sandbox_k8s_request [region]: start or stop this PR's CI k8s sandbox @@ -216,8 +216,8 @@ if [[ $comment_body == "needs_ci:lite" ]]; then fi fi -# CI k8s in the dev region's account: needs_ci_dev (full) and needs_ci_dev:lite. The -# label, and its run (ci_k8s_full.yml / ci_k8s_lite.yml with account dev), which removes +# CI k8s in the dev region (dev-us): needs_ci_dev (full) and needs_ci_dev:lite. The +# label, and its run (ci_k8s_full.yml / ci_k8s_lite.yml with ef_region dev-us), which removes # the label when it finishes. No fleet side and no ci_verified to reset. if [[ $comment_body == "needs_ci_dev" || $comment_body == "needs_ci_dev:lite" ]]; then already_needs_ci_dev=false @@ -229,9 +229,9 @@ if [[ $comment_body == "needs_ci_dev" || $comment_body == "needs_ci_dev:lite" ]] if [[ "$already_needs_ci_dev" == false ]]; then add_label "$comment_body" if [[ $comment_body == "needs_ci_dev" ]]; then - ci_k8s_request "ci_k8s_full.yml" dev + ci_k8s_request "ci_k8s_full.yml" dev-us else - ci_k8s_request "ci_k8s_lite.yml" dev + ci_k8s_request "ci_k8s_lite.yml" dev-us fi fi fi @@ -383,7 +383,7 @@ elif [[ $comment_body =~ ^(e2e_)?needs_sandbox(:(eu|gov|ca|uae|wu|ap|dev))?(:(([ add_label "sandbox :australia:" sandbox_k8s_request start ap elif [[ $comment_body =~ (e2e_)?needs_sandbox:dev ]]; then - # The dev region's account: CI k8s only (no fleet host polls this label). + # The dev region (dev-us): CI k8s only (no fleet host polls this label). add_label "sandbox :test_tube:" sandbox_k8s_request start dev else