Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
1 change: 0 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ else
exec > >(tee "$_SENTRY_LOG_FILE")
exec 2>&1
debug "Development errors will be reported to Sentry.io. If you wish to opt-out, set SENTRY_DEVENV_NO_REPORT as an env variable."
# This will allow `sentry devservices` errors to be reported
export SENTRY_DEVSERVICES_DSN=https://[email protected]/1492057
fi

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ test-tools:
@echo ""

# JavaScript relay tests are meant to be run within Symbolicator test suite, as they are parametrized to verify both processing pipelines during migration process.
# Running Locally: Run `sentry devservices up kafka` before starting these tests
# Running Locally: Run `devservices up` before starting these tests
test-symbolicator:
@echo "--> Running symbolicator tests"
python3 -b -m pytest tests/symbolicator -vv --cov . --cov-report="xml:.artifacts/symbolicator.coverage.xml" --junit-xml=.artifacts/symbolicator.junit.xml -o junit_suite_name=symbolicator
Expand Down
8 changes: 1 addition & 7 deletions bin/split-silo-database
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
import os

import click
from django.apps import apps
Expand Down Expand Up @@ -32,12 +31,7 @@ def split_database(tables: list[str], source: str, destination: str, reset: bool
command.extend([">", f"/tmp/{destination}-tables.sql"])

with get_docker_client() as client:
postgres_container = (
"sentry-postgres-1"
if os.environ.get("USE_OLD_DEVSERVICES") != "1"
else "sentry_postgres"
)
postgres = client.containers.get(postgres_container)
postgres = client.containers.get("sentry-postgres-1")

if verbose:
click.echo(f">> Running {' '.join(command)}")
Expand Down
Empty file removed config/chartcuterie/.gitkeep
Empty file.
20 changes: 0 additions & 20 deletions config/clickhouse/dist_config.xml

This file was deleted.

6 changes: 0 additions & 6 deletions config/clickhouse/loc_config.xml

This file was deleted.

22 changes: 0 additions & 22 deletions config/relay/config.yml

This file was deleted.

5 changes: 0 additions & 5 deletions config/relay/credentials.json

This file was deleted.

11 changes: 0 additions & 11 deletions config/symbolicator/config.yml

This file was deleted.

48 changes: 6 additions & 42 deletions devenv/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ def main(context: dict[str, str]) -> int:
FRONTEND_ONLY = os.environ.get("SENTRY_DEVENV_FRONTEND_ONLY") is not None
SKIP_FRONTEND = os.environ.get("SENTRY_DEVENV_SKIP_FRONTEND") is not None

USE_OLD_DEVSERVICES = os.environ.get("USE_OLD_DEVSERVICES") == "1"

if constants.DARWIN and os.path.exists(f"{constants.root}/bin/colima"):
binroot = f"{reporoot}/.devenv/bin"
colima.uninstall(binroot)
Expand Down Expand Up @@ -264,41 +262,11 @@ def main(context: dict[str, str]) -> int:
print("Skipping python migrations since SENTRY_DEVENV_FRONTEND_ONLY is set.")
return 0

if USE_OLD_DEVSERVICES:
# Ensure new devservices is not being used, otherwise ports will conflict
proc.run(
(f"{venv_dir}/bin/devservices", "down"),
pathprepend=f"{reporoot}/.devenv/bin",
exit=True,
)
# TODO: check healthchecks for redis and postgres to short circuit this
proc.run(
(
f"{venv_dir}/bin/{repo}",
"devservices",
"up",
"redis",
"postgres",
),
pathprepend=f"{reporoot}/.devenv/bin",
exit=True,
)
else:
# Ensure old sentry devservices is not being used, otherwise ports will conflict
proc.run(
(
f"{venv_dir}/bin/{repo}",
"devservices",
"down",
),
pathprepend=f"{reporoot}/.devenv/bin",
exit=True,
)
proc.run(
(f"{venv_dir}/bin/devservices", "up", "--mode", "migrations"),
pathprepend=f"{reporoot}/.devenv/bin",
exit=True,
)
proc.run(
(f"{venv_dir}/bin/devservices", "up", "--mode", "migrations"),
pathprepend=f"{reporoot}/.devenv/bin",
exit=True,
)

if not run_procs(
repo,
Expand All @@ -315,16 +283,12 @@ def main(context: dict[str, str]) -> int:
):
return 1

postgres_container = (
"sentry_postgres" if os.environ.get("USE_OLD_DEVSERVICES") == "1" else "sentry-postgres-1"
)

# faster prerequisite check than starting up sentry and running createuser idempotently
stdout = proc.run(
(
"docker",
"exec",
postgres_container,
"sentry-postgres-1",
"psql",
"sentry",
"postgres",
Expand Down
6 changes: 1 addition & 5 deletions scripts/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
# shellcheck disable=SC2001 # https://github.com/koalaman/shellcheck/wiki/SC2001

POSTGRES_CONTAINER="sentry-postgres-1"
USE_OLD_DEVSERVICES=${USE_OLD_DEVSERVICES:-"0"}
if [ "$USE_OLD_DEVSERVICES" == "1" ]; then
POSTGRES_CONTAINER="sentry_postgres"
fi

venv_name=".venv"

Expand Down Expand Up @@ -44,7 +40,7 @@ init-config() {
}

run-dependent-services() {
sentry devservices up
devservices up
}

create-db() {
Expand Down
4 changes: 0 additions & 4 deletions scripts/upgrade-postgres.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/bin/bash

POSTGRES_CONTAINER="sentry-postgres-1"
USE_OLD_DEVSERVICES=${USE_OLD_DEVSERVICES:-"0"}
if [ "$USE_OLD_DEVSERVICES" == "1" ]; then
POSTGRES_CONTAINER="sentry_postgres"
fi

OLD_VERSION="9.6"
NEW_VERSION="14"
Expand Down
Loading
Loading