Submit content atomically
Closed this issue · 1 comments
smashwilson commented
Currently, we submit metadata envelopes to the content service one at a time. This makes the preparer builds very slow and error-prone, especially for the developer blog, which has a ton of old blog posts to churn through. It also introduces the possibility of race conditions, where an index page that refers to a new envelope is uploaded and published before the page it links.
Instead, what I'd like to implement is an additional content service endpoint that accepts a bulk upload of new envelopes in a single request, either as a tarball or a multipart MIME postbody. Preparers can:
- Bulk upload assets and remember a map of local asset names to CDN URLs.
- Render their envelopes, injecting the asset URLs where relevant by lookup into the map.
- Bundle and upload the rendered envelopes to the content store.
smashwilson commented
Now supported with deconst/content-service#51. #234 encapsulates this, too.