Skip to content

Commit 90d4b6e

Browse files
sbryngelsonclaude
andauthored
fix(runners): fix registration token API, shuffle rebalance, consolidate dirs (#1333)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6120810 commit 90d4b6e

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

misc/runners/common/rebalance-runners.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@ done
106106
# Add offline runners to be placed
107107
for i in "${offline[@]}"; do to_place+=("offline $i"); done
108108

109+
# Shuffle to_place so sequential runner numbers spread across nodes
110+
# (avoids overloading one node when jobs arrive in number order)
111+
shuffled=()
112+
while [ ${#to_place[@]} -gt 0 ]; do
113+
rand=$(( RANDOM % ${#to_place[@]} ))
114+
shuffled+=("${to_place[$rand]}")
115+
to_place=("${to_place[@]:0:$rand}" "${to_place[@]:$((rand+1))}")
116+
done
117+
to_place=("${shuffled[@]}")
118+
109119
# Assign to underloaded nodes
110120
moves=()
111121
for entry in "${to_place[@]}"; do

misc/runners/common/runner-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ gh_list_runners() {
2121

2222
# Get a registration token for new runners.
2323
gh_registration_token() {
24-
gh api "orgs/$ORG/actions/runners/registration-token" --jq .token
24+
gh api "orgs/$ORG/actions/runners/registration-token" -X POST --jq .token
2525
}
2626

2727
# Get the latest runner binary version.

misc/runners/phoenix/config.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ SSH_OPTS="-o ConnectTimeout=5"
1515

1616
# Parent directories containing actions-runner-*/ installations on shared storage.
1717
RUNNER_PARENT_DIRS=(
18-
/storage/scratch1/6/sbryngelson3/mfc-runners
1918
/storage/project/r-sbryngelson3-0/sbryngelson3/mfc-runners-2
2019
)
2120

0 commit comments

Comments
 (0)