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

Using poetry export to check that the lockfile is up-to-date seems slow #7

Open
DMRobertson opened this issue Aug 21, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@DMRobertson
Copy link
Contributor

If I read these GHA logs correctly we spend 36 seconds exporting requirements:

2022-08-21T22:31:44.5772425Z ##[group]Run poetry export --without-hashes | (! grep "The lock file is not up to date") || (echo pyproject.toml was updated without running \`poetry lock --no-update\`. && false)
2022-08-21T22:31:44.5773070Z �[36;1mpoetry export --without-hashes | (! grep "The lock file is not up to date") || (echo pyproject.toml was updated without running \`poetry lock --no-update\`. && false)�[0m
2022-08-21T22:31:44.5828102Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2022-08-21T22:31:44.5828382Z env:
2022-08-21T22:31:44.5828669Z   pythonLocation: /opt/hostedtoolcache/Python/3.10.6/x64
2022-08-21T22:31:44.5829028Z   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.6/x64/lib
2022-08-21T22:31:44.5829308Z ##[endgroup]
2022-08-21T22:32:20.8390032Z ##[group]Run poetry install --no-interaction --extras="all"

See if there's a quicker way to check that the lockfile is up-to-date. Poetry should just need to

  • parse pyproject.toml
  • compute checksum
  • compare to checksum in lockfile

so we don't need to run any of its exporting logic.

@DMRobertson DMRobertson added the enhancement New feature or request label Aug 21, 2022
@DMRobertson
Copy link
Contributor Author

Need to re-examine this for poetry 1.2

@DMRobertson
Copy link
Contributor Author

We tried poetry lock --check (#10) briefly on 1.2.0 and it seemed to have a similar speed on my machine to running the export.

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

No branches or pull requests

1 participant