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 v2.0.0 compatibility #9197

Merged

Conversation

Pwuts
Copy link
Member

@Pwuts Pwuts commented Jan 6, 2025

Make all changes necessary to make everything work with Poetry v2.0.0.

Changes

  • Removed --no-update flag from poetry lock command in codebase
  • Removed extra path arguments from poetry -C [path] run [command] occurrences
  • Regenerated all lock files in hierarchical order
  • Added workaround for Poetry bug where packages.[i].format is now suddenly required

Additionally:

  • Fixed up .dockerignore
    • Fixes .venv being erroneously copied over from local
    • Fixes build context bloat (300MB -> 2.5MB)
  • Fixed warnings about entrypoint script not being installed in docker builds

Relevant (breaking) changes in v2.0.0

  • --no-update flag no longer exists for poetry lock as it has become default behavior
  • The -C option now actually changes the directory, so any path arguments in poetry run commands can/must be removed
  • Poetry v2.0.0 uses the new v2.1 lock file spec, so all lock files have to be regenerated to avoid false-positive lock file updates and checks on future PRs
  • BUG: when specifying poetry.tool.packages, format is required now

Full release notes and change log: https://python-poetry.org/blog/announcing-poetry-2.0.0

@Pwuts Pwuts requested a review from a team as a code owner January 6, 2025 11:18
@github-actions github-actions bot added the platform/backend AutoGPT Platform - Back end label Jan 6, 2025
Copy link

netlify bot commented Jan 6, 2025

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit ca4d09c
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/677c146820610f0008208b30

@github-actions github-actions bot added the size/s label Jan 6, 2025
@Pwuts Pwuts changed the title ci(backend): Remove poetry --no-update flag ci(backend): Remove deprecated poetry lock --no-update flag Jan 6, 2025
Copy link

netlify bot commented Jan 6, 2025

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit ca4d09c
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/677c14687a2f1d00084a7026

@Pwuts Pwuts requested a review from a team as a code owner January 6, 2025 11:53
@Pwuts Pwuts requested review from Swiftyos and aarushik93 and removed request for a team January 6, 2025 11:53
@github-actions github-actions bot added size/l and removed size/s labels Jan 6, 2025
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (dev@0872da1). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             dev    #9197   +/-   ##
======================================
  Coverage       ?   49.62%           
======================================
  Files          ?      144           
  Lines          ?     8916           
  Branches       ?     1240           
======================================
  Hits           ?     4425           
  Misses         ?     4344           
  Partials       ?      147           
Flag Coverage Δ
Linux 49.43% <ø> (?)
Windows 49.59% <ø> (?)
agbenchmark 34.07% <ø> (?)
autogpt-agent 33.94% <ø> (?)
forge 58.03% <ø> (?)
macOS 48.90% <ø> (?)

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

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

@Pwuts Pwuts changed the title ci(backend): Remove deprecated poetry lock --no-update flag ci(backend): Fix Poetry v2.0.0 compatibility Jan 6, 2025
@Pwuts Pwuts enabled auto-merge January 6, 2025 12:10
kcze
kcze previously approved these changes Jan 6, 2025
@Pwuts Pwuts added this pull request to the merge queue Jan 6, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jan 6, 2025
- Resolves #9196

Make all changes necessary to make everything work with Poetry v2.0.0.

## Changes
- Removed `--no-update` flag from `poetry lock` command in codebase
- Removed extra path arguments from `poetry -C [path] run [command]`
occurrences
- Regenerated all lock files in hierarchical order

### Relevant (breaking) changes in v2.0.0
- `--no-update` flag no longer exists for `poetry lock` as it has become
default behavior
- The `-C` option now actually changes the directory, so any path
arguments in `poetry run` commands can/must be removed
- Poetry v2.0.0 uses the new v2.1 lock file spec, so all lock files have
to be regenerated to avoid false-positive lock file updates and checks
on future PRs

Full release notes and change log:
https://python-poetry.org/blog/announcing-poetry-2.0.0
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 6, 2025
- fix .dockerignore
  - fixes .venv being erroneously copied over from local
  - fixes build context bloat (300MB -> 2.5MB)
- fix warnings about entrypoint script not being installed
- workaround for Poetry bug where `packages.[i].format` is now suddenly required
@Pwuts Pwuts enabled auto-merge January 6, 2025 15:47
kcze
kcze previously approved these changes Jan 6, 2025
@Pwuts Pwuts added this pull request to the merge queue Jan 6, 2025
@Pwuts Pwuts requested a review from kcze January 6, 2025 15:51
@Pwuts Pwuts changed the title ci(backend): Fix Poetry v2.0.0 compatibility Fix Poetry v2.0.0 compatibility Jan 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 6, 2025
@Pwuts Pwuts added this pull request to the merge queue Jan 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 6, 2025
@ntindle ntindle added this pull request to the merge queue Jan 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 6, 2025
@ntindle ntindle added this pull request to the merge queue Jan 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 6, 2025
@Pwuts Pwuts merged commit d638c1f into dev Jan 6, 2025
46 checks passed
@Pwuts Pwuts deleted the pwuts/open-2296-remove-no-update-from-poetry-commands-in-ci branch January 6, 2025 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants