Skip to content

Commit a553a75

Browse files
sbryngelsonclaude
andcommitted
Improve Lustre-safe workspace cleanup with dotglob and nullglob
Use shopt dotglob/nullglob for cleaner glob expansion instead of manual dotfile patterns. Keep retry loop for Lustre ESTALE resilience. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ece1951 commit a553a75

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/bench.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,14 @@ jobs:
9191
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
9292
steps:
9393
- name: Clean workspace (Lustre-safe)
94+
shell: bash
9495
run: |
96+
shopt -s dotglob nullglob
9597
for i in 1 2 3 4 5; do
96-
rm -rf "$GITHUB_WORKSPACE"/pr "$GITHUB_WORKSPACE"/master 2>/dev/null && break
98+
rm -rf -- "${GITHUB_WORKSPACE:?}/"* 2>/dev/null && break
9799
echo "Clean attempt $i failed, retrying in 2s..."
98100
sleep 2
99101
done
100-
true
101102
102103
- name: Clone - PR
103104
uses: actions/checkout@v4

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,14 @@ jobs:
220220
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
221221
steps:
222222
- name: Clean workspace (Lustre-safe)
223+
shell: bash
223224
run: |
225+
shopt -s dotglob nullglob
224226
for i in 1 2 3 4 5; do
225-
rm -rf "$GITHUB_WORKSPACE"/{.,}* 2>/dev/null && break
227+
rm -rf -- "${GITHUB_WORKSPACE:?}/"* 2>/dev/null && break
226228
echo "Clean attempt $i failed, retrying in 2s..."
227229
sleep 2
228230
done
229-
true
230231
231232
- name: Clone
232233
uses: actions/checkout@v4

0 commit comments

Comments
 (0)