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-27 18:18:26 +0000
commit8982988ad1000ccc7c57326456d8b44322da319e (patch)
tree8bd3d9bcedf29cd10a4c60efaae2b5e3fd4530cc
parent2a8a3b19966a25eff30391e9f50dbe9610d20c33 (diff)
downloadbuildstream-jmac/no-verify-digests.tar.gz
_sandboxremote.py: Remove unnecessary tests.jmac/no-verify-digests
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)