-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: pin packages + docker pin-helper script - DROPS PY36 #175
Conversation
8d134e6
to
590e3f7
Compare
It looks like we'll have to either: Side note that I had a lot of issues with sphinx and py3.6 |
ca5671f
to
9b9d53e
Compare
tox.ini
Outdated
@@ -9,7 +9,7 @@ depends = | |||
report: py{37,38,39,310} | |||
commands = | |||
python --version | |||
pytest -vv --cov=taskgraph --cov=src/taskgraph/run-task --cov-append --cov-report= {posargs} | |||
pytest -n auto -vv --cov=taskgraph --cov=src/taskgraph/run-task --cov-append --cov-report= {posargs} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sold on the parallel test idea, but locally at least it saves multiple minutes per run, and doesn't seem to cause any issues. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me! We can always revert this small change if we face too many intermittent errors.
Edit: I just noticed the perma-error on CI. Maybe it's not worth enabling it for now.
looks like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #137
Thanks a lot for looking into this issue. I'm in favor of dropping Python 3.6. I just checked what gecko uses and it's already on Python3.8[1]:
$ docker pull mozillareleases/gecko_decision:4.0.0@sha256:9f69fe08c28e3cb3cc296451f0a2735df6e25d0e3c877ea735ef1b7f0b345b06
docker.io/mozillareleases/gecko_decision@sha256:9f69fe08c28e3cb3cc296451f0a2735df6e25d0e3c877ea735ef1b7f0b345b06: Pulling from mozillareleases/gecko_decision
16ec32c2132b: Pull complete
1c6fb07fba89: Pull complete
e2066ab6a02e: Pull complete
08a664befb8a: Pull complete
Digest: sha256:9f69fe08c28e3cb3cc296451f0a2735df6e25d0e3c877ea735ef1b7f0b345b06
Status: Downloaded newer image for mozillareleases/gecko_decision@sha256:9f69fe08c28e3cb3cc296451f0a2735df6e25d0e3c877ea735ef1b7f0b345b06
docker.io/mozillareleases/gecko_decision:4.0.0@sha256:9f69fe08c28e3cb3cc296451f0a2735df6e25d0e3c877ea735ef1b7f0b345b06
$ docker run -ti mozillareleases/gecko_decision:4.0.0@sha256:9f69fe08c28e3cb3cc296451f0a2735df6e25d0e3c877ea735ef1b7f0b345b06 bash
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
root@175b8e25177f:~# python --version
Python 2.7.18
root@175b8e25177f:~# python3 --version
Python 3.8.10
@@ -40,5 +40,5 @@ tasks: | |||
using: run-task | |||
cwd: '{checkout}' | |||
command: >- | |||
pip install --user -r requirements/test.txt && | |||
pip install --user -r requirements/test.txt --require-hashes && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big 👍 for adding this param wherever it was missing! 💯
test/test_util_vcs.py
Outdated
@@ -29,7 +29,7 @@ def hg_repo(tmpdir, monkeypatch): | |||
|
|||
# hg sometimes errors out with "nothing changed" even though the commit succeeded | |||
subprocess.call( | |||
["hg", "commit", "-m", "First commit", "--date", _FORCE_COMMIT_DATE_TIME], | |||
["chg", "commit", "-m", "First commit", "--date", _FORCE_COMMIT_DATE_TIME], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible typo: what is chg
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, but I found a problem when running chg, I'll drop it for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a command server written in C that can bypass the startup latency caused by Python. Makes things a bit faster, though in this case I don't think it'll make a big difference vs the other improvements later on.
tox.ini
Outdated
@@ -9,7 +9,7 @@ depends = | |||
report: py{37,38,39,310} | |||
commands = | |||
python --version | |||
pytest -vv --cov=taskgraph --cov=src/taskgraph/run-task --cov-append --cov-report= {posargs} | |||
pytest -n auto -vv --cov=taskgraph --cov=src/taskgraph/run-task --cov-append --cov-report= {posargs} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me! We can always revert this small change if we face too many intermittent errors.
Edit: I just noticed the perma-error on CI. Maybe it's not worth enabling it for now.
set -e | ||
pip install -q -U pip pip-compile-multi | ||
pip-compile-multi -u \ | ||
-g base -g test -g dev -g docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: should we pin docs
against python 3.9 instead of 3.7?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my initial thought. But once I talked to ahal, we decided to go with the minimum supported version of python, as long as it causes no problem to the version that rtd is running.
# Don't quit if a version fails | ||
set +e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the loop is to highlight failures in case the generated dependencies don't work on a later version of Python. If so, what's the use case for letting these commands silently fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improved it now
9b9d53e
to
d47c291
Compare
71d19d9
to
108c7c3
Compare
Codecov ReportBase: 63.88% // Head: 63.85% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #175 +/- ##
==========================================
- Coverage 63.88% 63.85% -0.04%
==========================================
Files 64 64
Lines 5109 5107 -2
==========================================
- Hits 3264 3261 -3
- Misses 1845 1846 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
My understanding was we're not ready to drop 3.6 because taskgraph is used (or at least imported) in parts of the firefox build system, and we don't want to break downstream builds. Did that change? |
""" | ||
The repo fixture depends on the session-scoped git and hg repo fixtures, and | ||
copies the contents of the initialized repos to a temp folder | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should improve the reliability on the tests as well, as it reduces runtime by a few minutes, I'm hoping it's less likely for pytest to have issues with sqlite
6a75841
to
2df198f
Compare
Aiui, as far as the requirements go, py36 isn't supported (even in main) because of tox, sphinx and others. That being said, we can still import and use taskgraph in py36. |
2df198f
to
9dd0cd7
Compare
@hneiva I whipped up a sample repo that demonstrates the problem, at [nedbat/coveragepy#1514]. |
Thanks for doing this! This lgtm, but you'll need to address the test failures before it can land. So requesting changes for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes until CI can be fixed.
9dd0cd7
to
099a16c
Compare
099a16c
to
8b41f8c
Compare
Drops compiling requirements in py36 - taskgraph code is still py36 "compatible"
8b41f8c
to
9b808ac
Compare
Assumes sphinx will always run on python 3.9+ (as set in .readthedocs.yaml) Had to split into it's own requirements file due to conflict with upstream tox package pinning