This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update trial old deps CI to use poetry 1.2.0 #13707
Merged
Merged
Changes from 43 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
60bbd62
Update trial old deps CI to use poetry 1.2.0
erikjohnston eddf98e
Newsfile
erikjohnston 96c7cdb
Merge branch 'develop' into erikj/old_deps
erikjohnston c74a7af
Fix?
erikjohnston 20f90b1
Try rejigging old-deps
erikjohnston d5234f7
Fix?
erikjohnston 3953ab0
fix
erikjohnston 19279b4
Fix??
erikjohnston bff7fb4
FIX ONESEFLF!!!
erikjohnston 22ea18b
JUST RUN
erikjohnston 70f3ffd
:(
erikjohnston ca584b4
Merge branch 'develop' into erikj/old_deps
erikjohnston 86248cf
Add some debugging
erikjohnston 0359401
More debugging details
erikjohnston 1c25715
Try py3.8
erikjohnston 1818f14
Try shelling out
erikjohnston 7c5d4ad
Activate virtual env
erikjohnston f62405a
Fix?
erikjohnston 24360df
Try the shell again
erikjohnston e11f2ba
Try just activating the virtualenv
erikjohnston 6225fd5
try uninstall tests
erikjohnston 362ab60
More debugging
erikjohnston 74b015e
Add some caching
erikjohnston eae0143
Add current directory to path
erikjohnston dbdb3b0
Try single job
erikjohnston 435342d
Try
erikjohnston 77eada8
Try a different tack
erikjohnston 702818a
Add and populate cache
erikjohnston f5b21f3
Re-enable tests
erikjohnston 96b8bb0
Update cache
erikjohnston 54d4a10
Fix
erikjohnston bb2a6df
Run tests
erikjohnston c9acee4
Install build deps
erikjohnston 9353e82
Update deps
erikjohnston e829e94
list bcrypt files
erikjohnston 25cf13f
Try manually installing bcrypt
erikjohnston 7f47134
Reinstall bcrypt
erikjohnston 4fe4bc4
fix
erikjohnston 5205d05
Install all deps
erikjohnston fb1364d
Install all deps
erikjohnston 737a827
Install test deps too
erikjohnston f4b582d
Try not reinstalling bcrypt
erikjohnston 4756c35
Make it ready for review
erikjohnston 28f7eb3
Review comments
erikjohnston ac0d74a
Expand comment
erikjohnston File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,16 +150,42 @@ jobs: | |
# Note: sqlite only; no postgres | ||
if: ${{ !cancelled() && !failure() }} # Allow previous steps to be skipped, but not fail | ||
needs: linting-done | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Test with old deps | ||
uses: docker://ubuntu:focal # For old python and sqlite | ||
# Note: focal seems to be using 3.8, but the oldest is 3.7? | ||
# See https://github.com/matrix-org/synapse/issues/12343 | ||
|
||
# There aren't wheels for some of the older deps, so we need to install | ||
# their build dependencies | ||
- run: | | ||
sudo apt-get -qq install build-essential libffi-dev python-dev \ | ||
libxml2-dev libxslt-dev xmlsec1 zlib1g-dev libjpeg-dev libwebp-dev | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.7' | ||
|
||
# Calculating the old-deps actually takes a bunch of time, so we cache the | ||
# pyproject.toml / poetry.lock. | ||
- uses: actions/cache@v3 | ||
id: cache-poetry-old-deps | ||
name: Cache poetry.lock | ||
with: | ||
workdir: /github/workspace | ||
entrypoint: .ci/scripts/test_old_deps.sh | ||
path: | | ||
poetry.lock | ||
pyproject.toml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found this confusing; maybe worth a comment noting that the reason we cache pyproject.toml is because the step beneath patches it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My understanding:
It does need a little bit of thought though: a quick comment SoundsGTM |
||
key: poetry-old-deps2-${{ hashFiles('pyproject.toml') }} | ||
- name: Prepare old deps | ||
if: steps.cache-poetry-old-deps.outputs.cache-hit != 'true' | ||
run: .ci/scripts/prepare_old_deps.sh | ||
|
||
# We only now install poetry so that `setup-python-poetry` caches the | ||
# right poetry.lock's dependencies. | ||
- uses: matrix-org/setup-python-poetry@v1 | ||
with: | ||
python-version: '3.7' | ||
extras: "all test" | ||
|
||
- run: poetry run trial -j 2 tests | ||
- name: Dump logs | ||
# Logs are most useful when the command fails, always include them. | ||
if: ${{ always() }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Update trial old deps CI to use poetry 1.2.0. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
FWIW it's possible that poetry's dependencies might conflict with those of
toml
andwheel
here. It's probably not a problem but calling it out for paranoia's sake.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.
Shouldn't
poetry lock
here be ignoring toml and wheels deps?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.
You're right that the virtualenv managed by poetry will be independent of toml and wheel. What I mean: the depedencies of the poetry package itself, i.e. the stuff listed here
might have conflicts with the toml and wheel versions we've just installed.
But a) it doesn't look like there are any conflicts, and b) I think pip would at least warn us about them.
TL;DR ignore this comment, it's all good