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

Support user CPU time limit #4204

Conversation

matthewdavidrodgers
Copy link
Contributor

User limits provided via script metadata on upload

Example configuration:

[limits]
cpu_ms = 20000

Author has included the following, where applicable:

Reviewer is to perform the following, as applicable:

  • Checked for inclusion of relevant tests
  • Checked for inclusion of a relevant changeset
  • Checked for creation of associated docs updates
  • Manually pulled down the changes and spot-tested

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.

@matthewdavidrodgers matthewdavidrodgers requested a review from a team as a code owner October 17, 2023 16:57
@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2023

🦋 Changeset detected

Latest commit: d1139b6

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

This PR includes changesets to release 1 package
Name Type
wrangler Minor

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

.changeset/pink-jokes-double.md Show resolved Hide resolved
packages/wrangler/src/config/validation.ts Outdated Show resolved Hide resolved
packages/wrangler/src/deploy/deploy.ts Show resolved Hide resolved
@matthewdavidrodgers matthewdavidrodgers force-pushed the matthewrodgers/user-cpu-limits branch from ba042d1 to edbe14a Compare October 18, 2023 17:41
@matthewdavidrodgers matthewdavidrodgers requested a review from a team as a code owner October 18, 2023 17:41
@matthewdavidrodgers matthewdavidrodgers force-pushed the matthewrodgers/user-cpu-limits branch from edbe14a to b51a754 Compare October 18, 2023 17:48
@matthewdavidrodgers matthewdavidrodgers force-pushed the matthewrodgers/user-cpu-limits branch from b51a754 to 1032d6a Compare October 18, 2023 18:05
@matthewdavidrodgers matthewdavidrodgers requested a review from a team as a code owner October 18, 2023 18:05
@github-actions
Copy link
Contributor

github-actions bot commented Oct 18, 2023

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/6565737399/npm-package-wrangler-4204

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6565737399/npm-package-wrangler-4204 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6565737399/npm-package-cloudflare-pages-shared-4204

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


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare 3.20231016.0 3.20231016.0
workerd 1.20231016.0 1.20231016.0
workerd --version 1.20231016.0 2023-10-16

|

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

@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

Merging #4204 (d1139b6) into main (de25f9a) will increase coverage by 0.05%.
Report is 4 commits behind head on main.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4204      +/-   ##
==========================================
+ Coverage   75.41%   75.46%   +0.05%     
==========================================
  Files         223      223              
  Lines       12231    12240       +9     
  Branches     3161     3164       +3     
==========================================
+ Hits         9224     9237      +13     
+ Misses       3007     3003       -4     
Files Coverage Δ
...ler/src/api/pages/create-worker-bundle-contents.ts 100.00% <ø> (ø)
packages/wrangler/src/config/validation.ts 90.10% <100.00%> (+0.07%) ⬆️
packages/wrangler/src/deploy/deploy.ts 87.96% <ø> (ø)
packages/wrangler/src/deploy/index.ts 96.42% <100.00%> (+0.13%) ⬆️
...src/deployment-bundle/create-worker-upload-form.ts 89.92% <100.00%> (+0.07%) ⬆️
packages/wrangler/src/dev/remote.tsx 8.24% <ø> (ø)
packages/wrangler/src/secret/index.ts 88.51% <ø> (ø)

... and 3 files with indirect coverage changes

User limits provided via script metadata on upload

Example configuration:
```
[limits]
cpu_ms = 20000
```
@matthewdavidrodgers matthewdavidrodgers force-pushed the matthewrodgers/user-cpu-limits branch from 1032d6a to d1139b6 Compare October 18, 2023 19:37
@matthewdavidrodgers matthewdavidrodgers merged commit 38fdbe9 into cloudflare:main Oct 19, 2023
@matthewdavidrodgers matthewdavidrodgers deleted the matthewrodgers/user-cpu-limits branch October 19, 2023 16:31
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