Skip to content

Ability to stack BAZELISK_BASE_URL to support local cache with fallback to upstream. #779

@aiuto

Description

@aiuto

Motivation

  • O(10) different kinds of CI machines
    • Each has a mostly minimal OS, + bazelisk, + a few critical tools
    • The base images evolve slowly
  • 100s of instances running at a time
  • 10Ks of clean. machine starts each day

=> 10Ks of bazel downloads each day. That's a waste for everyone.

The need is for us to be able to push bazel releases to our build images in a way that bazelisk can pick up versions off the image, but fall back to the upstream repo if it is not there.

Strawman idea

  • Allow the base url to be a list
  • file:// urls fail fast if the version is not found, going to the next element.
  • check urls in order until we get one. So we can put our own corporate wide cache in front of Google's

So, we can

  • bake bazel 8.1.0 into our build images.
  • experiment with 8.6.0 in a few development branches without committing
  • when we want, flip .bazelversion
  • update the cache on the build machines at a later date.

The important part is that we can do the last two in either order.
The win for everyone is that our builds on clean machines start faster and there is less network traffic to the upstream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions