Skip to content

'bst pull' with --remote override fails to initialize remote because 'push not allowed'

Summary

I have an artifact cache server configured in my project.conf where I can pull things using bst pull ... I want to remove this from my configuration and pass it to CLI instead (--remote).

But it fails with the message CAS server does not allow push.

Additionally, maybe it's just me, but I found the docs a bit unclear about this: Can this --remote be used to provide a new URL or is it just for prioritization for existing URLs? Because I tried keeping the URL in the project.conf and still used --remote. If it is the former, how does this work for bst push? (A potential topic to file another issue, if verified)

Steps to reproduce

Run an artifact server in bg if you don't already have a working one:

$ bst-artifact-server /tmp/ -p 11001 &
# CACHE_URL = http://localhost:11001
  1. Have a CACHE_URL, in project.conf, where pull works without any need of certificates, keys etc, test bst pull.
  2. Remove it from project.conf, do bst pull --remote CACHE_URL .. instead.

What is the current bug behavior?

..
[00:00:00][][] SUCCESS Resolving elements
[--:--:--][][] START   Initializing remote caches
[--:--:--][][] WARNING Failed to initialize remote CACHE_URL: CAS server does not allow push # why fail here?
[00:00:00][][] SUCCESS Initializing remote caches
[--:--:--][][] START   Resolving cached state
..

What is the expected correct behavior?

According to the docs bst should try to configure the supplied URL for pulling and not fail during init step.

Possible fixes

To find a starting point quickly, I searched for the string CAS server does not allow push and failed. I guess this error comes from gRPC endpoint/cache directly. I am not very familiar with remote cache initialization code path yet but I guess the fix would be not asking for push feature if --remote used in a bst-pull command like it already works with project.conf.

Adding more clarification to docs would also helpful.

Other relevant information

  • BuildStream version affected: 1.3.0+973.g2a8a3b19

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information