-
Notifications
You must be signed in to change notification settings - Fork 337
Conversation
0b9d7ff
to
2f48ff0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review is mostly me being picky about error messages - this looks great, super happy to get this done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
update: i'm not necessarily gunning to get this into 1.8.1; i'm happy to wait on 1.9.0. one of the refactors here removes the |
29ffbdf
to
8fc76a7
Compare
Is there an ETA for 1.9.0 or for this to be released (even as an alpha/RC)? |
* remove unused KvNamespace bucket field * return list of files to upload, files to delete from kv::bucket::sync * call upload, delete files directly from publish, preview
35c01d3
to
8bffa1c
Compare
f28cb94
to
a8ad004
Compare
We'll be putting this out on its own as a point release (1.8.2) |
Overview
Fixes #783
Previously, we would run a full KV namespace sync BEFORE uploading the worker script to the edge. This caused some unacceptable downtime for updated assets, as the Worker would continue handling requests to paths with outdated KV keys. This PR does a few things in service of re-ordering these operations, but the bottom line is that now on Wrangler publish, when the project is a Workers Site, we:
wrangler build
bucket
to build the list of files to upload, the list of keys to delete, and the asset manifest to be uploaded with the Worker script.This has the added benefit of NOT deleting old values in the case where the Worker upload fails, since the first KV operation is additive.
Things this is not
This PR introduces a little more verbosity into preview/upload and publish, however there is considerable overlap between those operations already, but I'd like to address those in a separate PR in order to expedite this fix.
I'm also interested in optimizing the preview command's behavior (refrain from deleting until a
ctrl-C
or something like that) but not here.💅
There's a few house-keeping changes here, though more remain which I'll include as inline comments:
remove unused/unsupportedbucket
attribute from KvNamespace struct