Skip to content

Gradual Rollouts versions upload (experimental) command #4744

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

Merged
merged 11 commits into from
Jan 23, 2024

Conversation

RamIdeas
Copy link
Contributor

@RamIdeas RamIdeas commented Jan 12, 2024

What this PR solves / how to test:

This PR implements the new Gradual Rollouts versions upload command for internal-use only. Therefore, it is hidden from the help output.

The command is gated behind the new --experimental-gradual-rollouts flag.

The command is essentially the same as deploy (except using a different endpoint and without applying any triggers) and, for now, has been duplicated so as not to touch the deploy command implementation at all and, while we agree on the differences, the diff should be more readable this way.

The PR is marked as draft and will be refactored to abstracted functions of shared implementation at a granular level before being marked as ready for review. This should allow internal use of the prerelease builds before going through that effort. To avoid teams relying a prerelease builds, we have decided to merge this as-is, and will follow up with tests and refactoring to share code with deploy in a future PR anticipated by week beginning Feb 5th.

Please find the prerelease build instructions in a bot comment below. Specifically for this command you can run:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7575284748/npm-package-wrangler-4744 versions upload

Important

The URL in the command above will be updated as commits/changes are validated. Please refer back here for the latest stable prerelease build.

Author has addressed the following:

  • Tests
    • Included
    • Not necessary because: beta command hidden behind a flag –experimental-gradual-rollouts. Further, as noted above, "To avoid teams relying a prerelease builds, we have decided to merge this as-is, and will follow up with tests and refactoring to share code with deploy in a future PR anticipated by week beginning Feb 5th."
  • Changeset (Changeset guidelines)
    • Included
    • Not necessary because: no user facing changes
  • Associated docs
    • Issue(s)/PR(s): documentation linked to internal ticket WC-1835
    • Not necessary because:

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.

Copy link

changeset-bot bot commented Jan 12, 2024

⚠️ No Changeset found

Latest commit: 3eba4b3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
Contributor

github-actions bot commented Jan 12, 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/7629237740/npm-package-wrangler-4744

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7629237740/npm-package-wrangler-4744 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7629237740/npm-package-create-cloudflare-4744 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7629237740/npm-package-miniflare-4744
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7629237740/npm-package-cloudflare-pages-shared-4744

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


wrangler@3.23.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20231218.2
workerd 1.20231218.0 1.20231218.0
workerd --version 1.20231218.0 2023-12-18

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

Copy link

codecov bot commented Jan 12, 2024

Codecov Report

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

Comparison is base (17db19c) 71.47% compared to head (3eba4b3) 70.59%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4744      +/-   ##
==========================================
- Coverage   71.47%   70.59%   -0.88%     
==========================================
  Files         288      290       +2     
  Lines       14831    15075     +244     
  Branches     3729     3818      +89     
==========================================
+ Hits        10600    10642      +42     
- Misses       4231     4433     +202     
Files Coverage Δ
packages/wrangler/src/metrics/send-event.ts 100.00% <ø> (ø)
packages/wrangler/src/index.ts 89.84% <60.00%> (-0.49%) ⬇️
packages/wrangler/src/versions/index.ts 25.00% <25.00%> (ø)
packages/wrangler/src/versions/upload.ts 10.76% <10.76%> (ø)

... and 6 files with indirect coverage changes

@jacobbednarz
Copy link
Contributor

jacobbednarz commented Jan 17, 2024

the only feedback i have here is from the DX side. once you upload the new version, it would be great if you could capture it from wrangler without needing to make another API call to the version (similar to what already happens with wrangler publish/deploy. suggestion:

 ⛅️ wrangler 0.0.0-31389017
---------------------------

Your worker has access to the following bindings:
- Vars:
  - FOO: bar
Total Upload: 257.61 KiB / gzip: 46.15 KiB
Uploaded example-script (1.39 sec)

Version: 9f893230-f98a-4390-a940-abea253f2e08

@RamIdeas RamIdeas force-pushed the gradual-rollouts-versions-upload-command branch 2 times, most recently from 696f143 to 1402c69 Compare January 18, 2024 19:25
@RamIdeas RamIdeas closed this Jan 18, 2024
@RamIdeas RamIdeas reopened this Jan 18, 2024
@RamIdeas RamIdeas force-pushed the gradual-rollouts-versions-upload-command branch 3 times, most recently from b89281e to 2a768c8 Compare January 18, 2024 19:56
@RamIdeas RamIdeas force-pushed the gradual-rollouts-versions-upload-command branch from 747a909 to 79b2880 Compare January 23, 2024 16:13
@RamIdeas RamIdeas marked this pull request as ready for review January 23, 2024 16:14
@RamIdeas RamIdeas requested a review from a team as a code owner January 23, 2024 16:14
Copy link
Contributor

@mrbbot mrbbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Aside from some concerns about UserErrors all these comments are non-blocking.

@RamIdeas RamIdeas changed the title Gradual Rollouts versions upload command Gradual Rollouts versions upload (experimental) command Jan 23, 2024
@RamIdeas RamIdeas merged commit 5e25935 into main Jan 23, 2024
@RamIdeas RamIdeas deleted the gradual-rollouts-versions-upload-command branch January 23, 2024 17:25
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.

3 participants