Skip to content

Commit 6976bae

Browse files
ci: Check health of services after running integration tests and fix snuba-replacer
Also remove batching from snuba-replacer. This was removed in getsentry/snuba@6e98074 Co-authored-by: Chad Whitacre <[email protected]>
1 parent da6c38a commit 6976bae

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

_integration-test/run.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,18 @@ source ./custom-ca-roots/setup.sh
135135
$dcr --no-deps web python3 /etc/sentry/test-custom-ca-roots.py
136136
source ./custom-ca-roots/teardown.sh
137137
echo "${_endgroup}"
138+
139+
# Table formatting based on https://stackoverflow.com/a/39144364
140+
COMPOSE_PS_OUTPUT=$(docker compose ps --format json | jq -r \
141+
'.[] |
142+
# we only care about running services. geoipupdate always exits, so we ignore it
143+
select(.State != "running" and .Service != "geoipupdate") |
144+
# Filter to only show the service name and state
145+
with_entries(select(.key | in({"Service":1, "State":1})))
146+
')
147+
148+
if [[ "$COMPOSE_PS_OUTPUT" ]]; then
149+
echo "Services failed, oh no!"
150+
echo "$COMPOSE_PS_OUTPUT" | jq -rs '["Service","State"], ["-------","-----"], (.[]|[.Service, .State]) | @tsv'
151+
exit 1
152+
fi

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ services:
260260
command: consumer --storage transactions --consumer-group transactions_group --auto-offset-reset=latest --max-batch-time-ms 750
261261
snuba-replacer:
262262
<<: *snuba_defaults
263-
command: replacer --storage errors --auto-offset-reset=latest --max-batch-size 3
263+
command: replacer --storage errors --auto-offset-reset=latest
264264
snuba-subscription-consumer-events:
265265
<<: *snuba_defaults
266266
command: subscriptions-scheduler-executor --dataset events --entity events --auto-offset-reset=latest --no-strict-offset-reset --consumer-group=snuba-events-subscriptions-consumers --followed-consumer-group=snuba-consumers --delay-seconds=60 --schedule-ttl=60 --stale-threshold-seconds=900

0 commit comments

Comments
 (0)