Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
BYK authored Dec 29, 2024
2 parents 0a6ae17 + 282410a commit 3eb4156
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
9 changes: 0 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions install/bootstrap-snuba.sh
Original file line number Diff line number Diff line change
@@ -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}"
2 changes: 1 addition & 1 deletion install/geoip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
8 changes: 1 addition & 7 deletions install/set-up-and-migrate-database.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
20 changes: 3 additions & 17 deletions install/upgrade-clickhouse.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion install/upgrade-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions install/wrap-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ 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

docker run --rm --network="${COMPOSE_PROJECT_NAME}_default" alpine ash \
-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
Expand All @@ -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 "-----------------------------------------------------------------"
Expand Down
2 changes: 1 addition & 1 deletion sentry-admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3eb4156

Please sign in to comment.