summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-11-27 18:07:52 +0000
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-11-29 09:58:48 +0000
commit47b7a9baaab87f71706e2f605c122721962bba88 (patch)
treee63398b3b3257fca01aa53e3cc24aff618ca8a27
parent9a458402c57de0dd037caf67d732a28ec25e38a6 (diff)
downloadbuildstream-47b7a9baaab87f71706e2f605c122721962bba88.tar.gz
_sandboxremote.py: Remove unnecessary tests.
push_message and push_directory will both raise assertion failures if they fail to send the digest to the server. Checking the digest returned by each only tests that the content was hashed locally, which cannot reasonably fail.
-rw-r--r--buildstream/sandbox/_sandboxremote.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/buildstream/sandbox/_sandboxremote.py b/buildstream/sandbox/_sandboxremote.py
index 54946ca09..c366b3f40 100644
--- a/buildstream/sandbox/_sandboxremote.py
+++ b/buildstream/sandbox/_sandboxremote.py
@@ -139,8 +139,7 @@ class SandboxRemote(Sandbox):
# Upload the Command message to the remote CAS server
command_digest = cascache.push_message(casremote, remote_command)
- if not command_digest or not cascache.verify_digest_on_remote(casremote, command_digest):
- raise SandboxError("Failed pushing build command to remote CAS.")
+
# Create and send the action.
action = remote_execution_pb2.Action(command_digest=command_digest,
input_root_digest=input_root_digest,
@@ -149,8 +148,6 @@ class SandboxRemote(Sandbox):
# Upload the Action message to the remote CAS server
action_digest = cascache.push_message(casremote, action)
- if not action_digest or not cascache.verify_digest_on_remote(casremote, action_digest):
- raise SandboxError("Failed pushing build action to remote CAS.")
# Next, try to create a communication channel to the BuildGrid server.
url = urlparse(self.exec_url)
@@ -299,15 +296,11 @@ class SandboxRemote(Sandbox):
casremote = CASRemote(self.storage_remote_spec)
# Now, push that key (without necessarily needing a ref) to the remote.
-
try:
cascache.push_directory(casremote, upload_vdir)
except grpc.RpcError as e:
raise SandboxError("Failed to push source directory to remote: {}".format(e)) from e
- if not cascache.verify_digest_on_remote(casremote, upload_vdir.ref):
- raise SandboxError("Failed to verify that source has been pushed to the remote artifact cache.")
-
# Now transmit the command to execute
operation = self.run_remote_command(command, upload_vdir.ref, cwd, env)