Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

docker-compose: Add bb-remote-asset to setup #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 10, 2023

  1. docker-compose: Add bb-remote-asset to setup

    This change adds a bb-remote-asset setup to the docker-compose
    deployment example, which allows for:
    
    * easier local testing of bb-remote-asset with the other buildbarn
      components
    * a working example of how bb-remote-asset should be configured*
    
    Tested: Started locally via `docker-compose/run.sh`; ran:
    
    ```
    bazel clean --expunge && \
      rm -rf ~/.cache/bazel/_bazel_$USER/cache/ && \
      bazel build \
        --remote_executor=grpc://localhost:8980 \
        --remote_instance_name=fuse \
        --experimental_remote_downloader=grpc://localhost:8984 \
        //...
    ```
    
    Build completed successfully, and remote-asset logs showed blobs being
    downloaded.
    
    Ran the following twice:
    
    ```
    grpc_cli call localhost:8984 \
      build.bazel.remote.asset.v1.Fetch.FetchBlob \
      'instance_name: "fuse" uris: "https:/bazelbuild/remote-apis/raw/main/build/bazel/remote/asset/v1/remote_asset.proto" qualifiers { name: "checksum.sri" value: "sha256-e8wR0NA0I8XHMeF8Fzk7EjHrLYQp4zUpZtXZIe3c3Fs=" }'
    ```
    
    and got the following responses:
    
    ```
    connecting to localhost:8984
    status {
      message: "Blob fetched successfully!"
    }
    uri: "https:/bazelbuild/remote-apis/raw/main/build/bazel/remote/asset/v1/remote_asset.proto"
    qualifiers {
      name: "checksum.sri"
      value: "sha256-e8wR0NA0I8XHMeF8Fzk7EjHrLYQp4zUpZtXZIe3c3Fs="
    }
    blob_digest {
      hash: "7bcc11d0d03423c5c731e17c17393b1231eb2d8429e3352966d5d921eddcdc5b"
      size_bytes: 21947
    }
    Rpc succeeded with OK status
    ```
    
    ```
    connecting to localhost:8984
    status {
      message: "Blob fetched successfully from asset cache"
    }
    uri: "https:/bazelbuild/remote-apis/raw/main/build/bazel/remote/asset/v1/remote_asset.proto"
    qualifiers {
      name: "checksum.sri"
      value: "sha256-e8wR0NA0I8XHMeF8Fzk7EjHrLYQp4zUpZtXZIe3c3Fs="
    }
    blob_digest {
      hash: "7bcc11d0d03423c5c731e17c17393b1231eb2d8429e3352966d5d921eddcdc5b"
      size_bytes: 21947
    }
    Rpc succeeded with OK status
    ```
    
    which indicates that caching functionality works as well.
    
    ---
    
    *I don't actually know the best way to configure bb-remote-asset
    minor-fixes committed May 10, 2023
    Configuration menu
    Copy the full SHA
    6d96462 View commit details
    Browse the repository at this point in the history