From ec4ad4000eeeb482dd2f73e405b4c734cd6fab45 Mon Sep 17 00:00:00 2001 From: Tanish Desai <> Date: Mon, 2 Mar 2026 17:00:51 +0530 Subject: [PATCH 1/4] _processor support --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 651c4c9..d29e84b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -205,7 +205,7 @@ already_needs_alternate_version_sandbox=false alternate_python_version="3.13" current_python_version="3.13" -if [[ $comment_body =~ ^needs_sandbox(:${alternate_python_version})(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?([ \t]*)?$ ]]; then +if [[ $comment_body =~ ^needs_sandbox(:${alternate_python_version})(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?(:_processor)?([ \t]*)?$ ]]; then for label in $labels; do case $label in sandbox:${alternate_python_version}) @@ -252,7 +252,7 @@ if [[ $comment_body =~ ^needs_sandbox(:${alternate_python_version})(:(eu|gov|ca| fi fi -elif [[ $comment_body =~ ^needs_sandbox(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?([ \t]*)?$ ]]; then +elif [[ $comment_body =~ ^needs_sandbox(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?(:_processor)?([ \t]*)?$ ]]; then for label in $labels; do case $label in sandbox) From fb2e9363fd6581edd1223d54b3d9822cee0377bf Mon Sep 17 00:00:00 2001 From: Tanish Desai <> Date: Wed, 22 Apr 2026 11:43:18 +0530 Subject: [PATCH 2/4] new sandbox --- entrypoint.sh | 103 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index d29e84b..bc729a1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -205,7 +205,7 @@ already_needs_alternate_version_sandbox=false alternate_python_version="3.13" current_python_version="3.13" -if [[ $comment_body =~ ^needs_sandbox(:${alternate_python_version})(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?(:_processor)?([ \t]*)?$ ]]; then +if [[ $comment_body =~ ^needs_sandbox(:${alternate_python_version})(:(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:${alternate_python_version}) @@ -252,7 +252,7 @@ if [[ $comment_body =~ ^needs_sandbox(:${alternate_python_version})(:(eu|gov|ca| fi fi -elif [[ $comment_body =~ ^needs_sandbox(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?(:_processor)?([ \t]*)?$ ]]; then +elif [[ $comment_body =~ ^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) @@ -300,6 +300,105 @@ elif [[ $comment_body =~ ^needs_sandbox(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)( fi fi +# Add sandbox label for e2e_needs_sandbox (enables local processor in sandbox) +already_needs_e2e_sandbox=false +already_needs_alternate_version_e2e_sandbox=false + +if [[ $comment_body =~ ^e2e_needs_sandbox(:${alternate_python_version})(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?(:_processor)?([ \t]*)?$ ]]; then + for label in $labels; do + case $label in + sandbox:${alternate_python_version}) + already_needs_e2e_sandbox=true + ;; + "sandbox:${alternate_python_version} :united_arab_emirates:") + already_needs_e2e_sandbox=true + ;; + "sandbox:${alternate_python_version} :eu:") + already_needs_e2e_sandbox=true + ;; + "sandbox:${alternate_python_version} :maple_leaf:") + already_needs_e2e_sandbox=true + ;; + "sandbox:${alternate_python_version} :classical_building:") + already_needs_e2e_sandbox=true + ;; + "sandbox:${alternate_python_version} :us:") + already_needs_e2e_sandbox=true + ;; + "sandbox:${alternate_python_version} :australia:") + already_needs_e2e_sandbox=true + ;; + *) + echo "Unknown label $label" + ;; + esac + done + if [[ "$already_needs_e2e_sandbox" == false && "$current_python_version" != "$alternate_python_version" ]]; then + if [[ $comment_body =~ e2e_needs_sandbox:${alternate_python_version}:eu ]]; then + add_label "sandbox:${alternate_python_version} :eu:" + elif [[ $comment_body =~ e2e_needs_sandbox:${alternate_python_version}:ca ]]; then + add_label "sandbox:${alternate_python_version} :maple_leaf:" + elif [[ $comment_body =~ e2e_needs_sandbox:${alternate_python_version}:gov ]]; then + add_label "sandbox:${alternate_python_version} :classical_building:" + elif [[ $comment_body =~ e2e_needs_sandbox:${alternate_python_version}:uae ]]; then + add_label "sandbox:${alternate_python_version} :united_arab_emirates:" + elif [[ $comment_body =~ e2e_needs_sandbox:${alternate_python_version}:wu ]]; then + add_label "sandbox:${alternate_python_version} :us:" + elif [[ $comment_body =~ e2e_needs_sandbox:${alternate_python_version}:ap ]]; then + add_label "sandbox:${alternate_python_version} :australia:" + else + add_label "sandbox:${alternate_python_version}" + fi + fi + +elif [[ $comment_body =~ ^e2e_needs_sandbox(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?(:_processor)?([ \t]*)?$ ]]; then + for label in $labels; do + case $label in + sandbox) + already_needs_e2e_sandbox=true + ;; + "sandbox :united_arab_emirates:") + already_needs_e2e_sandbox=true + ;; + "sandbox :eu:") + already_needs_e2e_sandbox=true + ;; + "sandbox :maple_leaf:") + already_needs_e2e_sandbox=true + ;; + "sandbox :classical_building:") + already_needs_e2e_sandbox=true + ;; + "sandbox :us:") + already_needs_e2e_sandbox=true + ;; + "sandbox :australia:") + already_needs_e2e_sandbox=true + ;; + *) + echo "Unknown label $label" + ;; + esac + done + if [[ "$already_needs_e2e_sandbox" == false ]]; then + if [[ $comment_body =~ e2e_needs_sandbox:eu ]]; then + add_label "sandbox :eu:" + elif [[ $comment_body =~ e2e_needs_sandbox:ca ]]; then + add_label "sandbox :maple_leaf:" + elif [[ $comment_body =~ e2e_needs_sandbox:gov ]]; then + add_label "sandbox :classical_building:" + elif [[ $comment_body =~ e2e_needs_sandbox:uae ]]; then + add_label "sandbox :united_arab_emirates:" + elif [[ $comment_body =~ e2e_needs_sandbox:wu ]]; then + add_label "sandbox :us:" + elif [[ $comment_body =~ e2e_needs_sandbox:ap ]]; then + add_label "sandbox :australia:" + else + add_label "sandbox" + fi + fi +fi + if [[ $comment_body == "stop_sandbox" ]]; then for label in $labels; do case $label in From 560c65c3eace75ed31220235f88b44fce5104a5f Mon Sep 17 00:00:00 2001 From: Tanish Desai <> Date: Wed, 22 Apr 2026 11:46:09 +0530 Subject: [PATCH 3/4] comment --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index bc729a1..676f69e 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 +# Accepts the following commands: shipit, needs_ci, needs_sandbox, e2e_needs_sandbox set -e From 9f77fd675f822141b4263d33ef3cab1e31f258e0 Mon Sep 17 00:00:00 2001 From: Tanish Desai <> Date: Wed, 22 Apr 2026 12:14:35 +0530 Subject: [PATCH 4/4] regex change --- entrypoint.sh | 130 ++++++-------------------------------------------- 1 file changed, 15 insertions(+), 115 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 676f69e..7cf4782 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -198,14 +198,13 @@ if [[ $comment_body == "needs_ci${alt_python_version}:lite" ]]; then fi fi -# Add sandbox is needs_sandbox -# Remove stop_sandbox if sandbox is requested again +# Add sandbox label for needs_sandbox and e2e_needs_sandbox (e2e_ prefix enables local processor) already_needs_sandbox=false already_needs_alternate_version_sandbox=false alternate_python_version="3.13" current_python_version="3.13" -if [[ $comment_body =~ ^needs_sandbox(:${alternate_python_version})(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?([ \t]*)?$ ]]; then +if [[ $comment_body =~ ^(e2e_)?needs_sandbox(:${alternate_python_version})(:(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:${alternate_python_version}) @@ -235,24 +234,24 @@ if [[ $comment_body =~ ^needs_sandbox(:${alternate_python_version})(:(eu|gov|ca| esac done if [[ "$already_needs_sandbox" == false && "$current_python_version" != "$alternate_python_version" ]]; then - if [[ $comment_body =~ needs_sandbox:${alternate_python_version}:eu ]]; then + if [[ $comment_body =~ (e2e_)?needs_sandbox:${alternate_python_version}:eu ]]; then add_label "sandbox:${alternate_python_version} :eu:" - elif [[ $comment_body =~ needs_sandbox:${alternate_python_version}:ca ]]; then + elif [[ $comment_body =~ (e2e_)?needs_sandbox:${alternate_python_version}:ca ]]; then add_label "sandbox:${alternate_python_version} :maple_leaf:" - elif [[ $comment_body =~ needs_sandbox:${alternate_python_version}:gov ]]; then + elif [[ $comment_body =~ (e2e_)?needs_sandbox:${alternate_python_version}:gov ]]; then add_label "sandbox:${alternate_python_version} :classical_building:" - elif [[ $comment_body =~ needs_sandbox:${alternate_python_version}:uae ]]; then + elif [[ $comment_body =~ (e2e_)?needs_sandbox:${alternate_python_version}:uae ]]; then add_label "sandbox:${alternate_python_version} :united_arab_emirates:" - elif [[ $comment_body =~ needs_sandbox:${alternate_python_version}:wu ]]; then + elif [[ $comment_body =~ (e2e_)?needs_sandbox:${alternate_python_version}:wu ]]; then add_label "sandbox:${alternate_python_version} :us:" - elif [[ $comment_body =~ needs_sandbox:${alternate_python_version}:ap ]]; then + elif [[ $comment_body =~ (e2e_)?needs_sandbox:${alternate_python_version}:ap ]]; then add_label "sandbox:${alternate_python_version} :australia:" else add_label "sandbox:${alternate_python_version}" fi fi -elif [[ $comment_body =~ ^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) @@ -282,116 +281,17 @@ elif [[ $comment_body =~ ^needs_sandbox(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)( esac done if [[ "$already_needs_sandbox" == false ]]; then - if [[ $comment_body =~ needs_sandbox:eu ]]; then + if [[ $comment_body =~ (e2e_)?needs_sandbox:eu ]]; then add_label "sandbox :eu:" - elif [[ $comment_body =~ needs_sandbox:ca ]]; then + elif [[ $comment_body =~ (e2e_)?needs_sandbox:ca ]]; then add_label "sandbox :maple_leaf:" - elif [[ $comment_body =~ needs_sandbox:gov ]]; then + elif [[ $comment_body =~ (e2e_)?needs_sandbox:gov ]]; then add_label "sandbox :classical_building:" - elif [[ $comment_body =~ needs_sandbox:uae ]]; then + elif [[ $comment_body =~ (e2e_)?needs_sandbox:uae ]]; then add_label "sandbox :united_arab_emirates:" - elif [[ $comment_body =~ needs_sandbox:wu ]]; then + elif [[ $comment_body =~ (e2e_)?needs_sandbox:wu ]]; then add_label "sandbox :us:" - elif [[ $comment_body =~ needs_sandbox:ap ]]; then - add_label "sandbox :australia:" - else - add_label "sandbox" - fi - fi -fi - -# Add sandbox label for e2e_needs_sandbox (enables local processor in sandbox) -already_needs_e2e_sandbox=false -already_needs_alternate_version_e2e_sandbox=false - -if [[ $comment_body =~ ^e2e_needs_sandbox(:${alternate_python_version})(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?(:_processor)?([ \t]*)?$ ]]; then - for label in $labels; do - case $label in - sandbox:${alternate_python_version}) - already_needs_e2e_sandbox=true - ;; - "sandbox:${alternate_python_version} :united_arab_emirates:") - already_needs_e2e_sandbox=true - ;; - "sandbox:${alternate_python_version} :eu:") - already_needs_e2e_sandbox=true - ;; - "sandbox:${alternate_python_version} :maple_leaf:") - already_needs_e2e_sandbox=true - ;; - "sandbox:${alternate_python_version} :classical_building:") - already_needs_e2e_sandbox=true - ;; - "sandbox:${alternate_python_version} :us:") - already_needs_e2e_sandbox=true - ;; - "sandbox:${alternate_python_version} :australia:") - already_needs_e2e_sandbox=true - ;; - *) - echo "Unknown label $label" - ;; - esac - done - if [[ "$already_needs_e2e_sandbox" == false && "$current_python_version" != "$alternate_python_version" ]]; then - if [[ $comment_body =~ e2e_needs_sandbox:${alternate_python_version}:eu ]]; then - add_label "sandbox:${alternate_python_version} :eu:" - elif [[ $comment_body =~ e2e_needs_sandbox:${alternate_python_version}:ca ]]; then - add_label "sandbox:${alternate_python_version} :maple_leaf:" - elif [[ $comment_body =~ e2e_needs_sandbox:${alternate_python_version}:gov ]]; then - add_label "sandbox:${alternate_python_version} :classical_building:" - elif [[ $comment_body =~ e2e_needs_sandbox:${alternate_python_version}:uae ]]; then - add_label "sandbox:${alternate_python_version} :united_arab_emirates:" - elif [[ $comment_body =~ e2e_needs_sandbox:${alternate_python_version}:wu ]]; then - add_label "sandbox:${alternate_python_version} :us:" - elif [[ $comment_body =~ e2e_needs_sandbox:${alternate_python_version}:ap ]]; then - add_label "sandbox:${alternate_python_version} :australia:" - else - add_label "sandbox:${alternate_python_version}" - fi - fi - -elif [[ $comment_body =~ ^e2e_needs_sandbox(:(eu|gov|ca|uae|wu|ap))?(:(dev|([0-9]+)(\.([0-9]+)?)?))?(:(([a-zA-Z0-9,]+)))?(:_processor)?([ \t]*)?$ ]]; then - for label in $labels; do - case $label in - sandbox) - already_needs_e2e_sandbox=true - ;; - "sandbox :united_arab_emirates:") - already_needs_e2e_sandbox=true - ;; - "sandbox :eu:") - already_needs_e2e_sandbox=true - ;; - "sandbox :maple_leaf:") - already_needs_e2e_sandbox=true - ;; - "sandbox :classical_building:") - already_needs_e2e_sandbox=true - ;; - "sandbox :us:") - already_needs_e2e_sandbox=true - ;; - "sandbox :australia:") - already_needs_e2e_sandbox=true - ;; - *) - echo "Unknown label $label" - ;; - esac - done - if [[ "$already_needs_e2e_sandbox" == false ]]; then - if [[ $comment_body =~ e2e_needs_sandbox:eu ]]; then - add_label "sandbox :eu:" - elif [[ $comment_body =~ e2e_needs_sandbox:ca ]]; then - add_label "sandbox :maple_leaf:" - elif [[ $comment_body =~ e2e_needs_sandbox:gov ]]; then - add_label "sandbox :classical_building:" - elif [[ $comment_body =~ e2e_needs_sandbox:uae ]]; then - add_label "sandbox :united_arab_emirates:" - elif [[ $comment_body =~ e2e_needs_sandbox:wu ]]; then - add_label "sandbox :us:" - elif [[ $comment_body =~ e2e_needs_sandbox:ap ]]; then + elif [[ $comment_body =~ (e2e_)?needs_sandbox:ap ]]; then add_label "sandbox :australia:" else add_label "sandbox"