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

fix(poetry): maintain frozen lockfile for install task #3321

Merged
merged 7 commits into from
Feb 13, 2024

Conversation

cogwirrel
Copy link
Contributor

Change the poetry install task from poetry update to poetry lock --no-update && poetry install to ensure that the lockfile is honoured in CI/CD pipelines.

Post synthesis, run a "mutable install" (poetry lock && poetry install) task which updates the lockfile, if the pyproject.toml file has changed (ie dependencies were changed).

Add a new upgrade task which runs poetry update to update dependencies.

Fixes #2913


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Change the poetry install task from `poetry update` to `poetry lock --no-update && poetry install`
to ensure that the lockfile is honoured in CI/CD pipelines.

Post synthesis, run a "mutable install" (`poetry lock && poetry install`) task which updates the
lockfile, if the pyproject.toml file has changed (ie dependencies were changed).

Add a new `upgrade` task which runs `poetry update` to update dependencies.

Fixes projen#2913
@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2024

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (13af203) 96.29% compared to head (619c9be) 96.28%.

Files Patch % Lines
src/python/poetry.ts 81.81% 6 Missing ⚠️
src/python/pip.ts 83.33% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3321      +/-   ##
==========================================
- Coverage   96.29%   96.28%   -0.01%     
==========================================
  Files         191      191              
  Lines       36750    36780      +30     
  Branches     3440     3441       +1     
==========================================
+ Hits        35388    35415      +27     
- Misses       1362     1365       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mrgrain
Copy link
Contributor

mrgrain commented Feb 9, 2024

Nice one! Can we swap the naming around here to mirror what we have for Node?

mutable install -> install
immutable install -> install:ci

@cogwirrel
Copy link
Contributor Author

Nice one! Can we swap the naming around here to mirror what we have for Node?

mutable install -> install
immutable install -> install:ci

Thanks! Good call - updated! 😄

@mergify mergify bot merged commit 12e2183 into projen:main Feb 13, 2024
14 checks passed
@cogwirrel
Copy link
Contributor Author

Thanks Momo! 😄

cogwirrel added a commit to aws/aws-pdk that referenced this pull request Feb 15, 2024
…docs

Fix the `pdk upgrade` command to call the projen task rather than the command for the underlying
package manager.

Add upgrade-deps taks for the python and java monorepos for consistency, which spawn the "upgrade"
tasks (if present) for subprojects.

Added documentation for upgrading dependencies.

This also updates the projen version which includes a fix to ensure the python install task doesn't
upgrade dependencies: projen/projen#3321

Fixes #653
cogwirrel added a commit to aws/aws-pdk that referenced this pull request Feb 15, 2024
…docs

Fix the `pdk upgrade` command to call the projen task rather than the command for the underlying
package manager.

Add `upgrade-deps` tasks for the Python and Java monorepos for consistency, which spawn the
"upgrade" tasks (if present) for subprojects. Also update the `upgrade-deps` task for the TypeScript
monorepo to spawn the "upgrade" task for any non-node project.

Added documentation for upgrading dependencies.

This also updates the projen version which includes a fix to ensure the python install task doesn't
upgrade dependencies: projen/projen#3321

Fixes #653
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.

Poetry install task updates project dependencies
3 participants