diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7899952fc0..38e929334f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Get auth token id: token - uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 + uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1 with: app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 291e78c7c8..7660d437d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -134,6 +134,7 @@ jobs: - name: Integration Test run: | + docker compose up --wait if [ "${{ matrix.compose_version }}" = "v2.19.0" ]; then pytest --reruns 3 --cov --junitxml=junit.xml _integration-test/ --customizations=${{ matrix.customizations }} else diff --git a/CHANGELOG.md b/CHANGELOG.md index c08109c3f9..56d9cfebee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 24.12.1 + +### Various fixes & improvements + +- chore: clearer message for errors-only mode (#3487) by @aldy505 +- chore(relay): provide opt-in max_memory_percent config as workaround for failing healthcheck (#3486) by @aldy505 +- fix(nginx): _assets should rewrite to _static/sentry/dist (#3483) by @BYK + ## 24.12.0 - No documented changes. diff --git a/docker-compose.yml b/docker-compose.yml index eeae00ee98..9d8ee5a9e4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -207,15 +207,6 @@ services: interval: 10s timeout: 10s retries: 30 - geoipupdate: - image: "ghcr.io/maxmind/geoipupdate:v6.1.0" - # Override the entrypoint in order to avoid using envvars for config. - # Futz with settings so we can keep mmdb and conf in same dir on host - # (image looks for them in separate dirs by default). - entrypoint: - ["/usr/bin/geoipupdate", "-d", "/sentry", "-f", "/sentry/GeoIP.conf"] - volumes: - - "./geoip:/sentry" snuba-api: <<: *snuba_defaults # Kafka consumer responsible for feeding events into Clickhouse diff --git a/install/bootstrap-snuba.sh b/install/bootstrap-snuba.sh index 2952ed0b33..489c4da0e1 100644 --- a/install/bootstrap-snuba.sh +++ b/install/bootstrap-snuba.sh @@ -1,6 +1,5 @@ echo "${_group}Bootstrapping and migrating Snuba ..." -$dcr snuba-api bootstrap --no-migrate --force -$dcr snuba-api migrations migrate --force +$dcr snuba-api bootstrap --force echo "${_endgroup}" diff --git a/install/geoip.sh b/install/geoip.sh index 577b6ba5ca..041db9b683 100644 --- a/install/geoip.sh +++ b/install/geoip.sh @@ -21,7 +21,7 @@ install_geoip() { else echo "IP address geolocation is configured for updates." echo "Updating IP address geolocation database ... " - if ! $dcr geoipupdate; then + if ! docker run --rm -v "./geoip:/sentry" --entrypoint '/usr/bin/geoipupdate' "ghcr.io/maxmind/geoipupdate:v6.1.0" "-d" "/sentry" "-f" "/sentry/GeoIP.conf"; then result='Error' fi echo "$result updating IP address geolocation database." diff --git a/install/set-up-and-migrate-database.sh b/install/set-up-and-migrate-database.sh index 7bf74f40e9..770bfbdc61 100644 --- a/install/set-up-and-migrate-database.sh +++ b/install/set-up-and-migrate-database.sh @@ -1,13 +1,7 @@ echo "${_group}Setting up / migrating database ..." # Fixes https://github.com/getsentry/self-hosted/issues/2758, where a migration fails due to indexing issue -$dc up -d postgres -# Wait for postgres -RETRIES=5 -until $dc exec postgres psql -U postgres -c "select 1" >/dev/null 2>&1 || [ $RETRIES -eq 0 ]; do - echo "Waiting for postgres server, $((RETRIES--)) remaining attempts..." - sleep 1 -done +$dc up --wait postgres os=$($dc exec postgres cat /etc/os-release | grep 'ID=debian') if [[ -z $os ]]; then diff --git a/install/upgrade-clickhouse.sh b/install/upgrade-clickhouse.sh index e947238400..05e74bb00b 100644 --- a/install/upgrade-clickhouse.sh +++ b/install/upgrade-clickhouse.sh @@ -1,33 +1,19 @@ echo "${_group}Upgrading Clickhouse ..." -function wait_for_clickhouse() { - # Wait for clickhouse - RETRIES=30 - until $dc ps clickhouse | grep 'healthy' || [ $RETRIES -eq 0 ]; do - echo "Waiting for clickhouse server, $((RETRIES--)) remaining attempts..." - sleep 1 - done -} - # First check to see if user is upgrading by checking for existing clickhouse volume if [[ -n "$(docker volume ls -q --filter name=sentry-clickhouse)" ]]; then # Start clickhouse if it is not already running - $dc up -d clickhouse - - # Wait for clickhouse - wait_for_clickhouse + $dc up --wait clickhouse # In order to get to 23.8, we need to first upgrade go from 21.8 -> 22.8 -> 23.3 -> 23.8 version=$($dc exec clickhouse clickhouse-client -q 'SELECT version()') if [[ "$version" == "21.8.13.1.altinitystable" || "$version" == "21.8.12.29.altinitydev.arm" ]]; then $dc down clickhouse $dcb --build-arg BASE_IMAGE=altinity/clickhouse-server:22.8.15.25.altinitystable clickhouse - $dc up -d clickhouse - wait_for_clickhouse + $dc up --wait clickhouse $dc down clickhouse $dcb --build-arg BASE_IMAGE=altinity/clickhouse-server:23.3.19.33.altinitystable clickhouse - $dc up -d clickhouse - wait_for_clickhouse + $dc up --wait clickhouse else echo "Detected clickhouse version $version. Skipping upgrades!" fi diff --git a/install/upgrade-postgres.sh b/install/upgrade-postgres.sh index 86b76646f3..fa66a0aa4a 100644 --- a/install/upgrade-postgres.sh +++ b/install/upgrade-postgres.sh @@ -20,7 +20,7 @@ if [[ -n "$(docker volume ls -q --filter name=sentry-postgres)" && "$(docker run docker volume rm sentry-postgres-new echo "Re-indexing due to glibc change, this may take a while..." echo "Starting up new PostgreSQL version" - $dc up -d postgres + $dc up --wait postgres # Wait for postgres RETRIES=5 diff --git a/install/wrap-up.sh b/install/wrap-up.sh index 8840262f25..c301c823f2 100644 --- a/install/wrap-up.sh +++ b/install/wrap-up.sh @@ -2,7 +2,7 @@ if [[ "$MINIMIZE_DOWNTIME" ]]; then echo "${_group}Waiting for Sentry to start ..." # Start the whole setup, except nginx and relay. - $dc up -d --remove-orphans $($dc config --services | grep -v -E '^(nginx|relay)$') + $dc up --wait --remove-orphans $($dc config --services | grep -v -E '^(nginx|relay)$') $dc restart relay $dc exec -T nginx nginx -s reload @@ -10,7 +10,7 @@ if [[ "$MINIMIZE_DOWNTIME" ]]; then -c 'while [[ "$(wget -T 1 -q -O- http://web:9000/_health/)" != "ok" ]]; do sleep 0.5; done' # Make sure everything is up. This should only touch relay and nginx - $dc up -d + $dc up --wait echo "${_endgroup}" else @@ -20,9 +20,9 @@ else echo "You're all done! Run the following command to get Sentry running:" echo "" if [[ "${_ENV}" =~ ".env.custom" ]]; then - echo " $dc_base --env-file ${_ENV} up -d" + echo " $dc_base --env-file ${_ENV} up --wait" else - echo " $dc_base up -d" + echo " $dc_base up --wait" fi echo "" echo "-----------------------------------------------------------------" diff --git a/sentry-admin.sh b/sentry-admin.sh index d775e905e9..3db5f2ed04 100755 --- a/sentry-admin.sh +++ b/sentry-admin.sh @@ -22,7 +22,7 @@ on the host filesystem. Commands that write files should write them to the '/sen # Actual invocation that runs the command in the container. invocation() { - $dc run -v "$VOLUME_MAPPING" --rm -T -e SENTRY_LOG_LEVEL=CRITICAL web "$@" 2>&1 + $dcr --quiet-pull -v "$VOLUME_MAPPING" -T -e SENTRY_LOG_LEVEL=CRITICAL web "$@" 2>&1 } # Function to modify lines starting with `Usage: sentry` to say `Usage: ./sentry-admin.sh` instead.