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

Upgrade clickhouse to 23.8 #3009

Merged
merged 10 commits into from May 6, 2024
Merged

Upgrade clickhouse to 23.8 #3009

merged 10 commits into from May 6, 2024

Conversation

hubertdeng123
Copy link
Member

@hubertdeng123 hubertdeng123 commented May 1, 2024

This PR includes a script that upgrades our users to CH 23.8, in this order:
21.8 -> 22.8 -> 23.3 -> 23.8

Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.01%. Comparing base (9e36d2f) to head (28196c2).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3009   +/-   ##
=======================================
  Coverage   99.01%   99.01%           
=======================================
  Files           3        3           
  Lines         203      203           
=======================================
  Hits          201      201           
  Misses          2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hubertdeng123
Copy link
Member Author

Seems like I am encountering an issue where clickhouse immediately is booted with v23.8 instead of incrementally upgrading, which does not seem to be happening locally

@@ -20,6 +20,7 @@ source install/check-latest-commit.sh
source install/check-minimum-requirements.sh

# Let's go! Start impacting things.
source install/upgrade-clickhouse.sh
Copy link
Member Author

Choose a reason for hiding this comment

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

The reason this is placed before turn-things-off is because turn things off script will remove the clickhouse image, which we need to verify the version of clickhouse before proceeding

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add this as a comment in the code, since whoever edits this in the future will probably want to know this fact as well.

@@ -20,10 +20,8 @@ fi
export DOCKER_ARCH=$(docker info --format '{{.Architecture}}')
if [[ "$DOCKER_ARCH" = "x86_64" ]]; then
export DOCKER_PLATFORM="linux/amd64"
export CLICKHOUSE_IMAGE="altinity/clickhouse-server:21.8.13.1.altinitystable"
Copy link
Member Author

Choose a reason for hiding this comment

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

not needed, since more recent clickhouse images are multi platform

used on ARM to read the environment variable. -->
<include from_env="MAX_MEMORY_USAGE_RATIO"/>
</max_server_memory_usage_to_ram_ratio>
<!-- This include is important! It is required for the version of Clickhouse used on ARM to read the environment variable. -->
Copy link
Member Author

Choose a reason for hiding this comment

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

For some reason, in more recent versions of clickhouse the newlines here are causing parsing issues, so I just removed them

@hubertdeng123 hubertdeng123 marked this pull request as ready for review May 3, 2024 17:01
echo "${_group}Upgrading Clickhouse ..."

# 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Wonder if it's worth adding a test for this? Should (hopefully) be pretty straightforward with the new python-based testing regime?

Copy link
Member Author

Choose a reason for hiding this comment

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

Editing the install script is not easily tested using the new python tests. Those are effective after self-hosted sentry is installed and up and running. The new self-hosted Sentry upgrade tests I added sufficiently covers this IMO, it skips over this portion of the code on initial install and hits this on the upgrade

@@ -20,6 +20,7 @@ source install/check-latest-commit.sh
source install/check-minimum-requirements.sh

# Let's go! Start impacting things.
source install/upgrade-clickhouse.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add this as a comment in the code, since whoever edits this in the future will probably want to know this fact as well.

@azaslavsky azaslavsky self-requested a review May 3, 2024 18:33
@hubertdeng123 hubertdeng123 merged commit 67382fd into master May 6, 2024
13 checks passed
@hubertdeng123 hubertdeng123 deleted the hubertdeng123/upgrade-ch branch May 6, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants