about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-25 02:42:58 +0000
committerbors <bors@rust-lang.org>2018-03-25 02:42:58 +0000
commite5bf0428d134e6f9c1fe54839f249c616b6b0b0b (patch)
tree5132e27e525838437a688b3f5c6ea73f33e7ce38 /src/libsyntax/parse
parent77e2bcb613c58ed2aeb86fdb07f470440f94f205 (diff)
parenta09e9e9a2a0977d164173d8d08aac9fc3c9c3b4b (diff)
downloadrust-e5bf0428d134e6f9c1fe54839f249c616b6b0b0b.tar.gz
rust-e5bf0428d134e6f9c1fe54839f249c616b6b0b0b.zip
Auto merge of #49284 - alexcrichton:use-our-own-cache, r=kennytm
ci: Don't use Travis caches for docker images

This commit moves away from caching on Travis to our own caching on S3 for
caching docker layers between builds. Unfortunately the Travis caches have over
time had a few critical pain points:

* Caches are only updated for successful builds, meaning that if a build times
  out or fails in a different location the sucessfully-created docker images
  isn't always cached. While this makes sense as a general rule of caches it
  hurts our use cases.

* Caches are per-branch and builder which means that we don't have a separate
  cache on each release channel. All our merges go through the `auto` branch
  which means that they're all sharing the same cache, even those for merging to
  master/beta. This means that PRs which switch between master/beta will keep
  rebuilting and having cache misses.

* Caches have historically been invaliated somewhat regularly a little more
  aggressively than we'd want (I think).

* We don't always need to update the contents of the cache if the Docker image
  didn't change at all, and saving off the docker layers can sometimes be quite
  expensive.

For all these reasons this commit drops the usage of Travis's built-in caching
support. Instead our own caching is used by storing blobs to S3. Normally this
would be a very risky endeavour but we're basically priming a cache for a cache
(docker) so if we get this wrong the failure mode is longer builds, not stale
caches. We'll notice that pretty quickly and hopefully fix it!

The logic here is inserted directly into the `src/ci/docker/run.sh` script to
download an image based on a shasum of the `Dockerfile` and other assorted files.
This blob, if found, is loaded into docker and we record what layers were
inserted. After docker finishes the build (hopefully quickly with lots of cache
hits) we then see the sha of the final image. If it's one of the layers we
loaded then there's no need to update the cache. Otherwise we upload our layers
to the global cache, possibly overwriting what we previously just downloaded.

This is hopefully a step towards mitigating #49278 although it doesn't
completely fix it as it means we'll still probably have to retry builds that
bust the cache.
Diffstat (limited to 'src/libsyntax/parse')
0 files changed, 0 insertions, 0 deletions