Skip to content

Commit

Permalink
ci: Check health of services after running integration tests and fix …
Browse files Browse the repository at this point in the history
…snuba-replacer

Also remove batching from snuba-replacer. This was removed in getsentry/snuba@6e98074

Co-authored-by: Chad Whitacre <[email protected]>
  • Loading branch information
emmatyping and chadwhitacre authored Jan 11, 2023
1 parent da6c38a commit 6976bae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions _integration-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,18 @@ source ./custom-ca-roots/setup.sh
$dcr --no-deps web python3 /etc/sentry/test-custom-ca-roots.py
source ./custom-ca-roots/teardown.sh
echo "${_endgroup}"

# Table formatting based on https://stackoverflow.com/a/39144364
COMPOSE_PS_OUTPUT=$(docker compose ps --format json | jq -r \
'.[] |
# we only care about running services. geoipupdate always exits, so we ignore it
select(.State != "running" and .Service != "geoipupdate") |
# Filter to only show the service name and state
with_entries(select(.key | in({"Service":1, "State":1})))
')

if [[ "$COMPOSE_PS_OUTPUT" ]]; then
echo "Services failed, oh no!"
echo "$COMPOSE_PS_OUTPUT" | jq -rs '["Service","State"], ["-------","-----"], (.[]|[.Service, .State]) | @tsv'
exit 1
fi
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ services:
command: consumer --storage transactions --consumer-group transactions_group --auto-offset-reset=latest --max-batch-time-ms 750
snuba-replacer:
<<: *snuba_defaults
command: replacer --storage errors --auto-offset-reset=latest --max-batch-size 3
command: replacer --storage errors --auto-offset-reset=latest
snuba-subscription-consumer-events:
<<: *snuba_defaults
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
Expand Down

0 comments on commit 6976bae

Please sign in to comment.