|
@@ -107,6 +107,8 @@ def main(context: dict[str, str]) -> int:
|
|
|
|
|
|
FRONTEND_ONLY = os.environ.get("SENTRY_DEVENV_FRONTEND_ONLY") is not None
|
|
|
|
|
|
+ USE_NEW_DEVSERVICES = os.environ.get("USE_NEW_DEVSERVICES") == "1"
|
|
|
+
|
|
|
from devenv.lib import node
|
|
|
|
|
|
node.install(
|
|
@@ -253,18 +255,35 @@ def main(context: dict[str, str]) -> int:
|
|
|
print("Skipping python migrations since SENTRY_DEVENV_FRONTEND_ONLY is set.")
|
|
|
return 0
|
|
|
|
|
|
- # 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,
|
|
|
- )
|
|
|
+ if USE_NEW_DEVSERVICES:
|
|
|
+ # 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,
|
|
|
+ )
|
|
|
+ else:
|
|
|
+ # 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,
|
|
|
+ )
|
|
|
|
|
|
if not run_procs(
|
|
|
repo,
|