summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Blanchard <martin.blanchard@codethink.co.uk>2019-02-21 12:33:56 +0000
committerMartin Blanchard <martin.blanchard@codethink.co.uk>2019-02-22 14:26:01 +0000
commitc7bf1f9636f3db3f6f77798f06233ffe8cced2eb (patch)
tree6a5f575539aef17a88c52c507a4b0fa03089f7a6
parente3e1fb87aef1490f2438f34c053c747b6a32d175 (diff)
downloadbuildstream-c7bf1f9636f3db3f6f77798f06233ffe8cced2eb.tar.gz
Use 'instance-name' everywhere in remote execution config.
Currently the 'artifacts' section expects 'instance_name', the 'remote-execution' section expects 'instance' and documentation mentions 'instance-name'... This patch changes this to use 'instance-name' everywhere.
-rw-r--r--buildstream/_cas/casremote.py4
-rw-r--r--buildstream/sandbox/_sandboxremote.py12
2 files changed, 8 insertions, 8 deletions
diff --git a/buildstream/_cas/casremote.py b/buildstream/_cas/casremote.py
index 56ba4c5d8..31b87ee77 100644
--- a/buildstream/_cas/casremote.py
+++ b/buildstream/_cas/casremote.py
@@ -31,7 +31,7 @@ class CASRemoteSpec(namedtuple('CASRemoteSpec', 'url push server_cert client_key
#
@staticmethod
def _new_from_config_node(spec_node, basedir=None):
- _yaml.node_validate(spec_node, ['url', 'push', 'server-cert', 'client-key', 'client-cert', 'instance_name'])
+ _yaml.node_validate(spec_node, ['url', 'push', 'server-cert', 'client-key', 'client-cert', 'instance-name'])
url = _yaml.node_get(spec_node, str, 'url')
push = _yaml.node_get(spec_node, bool, 'push', default_value=False)
if not url:
@@ -39,7 +39,7 @@ class CASRemoteSpec(namedtuple('CASRemoteSpec', 'url push server_cert client_key
raise LoadError(LoadErrorReason.INVALID_DATA,
"{}: empty artifact cache URL".format(provenance))
- instance_name = _yaml.node_get(spec_node, str, 'server-cert', default_value=None)
+ instance_name = _yaml.node_get(spec_node, str, 'instance-name', default_value=None)
server_cert = _yaml.node_get(spec_node, str, 'server-cert', default_value=None)
if server_cert and basedir:
diff --git a/buildstream/sandbox/_sandboxremote.py b/buildstream/sandbox/_sandboxremote.py
index 67c0b1d69..e9a4a7cb5 100644
--- a/buildstream/sandbox/_sandboxremote.py
+++ b/buildstream/sandbox/_sandboxremote.py
@@ -81,7 +81,7 @@ class SandboxRemote(Sandbox):
if config.action_service:
self.action_url = config.action_service['url']
- self.action_instance = config.action_service.get('instance', None)
+ self.action_instance = config.action_service.get('instance-name', None)
self.action_credentials = grpc.ssl_channel_credentials(
root_certificates=action_certs.get('server-cert'),
private_key=action_certs.get('client-key'),
@@ -91,8 +91,8 @@ class SandboxRemote(Sandbox):
self.action_instance = None
self.action_credentials = None
- self.exec_instance = config.exec_service.get('instance', None)
- self.storage_instance = config.storage_service.get('instance', None)
+ self.exec_instance = config.exec_service.get('instance-name', None)
+ self.storage_instance = config.storage_service.get('instance-name', None)
self.storage_remote_spec = CASRemoteSpec(self.storage_url, push=True,
server_cert=config.storage_service['server-cert'],
@@ -133,10 +133,10 @@ class SandboxRemote(Sandbox):
remote_exec_storage_config = require_node(remote_config, 'storage-service')
remote_exec_action_config = remote_config.get('action-cache-service', {})
- _yaml.node_validate(remote_exec_service_config, ['url', 'instance'] + tls_keys)
- _yaml.node_validate(remote_exec_storage_config, ['url', 'instance'] + tls_keys)
+ _yaml.node_validate(remote_exec_service_config, ['url', 'instance-name'] + tls_keys)
+ _yaml.node_validate(remote_exec_storage_config, ['url', 'instance-name'] + tls_keys)
if remote_exec_action_config:
- _yaml.node_validate(remote_exec_action_config, ['url', 'instance'] + tls_keys)
+ _yaml.node_validate(remote_exec_action_config, ['url', 'instance-name'] + tls_keys)
else:
remote_config['action-service'] = None