Closed delan closed 1 year ago
# salt-call state.highstate test=True 2>&1
[...]
Summary for local
-------------
Succeeded: 68 (unchanged=8, changed=3)
Failed: 0
-------------
Total states run: 68
Total run time: 11.289 s
it’s still using python 3.6 >_>
[ERROR ] Can't parse line 'homu @ git+https://github.com/servo/homu@d6b918f45b4aadfb43ae4cba5b9b80a4f9c00638'
[ERROR ] Command '/home/servo/intermittent-tracker/_venv/bin/python' failed with return code: 1
[ERROR ] stdout: Collecting certifi==2022.12.7
Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting cffi==1.15.1
Using cached cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (402 kB)
Collecting charset-normalizer==3.0.1
Using cached charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (162 kB)
[ERROR ] stderr: ERROR: Could not find a version that satisfies the requirement click==8.1.3
ERROR: No matching distribution found for click==8.1.3
[ERROR ] retcode: 1
[ERROR ] Unable to process requirements file "['/home/servo/intermittent-tracker/requirements.txt']" Error: Collecting certifi==2022.12.7
Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting cffi==1.15.1
Using cached cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (402 kB)
Collecting charset-normalizer==3.0.1
Using cached charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (162 kB) ERROR: Could not find a version that satisfies the requirement click==8.1.3
ERROR: No matching distribution found for click==8.1.3
[ERROR ] Can't parse line 'intermittent-failure-tracker @ git+https://github.com/servo/intermittent-failure-tracker@f905ecaac1b0849b0f77603a12e884e69ec16209'
[ERROR ] Can't parse line 'upstream-wpt-webhook @ git+https://github.com/servo-automation/upstream-wpt-sync-webhook@0e2a9b970d4f7b22ac5c55191e1e6199e7c726eb'
local:
ok, it looks like we needed to manually delete the venv due to the python version bump
# cd ~servo/intermittent-tracker
# mv _venv{,.backup.2023-02-13}
# salt-call state.highstate 2>&1 | tee ~/salt_master_pr1037.2.log
then the service failed to start
Feb 13 15:27:06 ip-172-31-7-49 systemd[4915]: tracker.service: Failed to execute command: No such file or directory
Feb 13 15:27:06 ip-172-31-7-49 systemd[4915]: tracker.service: Failed at step EXEC spawning /home/servo/intermittent-tracker/_venv/bin/intermittent_tracker: No such file or directory
there’s not only no _venv/bin/intermittent_tracker, but also no intermittent_tracker package installed at all
i think the saltfs pip module doesn’t treat having both pkgs and requirements as pip install pkgs -r requirements
but rather ignores the pkgs. i managed to get it working by breaking it into two installs pointing to the same venv:
diff --git a/intermittent-tracker/init.sls b/intermittent-tracker/init.sls
index 79b12de..f8c44ba 100644
--- a/intermittent-tracker/init.sls
+++ b/intermittent-tracker/init.sls
@@ -10,7 +10,7 @@ tracker-debugging-packages:
- pkgs:
- github3.py == 1.0.0a4
-intermittent-tracker:
+intermittent-tracker-deps:
# use virtualenv rather than venv to ensure pip is up to date
# (fixes ModuleNotFoundError for setuptools_rust in cryptography==39.0.1)
virtualenv.managed:
@@ -22,11 +22,6 @@ intermittent-tracker:
- pkg: python3
- pip: virtualenv
pip.installed:
- # pinned deps by specifying both pkgs and requirements (to verify this
- # behaviour, try checking out the tracker repo, downgrading something in
- # requirements.txt, and running `pip install -r requirements.txt .`)
- - pkgs:
- - git+https://github.com/servo/intermittent-tracker@{{ tracker.rev }}
- requirements:
- /home/servo/intermittent-tracker/requirements.txt
- bin_env: /home/servo/intermittent-tracker/_venv
@@ -34,6 +29,26 @@ intermittent-tracker:
- require:
- virtualenv: intermittent-tracker
- file: /home/servo/intermittent-tracker/requirements.txt
+
+intermittent-tracker:
+ # use virtualenv rather than venv to ensure pip is up to date
+ # (fixes ModuleNotFoundError for setuptools_rust in cryptography==39.0.1)
+ virtualenv.managed:
+ - name: /home/servo/intermittent-tracker/_venv
+ - venv_bin: virtualenv
+ - python: python3.7
+ - system_site_packages: False
+ - require:
+ - pkg: python3
+ - pip: virtualenv
+ pip.installed:
+ - pkgs:
+ - git+https://github.com/servo/intermittent-tracker@{{ tracker.rev }}
+ - bin_env: /home/servo/intermittent-tracker/_venv
+ - force_reinstall: True # upgrade: True doesn’t work for git+@ packages
+ - require:
+ - virtualenv: intermittent-tracker-deps
+ - file: /home/servo/intermittent-tracker/requirements.txt
service.running:
- enable: True
- name: tracker
https://build.servo.org/intermittent-tracker/ now works, but the dashboard frontend doesn’t work, because it assumes it’s being served from the root of build.servo.org >_>
This patch makes the changes needed to deploy servo/intermittent-tracker#9.