Skip to content
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

ModuleNotFoundError: No module named 'synapse.synapse_rust' #95

Closed
Hywan opened this issue Aug 21, 2023 · 6 comments
Closed

ModuleNotFoundError: No module named 'synapse.synapse_rust' #95

Hywan opened this issue Aug 21, 2023 · 6 comments

Comments

@Hywan
Copy link

Hywan commented Aug 21, 2023

Hey :-),

We are using this action as follows:

      - uses: michaelkaye/setup-matrix-synapse@main
        with:
          installer: poetry
          uploadLogs: true
          httpPort: 8228
          disableRateLimiting: true

and it fails with ModuleNotFoundError: No module named 'synapse.synapse_rust', as you can see here https://github.com/matrix-org/matrix-rust-sdk/actions/runs/5923815924/job/16060163847?pr=2428#step:7:209.

Any idea why?

@michaelkaye
Copy link
Owner

Looks like i can replicate with the unit tests in this repository.

Based on the unit tests, it seems to be poetry-specific; as a short term workaround, move back to using pip to install; i think this may need some input from the synapse team on why poetry isn't installing synapse-rust correctly, or if we're missing a step in the dependencies.

@michaelkaye
Copy link
Owner

(to be clear: i'll go and talk to them about this
)

@bnjbvr
Copy link

bnjbvr commented Aug 21, 2023

Thanks for the workaround; out of curiosity (and maybe I should open different issues somewhere else for that), turns out the poetry setup mode takes 3 or 4 minutes to set up the server, while the venv mode only takes half a minute. That's a considerable amount of time spent overall in the CI task, do you think there are ways to make the poetry setup faster, one way or another? (Or can we keep on using the venv setup longer term, i.e. what are the benefits of using poetry over a venv setup?)

bnjbvr added a commit to matrix-org/matrix-rust-sdk that referenced this issue Aug 21, 2023
@michaelkaye
Copy link
Owner

Thanks for the workaround; out of curiosity (and maybe I should open different issues somewhere else for that), turns out the poetry setup mode takes 3 or 4 minutes to set up the server, while the venv mode only takes half a minute. That's a considerable amount of time spent overall in the CI task, do you think there are ways to make the poetry setup faster, one way or another? (Or can we keep on using the venv setup longer term, i.e. what are the benefits of using poetry over a venv setup?)

pip installs in the way that someone just interested in running the code would do it
poetry installs in the manner a developer would want it (thus the longer time to install, i believe)

If you just want a "recent synapse server" then pip is the way to go; if you want the development tip then poetry is needed.

At one point we had this in reverse; and moved to poetry because the pip install was failing: #94 - i think you can safely move back for your actual needs.

@michaelkaye
Copy link
Owner

This should now be resolved on main with #96 ; i'm going to close this issue but reopen if anything else pops up.

@michaelkaye
Copy link
Owner

Further to this with #99 this has been resolved properly, and we're nolonger pinned on an old poetry version.

No action is needed for anyone using the action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants