Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

AC: use a RootDirectoryDigest for directory assets #40

Merged
merged 2 commits into from
Jul 29, 2024

Commits on Jul 29, 2024

  1. AC: Use RootDirectoryDigest for Directories

    bb-remote-asset does some cleverness to pop `Directory` objects into the
    OutputDirectories field of the ActionResult for semantic purposes. This
    commit cleans up that cleverness to allow blobs that look a bit like
    directories to be uploaded as asset.
    
    Prior to this commit we detected whether an object is a `Directory` by
    fetching it from CAS and attempting to unmarshal it into a `Directory`
    message. This commit requires all assets uploaded via `PushDirectory`
    are `Directories` (and treats assets uploaded via `PushBlob` as blobs).
    
    We still must convert Directories to a Tree to generate the `TreeDigest`
    needed by the `ActionResult`, so the action cache asset store will fetch
    from the CAS when putting a new directory. (The ActionResult needs a
    `TreeDigest` to satisfy bb-storage's completeness checking.)
    
    If the client decides to use `PushDirectory` to push something that
    isn't a `Directory` (which isn't explicitly banned by the spec), then we
    will
    error. The client will need to use `PushBlob` for these assets instead.
    
    Fixes buildbarn#33
    Closes buildbarn#34
    harrysarson committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    08705e5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5f8b6c1 View commit details
    Browse the repository at this point in the history