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

Add optional python dependencies to snap packaging #6317

Merged

Conversation

@devec0
Copy link
Contributor

devec0 commented Nov 2, 2019

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file
  • Pull request includes a sign off

This PR adds the optional dependencies to snapcraft packaging, including required build and stage libraries to enable features such as PostgreSQL support.

NOTE: This is currently done by adding the '.[all]' requirement to the python-packages section of the snapcraft file, to avoid having to keep the snapcraft file up to date as dependencies change, and also to work around al imitation in snapcraft, noted in LP#1786939. Once this bug is fixed, then the method could be changed to use a supported snapcraft option to pull in additional dependencies based on the extras_require section of setup.py directly.

The additional stage and build packages are just used to ensure the required binary libraries which are needed by the optional dependencies are included in the resulting snap.

I have built and tested t his snap and am able to run a synapse instance using PostgreSQL as backing database based on these changes.

Signed-off-by: James Hebden james@ec0.io

@devec0 devec0 force-pushed the devec0:snapcraft-add-optional-deps branch 2 times, most recently from 50d920d to b80b9fe Nov 2, 2019
@anoadragon453 anoadragon453 self-assigned this Nov 7, 2019
@anoadragon453 anoadragon453 added this to In progress in Homeserver Task Board via automation Nov 7, 2019
@anoadragon453 anoadragon453 moved this from In progress to Community PRs in Homeserver Task Board Nov 7, 2019
Copy link
Member

anoadragon453 left a comment

This looks plausible. I don't think we need to pull in everything for postgres support, but as you say, it's mostly to not have the maintenance burden of a separate list of dependencies.

Very small change below, but otherwise looks good to me :) Thanks!

changelog.d/6317.misc Outdated Show resolved Hide resolved
Signed-off-by: James Hebden <james@ec0.io>
@devec0 devec0 force-pushed the devec0:snapcraft-add-optional-deps branch from b80b9fe to 71b82fd Nov 7, 2019
@devec0

This comment has been minimized.

Copy link
Contributor Author

devec0 commented Nov 7, 2019

Thanks for the review! I've updated the changelog entry to meet requirements.

@anoadragon453

This comment has been minimized.

Copy link
Member

anoadragon453 commented Nov 14, 2019

Looks good, thank you!

@anoadragon453 anoadragon453 merged commit 53b6559 into matrix-org:develop Nov 14, 2019
20 checks passed
20 checks passed
buildkite/synapse Build #5533 passed (23 minutes, 7 seconds)
Details
buildkite/synapse/check-sample-config Passed (2 minutes, 14 seconds)
Details
buildkite/synapse/check-style Passed (2 minutes, 22 seconds)
Details
buildkite/synapse/isort Passed (26 seconds)
Details
buildkite/synapse/mypy Passed (51 seconds)
Details
buildkite/synapse/newspaper-newsfile Passed (20 seconds)
Details
buildkite/synapse/packaging Passed (33 seconds)
Details
buildkite/synapse/pipeline Passed (12 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-postgres-9-dot-5 Passed (19 minutes, 16 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-sqlite Passed (7 minutes, 52 seconds)
Details
buildkite/synapse/python-3-dot-5-slash-sqlite-slash-old-deps Passed (11 minutes, 48 seconds)
Details
buildkite/synapse/python-3-dot-6-slash-sqlite Passed (7 minutes, 22 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-11 Passed (17 minutes, 55 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-postgres-9-dot-5 Passed (18 minutes, 13 seconds)
Details
buildkite/synapse/python-3-dot-7-slash-sqlite Passed (6 minutes, 56 seconds)
Details
buildkite/synapse/synapse-port-db-slash-python-3-dot-5-slash-postgres-9-dot-5 Passed (1 minute, 50 seconds)
Details
buildkite/synapse/synapse-port-db-slash-python-3-dot-7-slash-postgres-11 Passed (1 minute, 49 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-postgres-9-dot-6-slash-monolith Passed (15 minutes, 38 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-postgres-9-dot-6-slash-workers Passed (14 minutes, 47 seconds)
Details
buildkite/synapse/sytest-python-3-dot-5-slash-sqlite-slash-monolith Passed (12 minutes, 13 seconds)
Details
Homeserver Task Board automation moved this from Community PRs to Done Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants
You can’t perform that action at this time.