Skip to content

BuildGrid and bst-artifact-server use different path schemes

Context

It was until recently possible to share on-disk caches between bst-artifact-server and BuildGrid. Since the new DiskStorage class has appeared, BuildGrid now uses this scheme:

self._path / (digest.hash + "_" + str(digest.size_bytes))

e.g. 4f5f80ce66db541a3fc7b202cdb52a11905c3908d994d99de4e3da2e45f3420d_142

But bst-artifact-server will use the first byte of the hash as a directory, much as git does, giving names like:

4f/5f80ce66db541a3fc7b202cdb52a11905c3908d994d99de4e3da2e45f3420d (no size)

Unless there's any good reason for the first scheme, or good reason why we shouldn't share on-disk caches, could we revert it so it uses the original scheme? Using the first byte as a directory name is useful anyway, as it will delay some problems with filesystem limits.

Task Description

  • Change the path format to the one used by bst-artifact-server.

Acceptance Criteria

Should be possible to specify disk storage in the BuildGrid configuration file pointing to the same location as bst-artifact-server uses.