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

RFC: how to deal with poetry 1.3's new lockfile format #14857

Closed
DMRobertson opened this issue Jan 16, 2023 · 3 comments
Closed

RFC: how to deal with poetry 1.3's new lockfile format #14857

DMRobertson opened this issue Jan 16, 2023 · 3 comments
Labels
A-Packaging Our Debian packages, docker images; or issues relevant to downstream packagers dependencies Pull requests from dependabot that update a dependency file T-Other Questions, user support, anything else. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@DMRobertson
Copy link
Contributor

DMRobertson commented Jan 16, 2023

I've spent some time on this today and now want to dump context.

Options:

  1. Stop using dependabot.
  2. Ask dependabot authors if there's some way to pin the version of poetry that dependabot uses.
  3. Convert to poetry 1.3.x's lockfile format. Require poetry >= 1.2.2.

I assumed that option (0) was undesirable. Put differently, I contend that dependabot is valuable to us. It does a good job of summarising what's changed in dependencies, and also automatically proposes updates when security advisories are made for our dependencies.

Option (1) seemed like a relatively big ask for a fairly small scenario, so I put that to one side. EDIT: The depdendabot authors seem to be aware of this problem, see dependabot/dependabot-core#1556 (comment) and the discussion following it. In dependabot/dependabot-core#1556 (comment) they point to a poetry issue python-poetry/poetry#3316 for enforcing a minimum poetry issue, which remains open. (Note that we actually want a maximum version here).

Option (2) was my next approach. I started this process in
matrix-org/setup-python-poetry#14 and matrix-org/sytest#1326. But thinking about it, I realised that anyone who wants to edit the lockfile will have to install poetry 1.3.x. This includes some parts of CI (e.g. old deps, twisted trunk); so there's no way of being consistent; option(2) is really

2'. Convert to poetry 1.3.x's lockfile format. Require poetry >= 1.2.2 to read it, and >= 1.3.0 to write it.

but writing this down in our docs/CI sounds like a recipe for future confusion. Instead, I propose the simpler

  1. Convert to poetry 1.3.x's lockfile format. Require poetry >= 1.3 to use it. (1.2.2 will suffice for read-only operations---but we wouldn't advertise this fact.)
@DMRobertson DMRobertson added A-Packaging Our Debian packages, docker images; or issues relevant to downstream packagers T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. T-Other Questions, user support, anything else. dependencies Pull requests from dependabot that update a dependency file labels Jan 16, 2023
@clokep
Copy link
Member

clokep commented Jan 17, 2023

Convert to poetry 1.3.x's lockfile format. Require poetry >= 1.3 to use it. (1.2.2 will suffice for read-only operations---but we wouldn't advertise this fact.)

I think that this is reasonable if we don't have any issues updating to Poetry 1.3.x.

DMRobertson pushed a commit to matrix-org/sytest that referenced this issue Jan 17, 2023
@DMRobertson
Copy link
Contributor Author

Convert to poetry 1.3.x's lockfile format. Require poetry >= 1.3 to use it. (1.2.2 will suffice for read-only operations---but we wouldn't advertise this fact.)

I think that this is reasonable if we don't have any issues updating to Poetry 1.3.x.

At the risk of tempting fate, matrix-org/sytest#1327 and #14860 seem to have Just Worked ™️!

DMRobertson pushed a commit to matrix-org/sytest that referenced this issue Jan 17, 2023
@DMRobertson
Copy link
Contributor Author

Sorted in #14860... hopefully.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Packaging Our Debian packages, docker images; or issues relevant to downstream packagers dependencies Pull requests from dependabot that update a dependency file T-Other Questions, user support, anything else. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

No branches or pull requests

2 participants