Guard container_path_rewrite against older pulsar-galaxy-lib

check_for_container_rewrite arrives with galaxyproject/pulsar#475, which
is unreleased; the currently pinned pulsar-galaxy-lib (>=0.15.15) lacks
it. Fall back to a no-op via getattr so a rewrite_parameters destination
with an absolute Singularity image path does not raise AttributeError
against the pinned client.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Nate Coraor
2026-08-06 11:52:48 -04:00
parent fd933fae67
commit 4bb19895ff
+5 -1
View File
@@ -1353,7 +1353,11 @@ class PulsarComputeEnvironment(ComputeEnvironment):
# (e.g. cvmfsexec mountrepo mode). A destination ``file_actions`` rule
# with ``path_types: container`` remaps the image; unlike unstructured
# paths, container images are never staged.
return self.path_mapper.check_for_container_rewrite(container_path)
#
# getattr guards older pulsar-galaxy-lib releases lacking the method
# (added in galaxyproject/pulsar#475); drop once the pin requires it.
check = getattr(self.path_mapper, "check_for_container_rewrite", None)
return check(container_path) if check else None
def working_directory(self):
return self._working_directory