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

More strict handling of requirement specifiers in requirements.txt. #5118

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

garrettgu10
Copy link
Contributor

@garrettgu10 garrettgu10 commented Feb 28, 2024

After some discussion, the runtime team has decided that we should prevent users from specifying version identifiers altogether within requirements.txt, rather than silently dropping them. This would prevent users from being deluded into thinking that they could specify versions of Python packages in Python workers, then being confused because their code mysteriously breaks.

Fixes EW-8189.

Author has addressed the following:

  • Tests
    • Included
    • Not necessary because: We're moving fast on this experimental functionality and I will be testing the change manually with the prerelease build. The original code also didn't include tests.
  • Changeset (Changeset guidelines)
    • Included
    • Not necessary because:
  • Associated docs
    • Issue(s)/PR(s):
    • Not necessary because: documented inline

Note for PR author:

We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label highlight pr review so future reviewers can take inspiration and learn from it.

After some discussion, the runtime team has decided that we should
prevent users from specifying version identifiers altogether within
requirements.txt, rather than silently dropping them. This would
prevent users from being deluded into thinking that they could
specify versions of Python packages in Python workers.
@garrettgu10 garrettgu10 requested a review from a team as a code owner February 28, 2024 22:17
Copy link

changeset-bot bot commented Feb 28, 2024

🦋 Changeset detected

Latest commit: 5a96e4f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
wrangler Minor
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Feb 28, 2024

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8116126052/npm-package-wrangler-5118

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5118/npm-package-wrangler-5118

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8116126052/npm-package-wrangler-5118 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8116126052/npm-package-create-cloudflare-5118 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8116126052/npm-package-cloudflare-kv-asset-handler-5118
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8116126052/npm-package-miniflare-5118
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8116126052/npm-package-cloudflare-pages-shared-5118
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8116126052/npm-package-cloudflare-vitest-pool-workers-5118

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.30.1 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240223.0
workerd 1.20240223.1 1.20240223.1
workerd --version 1.20240223.1 2024-02-23

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 70.34%. Comparing base (54f6bfc) to head (5a96e4f).
Report is 11 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5118   +/-   ##
=======================================
  Coverage   70.33%   70.34%           
=======================================
  Files         298      298           
  Lines       15515    15546   +31     
  Branches     3987     3999   +12     
=======================================
+ Hits        10913    10936   +23     
- Misses       4602     4610    +8     
Files Coverage Δ
...r/src/deployment-bundle/find-additional-modules.ts 88.37% <40.00%> (-0.66%) ⬇️

... and 11 files with indirect coverage changes

@garrettgu10 garrettgu10 marked this pull request as draft February 28, 2024 22:24
@garrettgu10 garrettgu10 marked this pull request as ready for review February 28, 2024 22:35
@garrettgu10 garrettgu10 force-pushed the ggu/strict-requirements-txt branch from 1ff3aa0 to e6f49a4 Compare February 28, 2024 23:43
@mrbbot mrbbot merged commit 30694a3 into cloudflare:main Mar 4, 2024
17 checks passed
@workers-devprod workers-devprod mentioned this pull request Mar 4, 2024
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.

2 participants