Skip to content
Snippets Groups Projects
Commit 494fcf7b authored by Jim MacArthur's avatar Jim MacArthur
Browse files

_sandboxremote.py: Remove print statements and correct some mistakes

parent 835f403a
No related branches found
No related tags found
Loading
Pipeline #37588682 failed
......@@ -139,7 +139,6 @@ class SandboxRemote(Sandbox):
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.")
print("Created command digest: {}".format(command_digest.hash))
# Create and send the action.
action = remote_execution_pb2.Action(command_digest=command_digest,
input_root_digest=input_root_digest,
......@@ -148,7 +147,6 @@ class SandboxRemote(Sandbox):
# Upload the Action message to the remote CAS server
action_digest = cascache.push_message(casremote, action)
print("Created action digest: {}".format(action_digest.hash))
if not action_digest or not cascache.verify_digest_on_remote(casremote, action_digest):
raise SandboxError("Failed pushing build action to remote CAS.")
......@@ -166,6 +164,7 @@ class SandboxRemote(Sandbox):
stub = remote_execution_pb2_grpc.ExecutionStub(channel)
request = remote_execution_pb2.ExecuteRequest(action_digest=action_digest,
skip_cache_lookup=False)
self.operation_name = None
def __run_remote_command(stub, execute_request=None, running_operation=None):
try:
......@@ -289,14 +288,14 @@ class SandboxRemote(Sandbox):
# Upload sources
upload_vdir = self.get_virtual_directory()
cascache = self._get_context().get_cascache()
if isinstance(upload_vdir, FileBasedDirectory):
# Make a new temporary directory to put source in
upload_vdir = CasBasedDirectory(self._get_context().artifactcache.cas, ref=None)
upload_vdir = CasBasedDirectory(cascache, ref=None)
upload_vdir.import_files(self.get_virtual_directory()._get_underlying_directory())
upload_vdir.recalculate_hash()
cascache = context.get_cascache()
casremote = CASRemote(self.storage_remote_spec)
# Now, push that key (without necessarily needing a ref) to the remote.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment