deconst/deconst-docs

Submit content atomically

Closed this issue · 1 comments

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:

  1. Bulk upload assets and remember a map of local asset names to CDN URLs.
  2. Render their envelopes, injecting the asset URLs where relevant by lookup into the map.
  3. Bundle and upload the rendered envelopes to the content store.

Now supported with deconst/content-service#51. #234 encapsulates this, too.