github-actions[bot] commented on code in PR #65813:
URL: https://github.com/apache/doris/pull/65813#discussion_r3636656337


##########
regression-test/pipeline/common/teamcity-utils.sh:
##########
@@ -215,6 +215,34 @@ cancel_queue_build() {
 }
 # cancel_queue_build "$1" "$2"
 
+cancel_builds_of_pr() {
+    local PULL_REQUEST_NUM="${PULL_REQUEST_NUM:-$1}"
+    if [[ -z "${PULL_REQUEST_NUM}" ]]; then
+        echo "Usage: cancel_builds_of_pr PULL_REQUEST_NUM" && return 1
+    fi
+
+    local builds
+    builds=$(
+        set -o pipefail
+        curl -fsS -u OneMoreChance:OneMoreChance -H "Accept: application/json" 
\
+            
"http://43.132.222.7:8111/app/rest/builds?locator=branch:pull/${PULL_REQUEST_NUM},running:true";
 |
+            jq -r '.build[] | "builds/id:\(.id)"' || exit 1

Review Comment:
   **[P2] Traverse every running-build page too**
   
   The existing queue-pagination thread covers `/app/rest/buildQueue`, but 
[TeamCity documents `/app/rest/builds` as an independently paginated 
collection](https://www.jetbrains.com/help/teamcity/rest/builds.html) that can 
also carry `nextHref`. Once the same-branch running set can exceed 100, this 
code reads only the first `.build[]` page, so a later superseded build survives 
even if the queue query is fixed, while the helper returns success and the new 
Compile starts. Follow `nextHref` for this collection as well (requesting only 
IDs/pagination fields), and add a running-build-after-page-1 stub case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to