abderrahim commented on code in PR #1922:
URL: https://github.com/apache/buildstream/pull/1922#discussion_r1632942007


##########
src/buildstream/_cas/casremote.py:
##########
@@ -59,18 +59,7 @@ def _configure_protocols(self):
 
         local_cas = self.cascache.get_local_cas()
         request = local_cas_pb2.GetInstanceNameForRemotesRequest()
-        cas_endpoint = request.content_addressable_storage
-        cas_endpoint.url = self.spec.url
-        if self.spec.instance_name:
-            cas_endpoint.instance_name = self.spec.instance_name
-        if self.spec.server_cert:
-            cas_endpoint.server_cert = self.spec.server_cert
-        if self.spec.client_key:
-            cas_endpoint.client_key = self.spec.client_key
-        if self.spec.client_cert:
-            cas_endpoint.client_cert = self.spec.client_cert
-        if self.spec.keepalive_time is not None:
-            cas_endpoint.keepalive_time.FromSeconds(self.spec.keepalive_time)
+        
request.content_addressable_storage.CopyFrom(self.spec.to_localcas_remote())

Review Comment:
   I'm not sure what's the idiomatic thing to do with grpcio, but I feel it 
would be better to pass it like
   ```
   self.spec.to_localcas_remote(request.content_addressable_storage)
   ```
   
   Would that be possible? Is it something we'd like to do, or is the current 
way more idiomatic?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to