[med-svn] [Git][med-team/toil][upstream] New upstream version 9.1.2
Michael R. Crusoe (@crusoe)
gitlab at salsa.debian.org
Wed Jan 7 14:31:18 GMT 2026
Michael R. Crusoe pushed to branch upstream at Debian Med / toil
Commits:
b02ef891 by Michael R. Crusoe at 2026-01-07T14:07:55+01:00
New upstream version 9.1.2
- - - - -
5 changed files:
- src/toil/leader.py
- + src/toil/test/wdl/testfiles/gather.wdl
- src/toil/test/wdl/wdltoil_test.py
- src/toil/wdl/wdltoil.py
- version_template.py
Changes:
=====================================
src/toil/leader.py
=====================================
@@ -349,14 +349,9 @@ class Leader:
def create_status_sentinel_file(self, fail: bool) -> None:
"""Create a file in the jobstore indicating failure or success."""
logName = "failed.log" if fail else "succeeded.log"
- localLog = os.path.join(os.getcwd(), logName)
- open(localLog, "w").close()
- self.jobStore.import_file("file://" + localLog, logName, hardlink=True)
-
- if os.path.exists(
- localLog
- ): # Bandaid for Jenkins tests failing stochastically and unexplainably.
- os.remove(localLog)
+ with self.jobStore.write_shared_file_stream(logName) as file_handle:
+ # We just need an empty file, so don't write any content
+ pass
def _handledFailedSuccessor(self, successor_id: str, predecessor_id: str) -> bool:
"""
=====================================
src/toil/test/wdl/testfiles/gather.wdl
=====================================
@@ -0,0 +1,52 @@
+version 1.1
+
+workflow gather {
+ input {
+ }
+
+ scatter(number in [1, 2, 3]) {
+ call task1 {
+ input:
+ number=number
+ }
+ }
+
+ call task2 {
+ input:
+ files = task1.foo
+ }
+
+ output {
+ File outfile = task2.outfile
+ }
+}
+
+task task1 {
+
+ input {
+ Int number
+ }
+
+ command <<<
+ echo ~{number} > foo.txt
+ >>>
+
+ output {
+ File foo = "foo.txt"
+ }
+}
+
+task task2 {
+ input {
+ Array[File] files
+ }
+
+ command <<<
+ cat ~{sep=" " files} >out.txt
+ >>>
+
+ output {
+ File outfile = "out.txt"
+ }
+}
+
=====================================
src/toil/test/wdl/wdltoil_test.py
=====================================
@@ -321,6 +321,28 @@ class TestWDL:
assert "StringFileCoercion.output_file" in result
+ @needs_docker
+ def test_gather(self, tmp_path: Path) -> None:
+ """
+ Test files with the same name from different scatter tasks.
+ """
+ with get_data("test/wdl/testfiles/gather.wdl") as wdl:
+ result_json = subprocess.check_output(
+ self.base_command
+ + [
+ str(wdl),
+ "-o",
+ str(tmp_path),
+ "--logInfo",
+ "--retryCount=0"
+ ]
+ )
+ result = json.loads(result_json)
+
+ assert "gather.outfile" in result
+ assert isinstance(result["gather.outfile"], str)
+ assert open(result["gather.outfile"]).read() == "1\n2\n3\n"
+
@needs_docker
def test_wait(self, tmp_path: Path) -> None:
"""
=====================================
src/toil/wdl/wdltoil.py
=====================================
@@ -5048,6 +5048,9 @@ class WDLSectionJob(WDLBaseJob):
if subscript is not None:
# We need to include a scatter loop number.
task_path += f".{subscript}"
+ # TODO: MyPy can't tell this dict copy will have the same type
+ child_wdl_options = cast(WDLContext, dict(self._wdl_options))
+ child_wdl_options["task_path"] = task_path
if local_environment is not None:
# Bring local environment into scope
@@ -5115,7 +5118,7 @@ class WDLSectionJob(WDLBaseJob):
job: WDLBaseJob = WDLWorkflowNodeJob(
section_graph.get(node_ids[0]),
rvs,
- wdl_options=self._wdl_options,
+ wdl_options=child_wdl_options,
local=True,
)
else:
@@ -5123,7 +5126,7 @@ class WDLSectionJob(WDLBaseJob):
job = WDLWorkflowNodeListJob(
[section_graph.get(node_id) for node_id in node_ids],
rvs,
- wdl_options=self._wdl_options,
+ wdl_options=child_wdl_options,
local=True,
)
for prev_job in prev_jobs:
@@ -5158,7 +5161,7 @@ class WDLSectionJob(WDLBaseJob):
# And to fill in bindings from code not executed in this instantiation
# with Null, and filter out stuff that should leave scope.
sink = WDLCombineBindingsJob(
- leaf_rvs, wdl_options=self._wdl_options, local=True
+ leaf_rvs, wdl_options=child_wdl_options, local=True
)
# It runs inside us
self.addChild(sink)
=====================================
version_template.py
=====================================
@@ -28,7 +28,7 @@ import the expand_ function and invoke it directly with either no or exactly one
# - don't import even standard modules at global scope without renaming them
# to have leading/trailing underscores
-baseVersion = "9.1.0"
+baseVersion = "9.1.2"
cgcloudVersion = "1.6.0a1.dev393"
View it on GitLab: https://salsa.debian.org/med-team/toil/-/commit/b02ef8912f816d019c2955a4c4a5ea962624d3c6
--
View it on GitLab: https://salsa.debian.org/med-team/toil/-/commit/b02ef8912f816d019c2955a4c4a5ea962624d3c6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260107/b5c99c8a/attachment-0001.htm>
More information about the debian-med-commit
mailing list