|
@@ -108,7 +108,7 @@ Then, use it to run sync this one time.
|
|
|
|
|
|
FRONTEND_ONLY = os.environ.get("SENTRY_DEVENV_FRONTEND_ONLY") is not None
|
|
FRONTEND_ONLY = os.environ.get("SENTRY_DEVENV_FRONTEND_ONLY") is not None
|
|
|
|
|
|
- USE_NEW_DEVSERVICES = os.environ.get("USE_NEW_DEVSERVICES") == "1"
|
|
|
|
|
|
+ USE_OLD_DEVSERVICES = os.environ.get("USE_OLD_DEVSERVICES") == "1"
|
|
|
|
|
|
if constants.DARWIN and check_minimum_version("1.14.2"):
|
|
if constants.DARWIN and check_minimum_version("1.14.2"):
|
|
# `devenv update`ing to >=1.14.0 will install global colima
|
|
# `devenv update`ing to >=1.14.0 will install global colima
|
|
@@ -266,35 +266,41 @@ Then, use it to run sync this one time.
|
|
print("Skipping python migrations since SENTRY_DEVENV_FRONTEND_ONLY is set.")
|
|
print("Skipping python migrations since SENTRY_DEVENV_FRONTEND_ONLY is set.")
|
|
return 0
|
|
return 0
|
|
|
|
|
|
- if USE_NEW_DEVSERVICES:
|
|
|
|
- # Ensure old sentry devservices is not being used, otherwise ports will conflict
|
|
|
|
|
|
+ if USE_OLD_DEVSERVICES:
|
|
|
|
+ # Ensure new devservices is not being used, otherwise ports will conflict
|
|
proc.run(
|
|
proc.run(
|
|
- (
|
|
|
|
- f"{venv_dir}/bin/{repo}",
|
|
|
|
- "devservices",
|
|
|
|
- "down",
|
|
|
|
- ),
|
|
|
|
|
|
+ (f"{venv_dir}/bin/devservices", "down"),
|
|
pathprepend=f"{reporoot}/.devenv/bin",
|
|
pathprepend=f"{reporoot}/.devenv/bin",
|
|
exit=True,
|
|
exit=True,
|
|
)
|
|
)
|
|
|
|
+ # TODO: check healthchecks for redis and postgres to short circuit this
|
|
proc.run(
|
|
proc.run(
|
|
- (f"{venv_dir}/bin/devservices", "up", "--mode", "migrations"),
|
|
|
|
|
|
+ (
|
|
|
|
+ f"{venv_dir}/bin/{repo}",
|
|
|
|
+ "devservices",
|
|
|
|
+ "up",
|
|
|
|
+ "redis",
|
|
|
|
+ "postgres",
|
|
|
|
+ ),
|
|
pathprepend=f"{reporoot}/.devenv/bin",
|
|
pathprepend=f"{reporoot}/.devenv/bin",
|
|
exit=True,
|
|
exit=True,
|
|
)
|
|
)
|
|
else:
|
|
else:
|
|
- # TODO: check healthchecks for redis and postgres to short circuit this
|
|
|
|
|
|
+ # Ensure old sentry devservices is not being used, otherwise ports will conflict
|
|
proc.run(
|
|
proc.run(
|
|
(
|
|
(
|
|
f"{venv_dir}/bin/{repo}",
|
|
f"{venv_dir}/bin/{repo}",
|
|
"devservices",
|
|
"devservices",
|
|
- "up",
|
|
|
|
- "redis",
|
|
|
|
- "postgres",
|
|
|
|
|
|
+ "down",
|
|
),
|
|
),
|
|
pathprepend=f"{reporoot}/.devenv/bin",
|
|
pathprepend=f"{reporoot}/.devenv/bin",
|
|
exit=True,
|
|
exit=True,
|
|
)
|
|
)
|
|
|
|
+ proc.run(
|
|
|
|
+ (f"{venv_dir}/bin/devservices", "up", "--mode", "migrations"),
|
|
|
|
+ pathprepend=f"{reporoot}/.devenv/bin",
|
|
|
|
+ exit=True,
|
|
|
|
+ )
|
|
|
|
|
|
if not run_procs(
|
|
if not run_procs(
|
|
repo,
|
|
repo,
|
|
@@ -312,7 +318,7 @@ Then, use it to run sync this one time.
|
|
return 1
|
|
return 1
|
|
|
|
|
|
postgres_container = (
|
|
postgres_container = (
|
|
- "sentry_postgres" if os.environ.get("USE_NEW_DEVSERVICES") != "1" else "sentry-postgres-1"
|
|
|
|
|
|
+ "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
|
|
# faster prerequisite check than starting up sentry and running createuser idempotently
|