Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Include extra dependency groups 'systemd' and 'cache_memory' in debian packages #12640

Merged
merged 4 commits into from
May 5, 2022

Conversation

anoadragon453
Copy link
Member

Fixes #12631.

The systemd and cache_memory extra package groups contain python dependencies that are necessary for using all available options of the base distribution of Synapse in debian packages.

systemd provides the systemd-python package which is required for logging to the systemd journal, whereas cache_memory provides the pympler package, which is required for the caches.track_memory_usage homeserver config option.

These dependencies were available before the poetry changeover, where they seem to have gone missing. This PR adds these extras groups back.

Merging to the release-v1.58 branch with the intention of including this in a v1.58.1 release.


I'm not sure if we also need to add the cache_memory extras group to the following line?

--extras="all,systemd,test" \

@anoadragon453 anoadragon453 requested a review from a team as a code owner May 5, 2022 11:12
changelog.d/12640.misc Outdated Show resolved Hide resolved
--extras all \
--extras test \
--extras systemd \
--extras cache_memory \
Copy link
Member

@richvdh richvdh May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't help but wonder if this is the right fix, or if we should go back to having all include, well, all the extras. (Or, most of them.)

(this used to be included via this code and this code).

Copy link
Member Author

@anoadragon453 anoadragon453 May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good point. As it stands, the docker images also don't look to include pympler:

RUN /root/.local/bin/poetry export --extras all -o /synapse/requirements.txt

Copy link
Member Author

@anoadragon453 anoadragon453 May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming that dependencies for an experimental config option (cache.track_memory_usage) are in fact something that we'd like to include in Debian and Docker images, as they would allow people using those distribution methods to actually test the option.

In that case, including them in all sounds sensible.

I'm not sure if this was clear during the poetry switch, as they seem to have been purposely omitted during the switch:

synapse/pyproject.toml

Lines 236 to 239 in cc76560

# omitted:
# - cache_memory: this is an experimental option
# - test: it's useful to have this separate from dev deps in the olddeps job
# - systemd: this is a system-based requirement

Copy link
Member Author

@anoadragon453 anoadragon453 May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to push this PR through and get 1.58.1 out as that's preventing some .deb installations from starting, if that sounds sensible? Then we can look at clearing up this situation, and allowing testing of the experimental config option on docker.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't help but wonder if this is the right fix, or if we should go back to having all include, well, all the extras. (Or, most of them.)

(this used to be included via this code and this code).

By my reading, the first link explicitly excludes systemd from all. I can't remember why I didn't include pympler; maybe just an oversight.

@anoadragon453 anoadragon453 requested a review from richvdh May 5, 2022 12:55
debian/changelog Outdated Show resolved Hide resolved
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm othet than the changelog

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
@anoadragon453 anoadragon453 enabled auto-merge (squash) May 5, 2022 13:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Synapse not starting anymore after update to 1.58.0: ModuleNotFoundError: No module named 'systemd'
3 participants