From 20f9ebc6d1e7cdc6d5c3cce11be2b6fc822067b5 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 10 Apr 2025 07:11:44 -0600 Subject: [PATCH 1/3] propagate error from resource_allocation_info --- qiita_db/processing_job.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qiita_db/processing_job.py b/qiita_db/processing_job.py index c773ff927..636a0cea0 100644 --- a/qiita_db/processing_job.py +++ b/qiita_db/processing_job.py @@ -1050,6 +1050,14 @@ def submit(self, parent_job_id=None, dependent_jobs_list=None): # be used to monitor the job's progress. resource_params = self.resource_allocation_info + try: + resource_params = self.resource_allocation_info + except qdb.exceptions.QiitaDBUnknownIDError as e: + # this propagates the error to the job and using str(e) + # should be fine as we just want the last calculation + # error + self._set_error(str(e)) + # note that parent_job_id is being passed transparently from # submit declaration to the launcher. From dfb030a4c5768effb9bcafd247b4e28a1d4dde57 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 10 Apr 2025 07:34:15 -0600 Subject: [PATCH 2/3] flake8 --- qiita_db/processing_job.py | 1 - 1 file changed, 1 deletion(-) diff --git a/qiita_db/processing_job.py b/qiita_db/processing_job.py index 636a0cea0..74ea87025 100644 --- a/qiita_db/processing_job.py +++ b/qiita_db/processing_job.py @@ -1058,7 +1058,6 @@ def submit(self, parent_job_id=None, dependent_jobs_list=None): # error self._set_error(str(e)) - # note that parent_job_id is being passed transparently from # submit declaration to the launcher. # TODO: In proc launches should throw exceptions, that are From 734d41415f1d5122b413c148572f935c0fe316a2 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 10 Apr 2025 12:23:50 -0600 Subject: [PATCH 3/3] rm extra line --- qiita_db/processing_job.py | 1 - 1 file changed, 1 deletion(-) diff --git a/qiita_db/processing_job.py b/qiita_db/processing_job.py index 74ea87025..0d11853dd 100644 --- a/qiita_db/processing_job.py +++ b/qiita_db/processing_job.py @@ -1049,7 +1049,6 @@ def submit(self, parent_job_id=None, dependent_jobs_list=None): # before returning immediately, usually with a job ID that can # be used to monitor the job's progress. - resource_params = self.resource_allocation_info try: resource_params = self.resource_allocation_info except qdb.exceptions.QiitaDBUnknownIDError as e: