-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace snuba "rust-consumer" with "consumer"
There is a know bug that has yet to be fixed that causes lots of errors and excess resource consumption in clickhouse. REF: getsentry/snuba#5707 (comment)
- Loading branch information
Showing
1 changed file
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,17 @@ | |
# File Created: Monday, 21st October 2024 10:19:15 pm | ||
# Author: Josh5 ([email protected]) | ||
# ----- | ||
# Last Modified: Tuesday, 22nd October 2024 3:29:04 pm | ||
# Last Modified: Saturday, 9th November 2024 10:40:42 am | ||
# Modified By: Josh5 ([email protected]) | ||
### | ||
|
||
echo "--- Create backup of original docker-compose.yml file ---" | ||
if [ ! -f "${SENTRY_DATA_PATH}/self_hosted/docker-compose.bak.yml" ]; then | ||
cp -f "${SENTRY_DATA_PATH}/self_hosted/docker-compose.yml" "${SENTRY_DATA_PATH}/self_hosted/docker-compose.bak.yml" | ||
fi | ||
cp -f "${SENTRY_DATA_PATH}/self_hosted/docker-compose.bak.yml" "${SENTRY_DATA_PATH}/self_hosted/docker-compose.yml" | ||
|
||
echo "--- Create custom docker-compose.custom.yml file ---" | ||
echo "--- Create custom docker-compose.custom.yml file for new config ---" | ||
echo "" >"${SENTRY_DATA_PATH}/self_hosted/docker-compose.custom.yml" | ||
echo "" >"${SENTRY_DATA_PATH}/self_hosted/.z-custom-compose-config.tmp.txt" | ||
compose_services="$(${docker_cmd:?} compose -f ./docker-compose.yml config --services)" | ||
|
@@ -44,7 +49,6 @@ x-env-import: &env-import | |
EOF | ||
echo "x-env-import/env_file/.env.custom" >>"${SENTRY_DATA_PATH}/self_hosted/.z-custom-compose-config.tmp.txt" | ||
|
||
|
||
# Logging driver | ||
echo " - Configure services logging driver" | ||
if [ "${CUSTOM_LOG_DRIVER:-}" = "json-file" ]; then | ||
|
@@ -110,6 +114,10 @@ done | |
echo " - Set compose command" | ||
export docker_compose_cmd="${cmd_prefix:?} docker compose -f ./docker-compose.yml -f ./docker-compose.custom.yml" | ||
|
||
# Modify consuer for snuba | ||
# REF: https://github.com/getsentry/snuba/issues/5707 | ||
sed -ie "s/rust-consumer/consumer/g" "${SENTRY_DATA_PATH}/self_hosted/docker-compose.yml" | ||
echo "snuba-patch - https://github.com/getsentry/snuba/issues/5707" >>"${SENTRY_DATA_PATH}/self_hosted/.z-custom-compose-config.tmp.txt" | ||
|
||
if ! cmp -s "${SENTRY_DATA_PATH}/self_hosted/.z-custom-compose-config.tmp.txt" "${SENTRY_DATA_PATH}/self_hosted/.z-custom-compose-config.txt"; then | ||
echo " - A breaking change was made to the docker compose stack. Stopping it before continuing to avoid issues while applying updates." | ||
|