Skip to content

Commit

Permalink
Fix pair_aggregator idempotency check (#1127)
Browse files Browse the repository at this point in the history
We need parentheses around the right hand side of the `||` so that
everything get skipped if `/tmp/done` exists. Also tests in CI that
bringing the deployment up, down and up again works.

Part of #1096
  • Loading branch information
tgeoghegan authored Jun 18, 2024
1 parent 152f352 commit 920a0b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ jobs:
RUST_FEATURES=${{ steps.resolve_variables.outputs.RUST_FEATURES }}
# Test the dev compose, which should use the images built earlier. Technically this is only
# interesting when feature integration-testing is on, but we may as well exercise both.
#
# Bring the environment up, down and up again to ensure all services can restart
- name: Compose (dev)
id: compose-dev
run: docker compose -f compose.dev.yaml up --wait --wait-timeout 120
run: |
docker compose -f compose.dev.yaml up --wait --wait-timeout 120
docker compose down
docker compose -f compose.dev.yaml up --wait --wait-timeout 120
- name: Inspect dev containers
if: ${{ failure() && steps.compose-dev.outcome != 'success' }}
run: |
Expand Down
4 changes: 2 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ services:
- -c
- |
test -f /tmp/done || \
/divviup --url=http://localhost:8080 --token="" \
(/divviup --url=http://localhost:8080 --token="" \
aggregator create \
--name=leader --api-url=http://janus_1_aggregator:8080/aggregator-api \
--bearer-token=0000 \
Expand All @@ -101,7 +101,7 @@ services:
aggregator create \
--name=helper --api-url=http://janus_2_aggregator:8080/aggregator-api \
--bearer-token=0000 && \
touch /tmp/done
touch /tmp/done)
network_mode: service:divviup_api
depends_on:
divviup_api:
Expand Down

0 comments on commit 920a0b9

Please sign in to comment.