This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Upgrade poetry-core range to fix #16147#16702
Merged
clokep merged 2 commits intomatrix-org:developfrom Nov 29, 2023
Merged
Conversation
michaelkaye
approved these changes
Nov 29, 2023
Contributor
michaelkaye
left a comment
There was a problem hiding this comment.
This seems to be a) required and b) sufficient to get setup-matrix-synapse installing via poetry again. See https://github.com/michaelkaye/setup-matrix-synapse/actions/runs/7036170569/job/19148201740
DMRobertson
approved these changes
Nov 29, 2023
Contributor
DMRobertson
left a comment
There was a problem hiding this comment.
Thank you for persisting with this. LGTM per below.
Reproduced a broken installation as follows:
docker run -it debian:12-slim bash
apt update
apt install python3 python3-pip pipx git pkg-config libsystemd-dev libicu-dev libpq-dev rustc
pipx install poetry==1.6
pipx ensurepath
exec $SHELL
cd ~
git clone https://github.com/matrix-org/synapse
cd synapse
git checkout v1.97.0
poetry install --all-extras -vv
And then:
$ poetry --version; poetry run python -c "import synapse"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/root/synapse/synapse/__init__.py", line 26, in <module>
from synapse.util.rust import check_rust_lib_up_to_date
File "/root/synapse/synapse/util/rust.py", line 20, in <module>
from synapse.synapse_rust import get_rust_file_digest
ModuleNotFoundError: No module named 'synapse.synapse_rust'
Trying again with newer poetry and this patch:
docker run -it debian:12-slim bash
apt update
apt install python3 python3-pip pipx git pkg-config libsystemd-dev libicu-dev libpq-dev rustc
pipx install poetry==1.7
pipx ensurepath
exec $SHELL
cd ~
git clone https://github.com/matrix-org/synapse
cd synapse
git fetch origin pull/16702/head
git checkout FETCH_HEAD
poetry install --all-extras -vv
# poetry --version; poetry run python -c "import synapse"
Poetry (version 1.7.0)
Contributor
|
Can you add a changelog entry please, so we can get CI churning? I tried to add one to this PR myself, but I don't think I have write access to your fork's branch. Here's my suggestion: From 161330f3383ee04d8f4d6249e939b3c883540c10 Mon Sep 17 00:00:00 2001
From: David Robertson <davidr@element.io>
Date: Wed, 29 Nov 2023 18:06:22 +0000
Subject: [PATCH] Changelog
---
changelog.d/16702.misc | 1 +
1 file changed, 1 insertion(+)
create mode 100644 changelog.d/16702.misc
diff --git a/changelog.d/16702.misc b/changelog.d/16702.misc
new file mode 100644
index 0000000000..be5a508208
--- /dev/null
+++ b/changelog.d/16702.misc
@@ -0,0 +1 @@
+Raise poetry-core upper bound to <=1.8.1. This allows contributors to import Synapse after `poetry install`ing with Poetry 1.6 and above.
--
2.43.0 |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This fixes #16147 but I'm not sure this is precisely the right version bound. Looking through Poetry related issues directly or indirectly related to #16147 I tend to argue Poetry has created more problems than benefit and would prefer removing it altogether.
For example, we are using an unsupported Poetry mechanism for building the Rust
synapse.synapse_rustmodules, see python-poetry/poetry#2740 (comment)Happy to make the necessary changes in order to improve the new contributor onboarding experience, whatever they may be.
Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.(run the linters)
Signed-off-by: Mo Balaa mo@fractalnetworks.co