From f4e1c5c2320a157d2a167b12b91fcaba3f8a29ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M=C2=AA=20Fern=C3=A1ndez?= Date: Wed, 7 Aug 2024 22:27:49 +0200 Subject: [PATCH 1/3] Fixed corner case where a string path from a CWL workflow was used instead of a pathlib.Path instance --- wfexs_backend/utils/contents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wfexs_backend/utils/contents.py b/wfexs_backend/utils/contents.py index 7b5a960..9ec3763 100644 --- a/wfexs_backend/utils/contents.py +++ b/wfexs_backend/utils/contents.py @@ -282,7 +282,7 @@ def CWLDesc2Content( ) elif foundKind == ContentKind.File: matValue = GeneratedContent( - local=cwlDesc["path"], + local=pathlib.Path(cwlDesc["path"]), signature=cast( "Fingerprint", ComputeDigestFromFile(cwlDesc["path"], repMethod=repMethod), From 09054706b3969e3ebec4f30b16c1235ea657468e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M=C2=AA=20Fern=C3=A1ndez?= Date: Wed, 7 Aug 2024 23:07:03 +0200 Subject: [PATCH 2/3] Fixed corner case where a running CWL job was not registering its PID as job_id --- wfexs_backend/workflow.py | 5 +++-- wfexs_backend/workflow_engines/cwl_engine.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wfexs_backend/workflow.py b/wfexs_backend/workflow.py index e7a525d..a2c3b2f 100644 --- a/wfexs_backend/workflow.py +++ b/wfexs_backend/workflow.py @@ -4876,11 +4876,12 @@ def _unmarshallExecuteFH( if job_status in (ExecutionStatus.Queued, ExecutionStatus.Running): try: job_id = int(execution.get("job_id", "")) - queued = datetime.datetime.fromtimestamp( + queued_proc = datetime.datetime.fromtimestamp( psutil.Process(job_id).create_time() ).astimezone() - if queued != execution.get("queued", datetime.datetime.min): + queued = execution.get("queued", datetime.datetime.min) + if queued_proc != queued: job_status = ExecutionStatus.Died except (psutil.NoSuchProcess, ValueError, TypeError): job_status = ExecutionStatus.Died diff --git a/wfexs_backend/workflow_engines/cwl_engine.py b/wfexs_backend/workflow_engines/cwl_engine.py index f7cae92..75f48da 100644 --- a/wfexs_backend/workflow_engines/cwl_engine.py +++ b/wfexs_backend/workflow_engines/cwl_engine.py @@ -1385,6 +1385,7 @@ def launchWorkflow( started = datetime.datetime.now().astimezone() yield StagedExecution( status=ExecutionStatus.Running, + job_id=str(os.getpid()), exitVal=cast("ExitVal", -1), augmentedInputs=augmentedInputs, # TODO: store the augmentedEnvironment instead From 43a60cbc4841a16fb1b781145a7974def7c5da33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M=C2=AA=20Fern=C3=A1ndez?= Date: Wed, 7 Aug 2024 23:09:23 +0200 Subject: [PATCH 3/3] Version bump to 1.0.0b1 --- CITATION.cff | 2 +- wfexs_backend/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 811677b..9f4bb00 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -27,5 +27,5 @@ message: "If you use this software, please cite it using these metadata." repository-code: "https://github.com/inab/WfExS-backend" type: software title: "WfExS-backend" -version: 1.0.0b0 +version: 1.0.0b1 date-released: "2024-08-07" diff --git a/wfexs_backend/__init__.py b/wfexs_backend/__init__.py index f15da79..e26a8b3 100644 --- a/wfexs_backend/__init__.py +++ b/wfexs_backend/__init__.py @@ -21,7 +21,7 @@ __license__ = "Apache 2.0" # https://www.python.org/dev/peps/pep-0396/ -__version__ = "1.0.0b0" +__version__ = "1.0.0b1" __url__ = "https://github.com/inab/WfExS-backend" __official_name__ = "WfExS-backend"