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

Deltas for 'wrangler pages publish' #1210

Merged
merged 2 commits into from
Jun 10, 2022
Merged

Deltas for 'wrangler pages publish' #1210

merged 2 commits into from
Jun 10, 2022

Conversation

GregBrimble
Copy link
Contributor

@GregBrimble GregBrimble commented Jun 9, 2022

Waiting on an internal thing to be released, but once that's out, this PR will be ready to go. It's out!

feat: Upload the delta for wrangler pages publish

We now keep track of the files that make up each deployment and intelligently only upload the files that we haven't seen. This means that similar subsequent deployments should only need to upload a minority of files and this will hopefully make uploads even faster.

The only bit that has changed is this: https://github.com/cloudflare/wrangler2/pull/1210/files#diff-671053f3ecffd0e36229ae8b3c6090a2becd125b2c3247a41de85836dca29884R1063-R1078

The rest is just pulling out the upload logic for future re-use.

@GregBrimble GregBrimble added enhancement New feature or request pages Relating to Pages labels Jun 9, 2022
@changeset-bot
Copy link

changeset-bot bot commented Jun 9, 2022

🦋 Changeset detected

Latest commit: 2acaf2d

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

This PR includes changesets to release 1 package
Name Type
wrangler 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

@GregBrimble GregBrimble force-pushed the pages-publish-deltas branch from 1347c67 to 0a57051 Compare June 9, 2022 10:22
@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2022

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

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/2476307750/npm-package-wrangler-1210

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

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/1210/npm-package-wrangler-1210

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/2476307750/npm-package-wrangler-1210 dev path/to/script.js

Copy link
Contributor

@sidharthachatterjee sidharthachatterjee left a comment

Choose a reason for hiding this comment

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

Looking good! Let's ensure the new API is up before we get this in. Thank you for the refactoring as well. That'll be helpful for later.

@jrf0110
Copy link
Member

jrf0110 commented Jun 10, 2022

Fantastic!!

We may consider tweaking MAX_BUCKET_SIZE. In my testing, there was a period of around 30-50s with no progress being reported

@GregBrimble GregBrimble force-pushed the pages-publish-deltas branch 2 times, most recently from 389b48f to a7ca0b5 Compare June 10, 2022 16:19
@GregBrimble
Copy link
Contributor Author

We may consider tweaking MAX_BUCKET_SIZE. In my testing, there was a period of around 30-50s with no progress being reported

We can definitely do this if it's a commonly seen problem (or at the very least, we can provide more obvious feedback that an upload is actually happening). I'll keep an eye on issues. If you routinely see this, file one yourself. Otherwise, I'll wait to see if anyone else creates one.

@GregBrimble GregBrimble force-pushed the pages-publish-deltas branch from a7ca0b5 to 31355da Compare June 10, 2022 16:37
@GregBrimble GregBrimble force-pushed the pages-publish-deltas branch from 31355da to 2acaf2d Compare June 10, 2022 16:41
@GregBrimble GregBrimble merged commit 785d418 into main Jun 10, 2022
@GregBrimble GregBrimble deleted the pages-publish-deltas branch June 10, 2022 16:41
@github-actions github-actions bot mentioned this pull request Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pages Relating to Pages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants