powerful-eye-58407
06/23/2023, 1:11 PMpowerful-eye-58407
06/23/2023, 1:14 PM$ bazel build //main:hello-world \
--remote_cache=<grpcs://username:pass@internalproxy.studio:443> \
--tls_certificate=ca.crt \
--tls_client_certificate=client.crt \
--tls_client_key=key.pem \
--remote_header='x-bazel-cache=x-bazel-cache'
the proxy needs tls, and uses x-bazel-cache header to direct the traffic to bazel cache instancepowerful-eye-58407
06/23/2023, 1:17 PM-----BEGIN CERTIFICATE-----
actual certificate content
-----END CERTIFICATE-----
and key.pem:
-----BEGIN PRIVATE KEY-----
key content
-----END PRIVATE KEY-----
I had to modify key.pem to convert it to PKCS8 format (it started with BEGIN RSA PRIVATE KEY originally).powerful-eye-58407
06/23/2023, 1:17 PMpowerful-eye-58407
06/23/2023, 1:18 PMssl handshake failed
error in the logs of the service, with transport error
logs in the pants outputpowerful-eye-58407
06/23/2023, 1:19 PMpants test tests/app/test_simple.py --no-local-cache --no-pantsd -ldebug --log-show-rust-3rdparty
powerful-eye-58407
06/23/2023, 1:21 PMpants.toml
content that I think is relevant:
[GLOBAL]
pants_version = "2.16.0"
remote_cache_read = true
remote_cache_write = false
remote_store_address = "<grpcs://username:pass@internalproxy.studio:443>"
remote_instance_name = "main"
remote_ca_certs_path = "certs.pem"
remote_store_headers = "{'X-bazel-cache':'X-bazel-cache'}"
powerful-eye-58407
06/23/2023, 1:22 PM-----BEGIN CERTIFICATE-----
ca content
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
cert content
-----END CERTIFICATE-----
-----BEGIN PRIVATE KEY-----
key content
-----END PRIVATE KEY-----
powerful-eye-58407
06/23/2023, 1:23 PM15:20:16.80 [DEBUG] add_pem_file processed 2 valid and 0 invalid certs
15:20:16.80 [DEBUG] add_pem_file processed 2 valid and 0 invalid certs
...
15:20:27.64 [DEBUG] resolving host="internaproxy.studio"
15:20:27.64 [DEBUG] Running Determine Python dependencies for tests/app/test_simple.py:tests under semaphore with concurrency id: 1, and concurrency: 1
...
15:20:28.26 [WARN] Failed to read from remote cache (1 occurrences so far): Unknown: "transport error"
powerful-eye-58407
06/23/2023, 1:31 PMpowerful-eye-58407
06/23/2023, 1:35 PM