Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add upgrade test for last hard stop #3087

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,22 @@ jobs:
if: github.repository_owner == 'getsentry'
runs-on: ubuntu-22.04
name: "Sentry upgrade test"
strategy:
fail-fast: false
matrix:
version: ["latest", "hard-stop"]
env:
REPORT_SELF_HOSTED_ISSUES: 0
steps:
- name: Get latest self-hosted release version
- name: Get self-hosted release version
run: |
LATEST_TAG=$(curl -s https://api.github.com/repos/getsentry/self-hosted/releases/latest | jq -r '.tag_name')
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
if [ "${{ matrix.version }}" = "latest" ]; then
LATEST_TAG=$(curl -s https://api.github.com/repos/getsentry/self-hosted/releases/latest | jq -r '.tag_name')
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
else
# Use latest hard stop version
echo "LATEST_TAG=24.1.0" >> $GITHUB_ENV
fi

- name: Checkout latest release
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ services:
postgres:
<<: *restart_policy
# Using the same postgres version as Sentry dev for consistency purposes
image: "postgres:14.11-alpine"
image: "postgres:14.11"
healthcheck:
<<: *healthcheck_defaults
# Using default user "postgres" from sentry/sentry.conf.example.py or value of POSTGRES_USER if provided
Expand Down
15 changes: 14 additions & 1 deletion install/upgrade-clickhouse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,21 @@ if [[ -n "$(docker volume ls -q --filter name=sentry-clickhouse)" ]]; then
# Wait for clickhouse
wait_for_clickhouse

# In order to get to 23.8, we need to first upgrade go from 21.8 -> 22.8 -> 23.3 -> 23.8
# In order to get to 23.8, we need to first upgrade go from 20.3 -> 21.8 -> 22.8 -> 23.3 -> 23.8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like it might be time to codify this information in a machine-readable format which would allow doing some nice things programmatically. WDYT?

version=$($dc exec clickhouse clickhouse-client -q 'SELECT version()')
if [[ "$version" == "20.3.9.70" ]]; then
$dc down clickhouse
$dcb --build-arg BASE_IMAGE=altinity/clickhouse-server:21.8.13.1.altinitystable clickhouse
$dc up -d clickhouse
wait_for_clickhouse
version=$($dc exec clickhouse clickhouse-client -q 'SELECT version()')
elif [[ "$version" == "21.8.12.29.altinitydev.arm" ]]; then
$dc down clickhouse
$dcb --build-arg BASE_IMAGE=altinity/clickhouse-server:21.8.12.29.altinitydev.arm clickhouse
$dc up -d clickhouse
wait_for_clickhouse
version=$($dc exec clickhouse clickhouse-client -q 'SELECT version()')
fi
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
Expand Down
Loading