-
Notifications
You must be signed in to change notification settings - Fork 333
Description
Context
A monorepo setup with Buck2 build. I have a .buckconfig holding all the config details including [buck2_re_client] for remote builds.
Issue
In my .buckconfg the remote build section looks like:
[buck2_re_client]
action_cache_address = <my_rbe.com>
engine_address = <my_rbe.com>
cas_address = <my_rbe.com>
instance_name = default
Since I want to do remote builds via CI as well, I was planning to create another file like .buckconfig.ci which shall hold the certs
[buck2_re_client]
tls_ca_certs = <path/to/ca/cert/in/ci>
tls_client_cert = <path/to/client/cert/in/ci>
and build like :
buck2 build --prefer-remote --config-file .buckconfig.ci <targets>
Expected
The Buck2 client merges the configs (as it does when users have a .buckconfig and .buckconfig.local on their dev setup locally) and does the build.
Actual
It fails with Unable to verify certificate or transport error: invalid peer certificate. If I copy paste the key-value pairs mentioned in .buckconfig.ci to .buckconfig itself and run, it works smoothly.
What changed?
We were earlier using http_headers to pass JWT token for auth with our RBE. In .buckconfig we kept the token as an environment variable (which would be exposed via CI) and for developers, they could simply override via .buckconfig.local
Constraints
I can't put these certs in .buckconfig as we want developers to use the JWT token method only.
Note
I also tried using --config as mentioned in https://buck2.build/docs/concepts/buckconfig/#precedence-of-buck2-configuration-specifications but didn't help.