You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ju...@apache.org on 2021/05/20 09:07:03 UTC
[buildstream] 02/02: fixup add support for remote-cache
configuration
This is an automated email from the ASF dual-hosted git repository.
juergbi pushed a commit to branch juerg/remote-cache-ci
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 4c7e4b1d39ece26138201138d0f3fd04160fe4cc
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Thu May 20 11:06:08 2021 +0200
fixup add support for remote-cache configuration
---
src/buildstream/_frontend/widget.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/buildstream/_frontend/widget.py b/src/buildstream/_frontend/widget.py
index 2aaa4fd..9b28dcc 100644
--- a/src/buildstream/_frontend/widget.py
+++ b/src/buildstream/_frontend/widget.py
@@ -457,6 +457,11 @@ class LogLine(Widget):
starttime = datetime.datetime.now()
text = ""
+ def format_spec(spec):
+ if spec.instance_name:
+ return "{} (instance: {})".format(spec.url, spec.instance_name)
+ return spec.url
+
self._resolved_keys = {element: element._get_cache_key() for element in stream.session_elements}
# Main invocation context
@@ -483,16 +488,15 @@ class LogLine(Widget):
values["Maximum Build Tasks"] = context.sched_builders
values["Maximum Push Tasks"] = context.sched_pushers
values["Maximum Network Retries"] = context.sched_network_retries
+
+ if context.remote_cache_spec:
+ values["Remote Cache"] = format_spec(specs.remote_cache_spec)
+
text += self._format_values(values)
if context.remote_execution_specs:
specs = context.remote_execution_specs
- def format_spec(spec):
- if spec.instance_name:
- return "{} (instance: {})".format(spec.url, spec.instance_name)
- return spec.url
-
text += "\n"
text += self.content_profile.fmt("Remote Execution Configuration\n", bold=True)
values = OrderedDict()