Browse Source

devenv: upgrade to 1.14.2 (#81274)

This sets the minimum version to 1.14.2. Running `devenv update` to
update to it will install colima and docker (cli) globally.
joshuarli 3 months ago
parent
commit
ad4c7d1dcb
4 changed files with 12 additions and 19 deletions
  1. 1 1
      devenv/config.ini
  2. 9 16
      devenv/sync.py
  3. 1 1
      requirements-dev-frozen.txt
  4. 1 1
      requirements-dev.txt

+ 1 - 1
devenv/config.ini

@@ -1,5 +1,5 @@
 [devenv]
-minimum_version = 1.13.0
+minimum_version = 1.14.2
 
 [venv.sentry]
 python = 3.12.6

+ 9 - 16
devenv/sync.py

@@ -84,9 +84,9 @@ def check_minimum_version(minimum_version: str):
 Hi! To reduce potential breakage we've defined a minimum
 devenv version ({minimum_version}) to run sync.
 
-Please run the following to update your global devenv to the minimum:
+Please run the following to update your global devenv:
 
-{constants.root}/venv/bin/pip install -U 'sentry-devenv=={minimum_version}'
+devenv update
 
 Then, use it to run sync this one time.
 
@@ -96,7 +96,7 @@ Then, use it to run sync this one time.
 
 
 def main(context: dict[str, str]) -> int:
-    check_minimum_version("1.13.0")
+    check_minimum_version("1.14.2")
 
     repo = context["repo"]
     reporoot = context["reporoot"]
@@ -129,19 +129,12 @@ def main(context: dict[str, str]) -> int:
     print(f"ensuring {repo} venv at {venv_dir}...")
     venv.ensure(venv_dir, python_version, url, sha256)
 
-    if constants.DARWIN:
-        colima.install(
-            repo_config["colima"]["version"],
-            repo_config["colima"][constants.SYSTEM_MACHINE],
-            repo_config["colima"][f"{constants.SYSTEM_MACHINE}_sha256"],
-            reporoot,
-        )
-        limactl.install(
-            repo_config["lima"]["version"],
-            repo_config["lima"][constants.SYSTEM_MACHINE],
-            repo_config["lima"][f"{constants.SYSTEM_MACHINE}_sha256"],
-            reporoot,
-        )
+    if constants.DARWIN and os.path.exists(f"{constants.root}/bin/colima"):
+        # `devenv update`ing to >=1.14.0 will install global colima
+        # so if it's there, uninstall the repo local stuff
+        binroot = f"{reporoot}/.devenv/bin"
+        colima.uninstall(binroot)
+        limactl.uninstall(binroot)
 
     if not run_procs(
         repo,

+ 1 - 1
requirements-dev-frozen.txt

@@ -183,7 +183,7 @@ selenium==4.16.0
 sentry-arroyo==2.16.5
 sentry-cli==2.16.0
 sentry-covdefaults-disable-branch-coverage==1.0.2
-sentry-devenv==1.13.0
+sentry-devenv==1.14.2
 sentry-forked-django-stubs==5.1.1.post1
 sentry-forked-djangorestframework-stubs==3.15.1.post2
 sentry-kafka-schemas==0.1.120

+ 1 - 1
requirements-dev.txt

@@ -1,6 +1,6 @@
 --index-url https://pypi.devinfra.sentry.io/simple
 
-sentry-devenv>=1.13.0
+sentry-devenv>=1.14.2
 devservices>=1.0.4
 
 covdefaults>=2.3.0