Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 58 additions & 6 deletions doc/source/using_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ toplevel of your configuration file, like so:
# Avoid caching build trees if we don't need them
cache-buildtrees: auto

# Connection config is parameters given to grpc. It's completely
# optional. By default keepalive time is unset and grpc defaults
# are used.
connection-config:
keepalive-time: 60

#
# Support CAS server as remote cache
# Useful to minimize network traffic with remote execution
Expand All @@ -158,6 +152,11 @@ toplevel of your configuration file, like so:
client-key: client.key
access-token: access.token
access-token-reload-interval: 60
connection-config:
keepalive-time: 60
retry-limit: 4
retry-delay: 1000
request-timeout: 300


Attributes
Expand Down Expand Up @@ -778,6 +777,49 @@ or sources without authentication. Authentication can be configured by setting
``access-token`` or both ``client-key`` and ``client-cert``.


.. _config_connection_config:

Connection configuration
~~~~~~~~~~~~~~~~~~~~~~~~
BuildStream uses gRPC to communicate with remote services.

All remote service configuration blocks come with an optional ``connection-config``
block which allows setting gRPC connection options.

The ``connection-config`` block looks like this:

.. code:: yaml

connection-config:
keepalive-time: 60
retry-limit: 4
retry-delay: 1000
request-timeout: 300


Attributes
''''''''''

* ``keepalive-time``

The interval in seconds between gRPC PING frames. Disabled by default.
`gRPC keepalive guide <https://grpc.io/docs/guides/keepalive/>`_

* ``retry-limit``

The maximum number of retries, not including the original request.

* ``retry-delay``

The initial backoff in milliseconds for retries.
`gRPC retry guide <https://grpc.io/docs/guides/retry/>`_

* ``request-timeout``

The timeout for gRPC requests in seconds. No timeout by default.
`gRPC deadline guide <https://grpc.io/docs/guides/deadlines/>`_


.. _config_cache_servers:

Cache servers
Expand Down Expand Up @@ -817,6 +859,11 @@ Cache server configuration is declared in the following way:
server-cert: server.crt
client-cert: client.crt
client-key: client.key
connection-config:
keepalive-time: 60
retry-limit: 4
retry-delay: 1000
request-timeout: 300


Attributes
Expand Down Expand Up @@ -1141,6 +1188,11 @@ which looks like this:
server-cert: /keys/server.crt
client-cert: /keys/client.crt
client-key: /keys/client.key
connection-config:
keepalive-time: 60
retry-limit: 4
retry-delay: 1000
request-timeout: 300

**Attributes:**

Expand Down
6 changes: 6 additions & 0 deletions src/buildstream/_cas/casdprocessmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ def __init__(
)
if remote_cache_spec.keepalive_time is not None:
casd_args.append("--cas-keepalive-time={}".format(remote_cache_spec.keepalive_time))
if remote_cache_spec.retry_limit is not None:
casd_args.append("--cas-retry-limit={}".format(remote_cache_spec.retry_limit))
if remote_cache_spec.retry_delay is not None:
casd_args.append("--cas-retry-delay={}".format(remote_cache_spec.retry_delay))
if remote_cache_spec.request_timeout is not None:
casd_args.append("--cas-request-timeout={}".format(remote_cache_spec.request_timeout))

casd_args.append(path)

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading