Skip to content

Commit 2dd7a01

Browse files
committed
fix(ci): address review feedback for early devservices
- Use strict shell (set -euo pipefail) at action level - Fix set -e preventing exit code file from being written in subshell - Add 10-minute timeout to Snuba bootstrap wait loop - Move devservices start after chartcuterie build in acceptance - Revert migrations/migrations-drift (checkout master first, action doesn't exist there yet)
1 parent 74ab454 commit 2dd7a01

File tree

4 files changed

+10
-25
lines changed

4 files changed

+10
-25
lines changed

.github/actions/setup-devservices/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ runs:
1818
enable-cache: false
1919

2020
- name: Start devservices in background
21-
shell: bash
21+
shell: bash --noprofile --norc -euo pipefail {0}
2222
run: |
2323
DS_VERSION=$(python3 -c "
2424
import tomllib
@@ -34,5 +34,5 @@ runs:
3434
uv pip install --python /tmp/ds-venv/bin/python -q \
3535
--index-url https://pypi.devinfra.sentry.io/simple \
3636
"devservices==${DS_VERSION}"
37-
(timeout ${{ inputs.timeout-minutes }}m /tmp/ds-venv/bin/devservices up --mode ${{ inputs.mode }}; echo $? > /tmp/ds-exit) \
37+
(set +e; timeout ${{ inputs.timeout-minutes }}m /tmp/ds-venv/bin/devservices up --mode ${{ inputs.mode }}; echo $? > /tmp/ds-exit) \
3838
> /tmp/ds.log 2>&1 &

.github/workflows/backend.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,14 @@ jobs:
279279
- name: Wait for Snuba bootstrap
280280
if: env.XDIST_PER_WORKER_SNUBA == '1'
281281
run: |
282-
while [ ! -f /tmp/snuba-bootstrap-exit ]; do sleep 2; done
282+
SECONDS=0
283+
while [ ! -f /tmp/snuba-bootstrap-exit ]; do
284+
if [ $SECONDS -gt 600 ]; then
285+
echo "::error::Timed out waiting for Snuba bootstrap after 600s"
286+
exit 1
287+
fi
288+
sleep 2
289+
done
283290
SNUBA_RC=$(cat /tmp/snuba-bootstrap-exit)
284291
if [ "$SNUBA_RC" -ne 0 ]; then
285292
echo "::error::Snuba per-worker bootstrap failed"

.github/workflows/migrations-drift.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,10 @@ jobs:
2727
with:
2828
ref: master
2929

30-
- name: Start devservices early
31-
uses: ./.github/actions/setup-devservices
32-
with:
33-
mode: migrations
34-
3530
- name: Setup sentry env
3631
uses: ./.github/actions/setup-sentry
3732
with:
3833
mode: migrations
39-
skip-devservices: 'true'
40-
41-
- name: Wait for devservices
42-
run: |
43-
sentry init
44-
./.github/actions/setup-devservices/wait.sh
4534

4635
- name: Apply migrations
4736
env:

.github/workflows/migrations.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,10 @@ jobs:
4747
with:
4848
ref: master
4949

50-
- name: Start devservices early
51-
uses: ./.github/actions/setup-devservices
52-
with:
53-
mode: migrations
54-
5550
- name: Setup sentry env
5651
uses: ./.github/actions/setup-sentry
5752
with:
5853
mode: migrations
59-
skip-devservices: 'true'
60-
61-
- name: Wait for devservices
62-
run: |
63-
sentry init
64-
./.github/actions/setup-devservices/wait.sh
6554

6655
- name: Apply migrations
6756
run: |

0 commit comments

Comments
 (0)