AntoinePrv commented on code in PR #50056:
URL: https://github.com/apache/arrow/pull/50056#discussion_r3459852576
##########
dev/archery/archery/benchmark/runner.py:
##########
@@ -26,8 +27,22 @@
from ..lang.cpp import CppCMakeDefinition, CppConfiguration
from ..lang.java import JavaMavenDefinition, JavaConfiguration
from ..utils.cmake import CMakeBuild
+from ..utils.git import git
from ..utils.maven import MavenBuild
from ..utils.logger import logger
+from ..utils.source import ArrowSources
+
+
+def _rev_or_path_dirname(src, rev_or_path):
+ if rev_or_path == ArrowSources.WORKSPACE:
+ return rev_or_path
+ try:
+ sha = git.rev_parse(rev_or_path, git_dir=src.path)
+ if isinstance(sha, bytes):
+ sha = sha.decode("ascii")
+ return sha
+ except Exception:
Review Comment:
Yhea, catching `subprocess.CalledProcessError` but really the whole command
wrappers should properly isolate that.
--
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]