Skip to content

Commit

Permalink
Make sure job_wrapper uses a consistent metadata strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek authored and bgruening committed Aug 18, 2023
1 parent a177f3e commit f0f3607
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/galaxy/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,7 @@ def external_output_metadata(self):
self.job_id,
metadata_strategy_override=self.metadata_strategy,
tool_id=self.tool.id,
tool_type=self.tool.tool_type,
)
return self.__external_output_metadata

Expand Down Expand Up @@ -1767,7 +1768,7 @@ def fail(message=job.info, exception=None):
# the tasks failed. So include the stderr, stdout, and exit code:
return fail()

extended_metadata = self.external_output_metadata.extended and not self.tool.tool_type == "interactive"
extended_metadata = self.external_output_metadata.extended

# We collect the stderr from tools that write their stderr to galaxy.json
tool_provided_metadata = self.get_tool_provided_job_metadata()
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
"""


def get_metadata_compute_strategy(config, job_id, metadata_strategy_override=None, tool_id=None):
def get_metadata_compute_strategy(config, job_id, metadata_strategy_override=None, tool_id=None, tool_type=None):
metadata_strategy = metadata_strategy_override or config.metadata_strategy
if metadata_strategy == "legacy":
raise Exception("legacy metadata_strategy has been removed")
elif "extended" in metadata_strategy and tool_id != "__SET_METADATA__":
elif "extended" in metadata_strategy and tool_id != "__SET_METADATA__" and tool_type != "interactive":
return ExtendedDirectoryMetadataGenerator(job_id)
else:
return PortableDirectoryMetadataGenerator(job_id)
Expand Down

0 comments on commit f0f3607

Please sign in to comment.