You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by GitBox <gi...@apache.org> on 2022/07/03 20:07:00 UTC

[GitHub] [buildstream] fishrockz commented on a diff in pull request #1671: _cas/casdprocessmanager.py: Assert minimal required version of buildbox-casd

fishrockz commented on code in PR #1671:
URL: https://github.com/apache/buildstream/pull/1671#discussion_r912531396


##########
src/buildstream/_cas/casdprocessmanager.py:
##########
@@ -92,6 +106,60 @@ def __init__(self, path, log_dir, log_level, cache_quota, remote_cache_spec, pro
                 casd_args, cwd=path, stdout=logfile_fp, stderr=subprocess.STDOUT, preexec_fn=os.setpgrp
             )
 
+    # _check_casd_version()
+    #
+    # Check for minimal acceptable version of buildbox-casd.
+    #
+    # If the version is unacceptable, then an error is raised.
+    #
+    # If buildbox-casd was built without version information available (or has reported
+    # version information with a string which we are unprepared to parse), then
+    # a warning is produced to inform the user.
+    #
+    def _check_casd_version(self, messenger):
+        #
+        # We specify a trailing "path" argument because some versions of buildbox-casd
+        # require specifying the storage path even for invoking the --version option.
+        #
+        casd_args = [utils.get_host_tool("buildbox-casd")]
+        casd_args.append("--version")
+        casd_args.append("/")

Review Comment:
   Is this slash meant to deal with the odd bug were `buildbox-casd --version` fails but  `buildbox-casd --version any_string_will_do` ? 
   
   have we reported this upstream to buildbox-casd? and could could have a comment to this effect as its rather odd to add the slash without knowledge of this bug? I'm sure i will have forgotten this quirk in a few weeks. 



-- 
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: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org