React: Modernize release process

Created on 29 Apr 2016  ·  3Comments  ·  Source: facebook/react

It's way too much work to do a React release right now. It's mostly muscle memory for me at this point but it should be easy for anybody to do it. Historically I kept certain steps manual because I screwed things up and wanted to be able to pause and double check.

There are a few things contributing to the difficulty:

  • use of react-bower repo as the first push target

    • which is a result of fb.me link generation / CDNization needing to happen on internal FB infra

  • manual steps across multiple repos
  • manual version modification
  • assets needing to be in multiple places, copied across branches

A few ideas:

  • we should be able to differentiate between pre- and final releases. It should be a single command to ship a new alpha at any point and they should be lightweight.
  • final releases need a little more since they will get installed by default by people and have additional requirements (eg changelogs, assets in multiple places)
  • npm run release which then does all the things. It could be an interactive process
  • start using the GitHub releases APIs to store build assets, cutting out steps
  • set up cdn.reactjs.org and just host our builds there, dropping fb.me entirely (risk, we have to run this forever…)

    • alternatives: work with existing CDNs and make sure we can have versions deployed on command (pull based autoupdating can result in delays, things like jsfiddle, our tutorial need assets available immediately)

  • investigate lerna, could be helpful with the multiple packages we have, though we ideally want to disentangle the releases
Build Infrastructure

Most helpful comment

It seems like we're actually in a good place now.
(Thanks @bvaughn)

All 3 comments

alternatives: work with existing CDNs and make sure we can have versions deployed on command (pull based autoupdating can result in delays, things like jsfiddle, our tutorial need assets available immediately)

With Redux, we’ve been directing people to @mjackson’s http://npmcdn.com.

Thanks for the mention, @gaearon. I've been dropping hints to @zpao for a while now that I'd like him to give npmcdn a shot. ;)

We served 100M+ requests last month from over 16M unique visitors, so we may be ready to handle the kind of traffic React would throw our way. I'm currently working on getting some sponsors in place and terms of service so people can know what they can expect from it.

As for delays, we currently instruct our CDN (CloudFlare) to cache redirects for 5 minutes. So e.g. a request for https://npmcdn.com/react@15/dist/react.min.js will redirect to the latest release at most 5 minutes after it's pushed to npm.

It seems like we're actually in a good place now.
(Thanks @bvaughn)

Was this page helpful?
0 / 5 - 0 ratings