Unverified Commit 3cffba23 authored by mvdbeek's avatar mvdbeek
Browse files

Drop `files_path` bypass, use ComputeEnvironment

to calculate output_extra_files_path also for `files_path`.

This should fix the working/working issue in
https://github.com/galaxyproject/pulsar/issues/296
parent 81a17055
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -125,16 +125,19 @@ class SharedComputeEnvironment(SimpleComputeEnvironment, ComputeEnvironment):

    def output_path_rewrite(self, dataset):
        dataset_path = self.job_io.get_output_path(dataset)
        if hasattr(dataset_path, "false_path"):
        if getattr(dataset_path, "false_path", None):
            return dataset_path.false_path
        else:
            return dataset_path
            return dataset_path.real_path

    def input_extra_files_rewrite(self, dataset):
        return None

    def output_extra_files_rewrite(self, dataset):
        return None
        output_path_rewrite = self.output_path_rewrite(dataset)
        base_output_path = output_path_rewrite[0 : -len(".dat")]
        remote_extra_files_path_rewrite = f"{base_output_path}_files"
        return remote_extra_files_path_rewrite

    def input_metadata_rewrite(self, dataset, metadata_value):
        return None
+0 −6
Original line number Diff line number Diff line
@@ -446,12 +446,6 @@ class ToolEvaluator:
            if not os.path.exists(output_path) and os.path.exists(os.path.dirname(output_path)):
                open(output_path, "w").close()

            # Provide access to a path to store additional files
            # TODO: move compute path logic into compute environment, move setting files_path
            # logic into DatasetFilenameWrapper. Currently this sits in the middle and glues
            # stuff together inconsistently with the way the rest of path rewriting works.
            file_name = hda.dataset.extra_files_path_name
            param_dict[name].files_path = os.path.abspath(os.path.join(job_working_directory, "working", file_name))
        for out_name, output in self.tool.outputs.items():
            if out_name not in param_dict and output.filters:
                # Assume the reason we lack this output is because a filter
+1 −1
Original line number Diff line number Diff line
@@ -475,7 +475,7 @@ class DatasetFilenameWrapper(ToolParameterValueWrapper):
        if self.false_path is not None and key == "file_name":
            # Path to dataset was rewritten for this job.
            return self.false_path
        elif key == "extra_files_path":
        elif key in ("extra_files_path", "files_path"):
            if self.__io_type == "input":
                path_rewrite = self.compute_environment and self.compute_environment.input_extra_files_rewrite(
                    self.unsanitized