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

Pin and test Poetry version #44

Merged
merged 2 commits into from
Sep 19, 2021
Merged

Pin and test Poetry version #44

merged 2 commits into from
Sep 19, 2021

Conversation

br3ndonland
Copy link
Owner

Description

Poetry has introduced a number of problematic changes recently. To help buffer against these problematic changes, this PR will implement installation and testing of specific versions of Poetry, rather than the latest version.

Changes

The following steps will be taken to verify the Poetry version, both when installing Poetry on the GitHub Actions runner, and when installing Poetry in Docker container images:

  1. Set the POETRY_VERSION environment variable, which should be used by the get-poetry.py and install-poetry.py install scripts to install the specified version
  2. Download the Poetry install script from the GitHub repo at a specific Git tag by templating the POETRY_VERSION environment variable into the URL
  3. Run a shell test to assert that the Poetry version returned by the poetry -V command matches POETRY_VERSION (in case the install script stops correctly reading POETRY_VERSION, for example)

Commits:

  • Pin and test Poetry version in GitHub Actions (a38617d)
  • Pin and test Poetry version in Docker (036b57c)

Related

#36
python-poetry/poetry#3870
python-poetry/poetry#4210
python-poetry/poetry#4429

Poetry has introduced a number of problematic changes recently.
To help buffer against these problematic changes, this commit will
implement installation of specific versions of Poetry, rather than the
latest version.

- Move `POETRY_*` variables to workflow-level `env` to use in all jobs
- Set `POETRY_HOME` to align GitHub Actions and Docker installations
- Template `POETRY_VERSION` into the download URL
- Run a shell test to assert that `poetry -V` matches `POETRY_VERSION`
Poetry has introduced a number of problematic changes recently.
To help buffer against these problematic changes, this commit will
implement installation of specific versions of Poetry, rather than the
latest version.

- Add `POETRY_VERSION` build argument and default to Dockerfile
- Use `POETRY_VERSION` build argument when building Docker images
- Run a shell test to assert that `poetry -V` matches `POETRY_VERSION`
@vercel
Copy link

vercel bot commented Sep 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/br3ndonland/inboard/6K8iR1WpFETt7JDKFDaqrym4LApM
✅ Preview: https://inboard-git-poetry-version-br3ndonland.vercel.app

@codecov
Copy link

codecov bot commented Sep 19, 2021

Codecov Report

Merging #44 (036b57c) into develop (c59805a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop       #44   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          264       264           
=========================================
  Hits           264       264           
Flag Coverage Δ
unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c59805a...036b57c. Read the comment docs.

@br3ndonland br3ndonland merged commit 02066b3 into develop Sep 19, 2021
@br3ndonland br3ndonland deleted the poetry-version branch September 19, 2021 04:39
br3ndonland added a commit that referenced this pull request Sep 19, 2021
#36
#44

PR #44 introduced version tests for Poetry. The GitHub Actions workflow
builds.yml was matching the version number as a substring anywhere in
the output of `poetry -V`, but the hooks.yml and tests.yml workflows
were matching the version number at the end of the `poetry -V` output.
This would have become an issue if the format of the output was changed,
and sure enough, Poetry 1.2.0 changes the format to have parentheses
around the version number.

This commit will update the hooks.yml and tests.yml workflows to match
the version number as a substring anywhere in the output of `poetry -V`.
@br3ndonland br3ndonland mentioned this pull request Sep 19, 2021
10 tasks
br3ndonland added a commit to br3ndonland/template-python that referenced this pull request Oct 24, 2021
br3ndonland added a commit to br3ndonland/dotfiles that referenced this pull request Oct 10, 2022
After creating numerous problems for maintainers by cramming breaking
changes into patch releases, Poetry finally released a minor version,
1.2, which should probably have been a major version.

In order to upgrade, each project will need to update its pyproject.toml
(to support groups), update any references to the install script (which
has been moved twice), and make several other associated changes.

This commit will set an upper bound on the `pipx install poetry` command
to avoid upgrading to Poetry 1.2.

br3ndonland/inboard#36
br3ndonland/inboard#44
br3ndonland/inboard#47
https://python-poetry.org/blog/announcing-poetry-1.2.0/
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

Successfully merging this pull request may close these issues.

1 participant