fractal-server 2.7.0a10__py3-none-any.whl → 2.7.0a11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- __VERSION__ = "2.7.0a10"
1
+ __VERSION__ = "2.7.0a11"
@@ -241,7 +241,10 @@ async def _get_task_by_taskimport(
241
241
  "Found many task groups, after filtering by version."
242
242
  )
243
243
  final_task_group = await _disambiguate_task_groups(
244
- matching_task_groups, user_id, db, default_group_id
244
+ matching_task_groups=matching_task_groups,
245
+ user_id=user_id,
246
+ db=db,
247
+ default_group_id=default_group_id,
245
248
  )
246
249
  if final_task_group is None:
247
250
  logger.info(
@@ -1055,55 +1055,59 @@ class FractalSlurmSSHExecutor(SlurmExecutor):
1055
1055
  Arguments:
1056
1056
  jobid: ID of the SLURM job
1057
1057
  """
1058
-
1059
- # Loop over all job_ids, and fetch future and job objects
1060
- futures: list[Future] = []
1061
- jobs: list[SlurmJob] = []
1062
- with self.jobs_lock:
1063
- for job_id in job_ids:
1064
- future, job = self.jobs.pop(job_id)
1065
- futures.append(future)
1066
- jobs.append(job)
1067
- if not self.jobs:
1068
- self.jobs_empty_cond.notify_all()
1069
-
1070
- # Fetch subfolder from remote host
1058
+ # Handle all uncaught exceptions in this broad try/except block
1071
1059
  try:
1072
- self._get_subfolder_sftp(jobs=jobs)
1073
- except NoValidConnectionsError as e:
1074
- logger.error("NoValidConnectionError")
1075
- logger.error(f"{str(e)=}")
1076
- logger.error(f"{e.errors=}")
1077
- for err in e.errors:
1078
- logger.error(f"{str(err)}")
1079
-
1080
- raise e
1081
-
1082
- # First round of checking whether all output files exist
1083
- missing_out_paths = []
1084
- for job in jobs:
1085
- for ind_out_path, out_path in enumerate(
1086
- job.output_pickle_files_local
1087
- ):
1088
- if not out_path.exists():
1089
- missing_out_paths.append(out_path)
1090
- num_missing = len(missing_out_paths)
1091
- if num_missing > 0:
1092
- # Output pickle files may be missing e.g. because of some slow
1093
- # filesystem operation; wait some time before re-trying
1094
- settings = Inject(get_settings)
1095
- sleep_time = settings.FRACTAL_SLURM_ERROR_HANDLING_INTERVAL
1096
1060
  logger.info(
1097
- f"{num_missing} output pickle files are missing; "
1098
- f"sleep {sleep_time} seconds."
1061
+ f"[FractalSlurmSSHExecutor._completion] START, for {job_ids=}."
1099
1062
  )
1100
- for missing_file in missing_out_paths:
1101
- logger.debug(f"Missing output pickle file: {missing_file}")
1102
- time.sleep(sleep_time)
1103
1063
 
1104
- # Handle all jobs
1105
- for ind_job, job_id in enumerate(job_ids):
1064
+ # Loop over all job_ids, and fetch future and job objects
1065
+ futures: list[Future] = []
1066
+ jobs: list[SlurmJob] = []
1067
+ with self.jobs_lock:
1068
+ for job_id in job_ids:
1069
+ future, job = self.jobs.pop(job_id)
1070
+ futures.append(future)
1071
+ jobs.append(job)
1072
+ if not self.jobs:
1073
+ self.jobs_empty_cond.notify_all()
1074
+
1075
+ # Fetch subfolder from remote host
1106
1076
  try:
1077
+ self._get_subfolder_sftp(jobs=jobs)
1078
+ except NoValidConnectionsError as e:
1079
+ logger.error("NoValidConnectionError")
1080
+ logger.error(f"{str(e)=}")
1081
+ logger.error(f"{e.errors=}")
1082
+ for err in e.errors:
1083
+ logger.error(f"{str(err)}")
1084
+
1085
+ raise e
1086
+
1087
+ # First round of checking whether all output files exist
1088
+ missing_out_paths = []
1089
+ for job in jobs:
1090
+ for ind_out_path, out_path in enumerate(
1091
+ job.output_pickle_files_local
1092
+ ):
1093
+ if not out_path.exists():
1094
+ missing_out_paths.append(out_path)
1095
+ num_missing = len(missing_out_paths)
1096
+ if num_missing > 0:
1097
+ # Output pickle files may be missing e.g. because of some slow
1098
+ # filesystem operation; wait some time before re-trying
1099
+ settings = Inject(get_settings)
1100
+ sleep_time = settings.FRACTAL_SLURM_ERROR_HANDLING_INTERVAL
1101
+ logger.info(
1102
+ f"{num_missing} output pickle files are missing; "
1103
+ f"sleep {sleep_time} seconds."
1104
+ )
1105
+ for missing_file in missing_out_paths:
1106
+ logger.debug(f"Missing output pickle file: {missing_file}")
1107
+ time.sleep(sleep_time)
1108
+
1109
+ # Handle all jobs
1110
+ for ind_job, job_id in enumerate(job_ids):
1107
1111
  # Retrieve job and future objects
1108
1112
  job = jobs[ind_job]
1109
1113
  future = futures[ind_job]
@@ -1128,6 +1132,11 @@ class FractalSlurmSSHExecutor(SlurmExecutor):
1128
1132
  remaining_futures=remaining_futures,
1129
1133
  remaining_job_ids=remaining_job_ids,
1130
1134
  )
1135
+ logger.info(
1136
+ "[FractalSlurmSSHExecutor._completion] END, "
1137
+ f"for {job_ids=}, with JobExecutionError due "
1138
+ f"to missing {out_path.as_posix()}."
1139
+ )
1131
1140
  return
1132
1141
  except InvalidStateError:
1133
1142
  logger.warning(
@@ -1141,6 +1150,12 @@ class FractalSlurmSSHExecutor(SlurmExecutor):
1141
1150
  remaining_futures=remaining_futures,
1142
1151
  remaining_job_ids=remaining_job_ids,
1143
1152
  )
1153
+ logger.info(
1154
+ "[FractalSlurmSSHExecutor._completion] END, "
1155
+ f"for {job_ids=}, with JobExecutionError/"
1156
+ "InvalidStateError due to "
1157
+ f"missing {out_path.as_posix()}."
1158
+ )
1144
1159
  return
1145
1160
 
1146
1161
  # Read the task output
@@ -1217,16 +1232,22 @@ class FractalSlurmSSHExecutor(SlurmExecutor):
1217
1232
  else:
1218
1233
  future.set_result(outputs)
1219
1234
 
1220
- except Exception as e:
1235
+ except Exception as e:
1236
+ logger.warning(
1237
+ "[FractalSlurmSSHExecutor._completion] "
1238
+ f"An exception took place: {str(e)}."
1239
+ )
1240
+ for future in futures:
1221
1241
  try:
1242
+ logger.info(f"Set exception for {future=}")
1222
1243
  future.set_exception(e)
1223
- return
1224
1244
  except InvalidStateError:
1225
- logger.warning(
1226
- f"Future {future} (SLURM job ID: {job_id}) was already"
1227
- " cancelled, exit from"
1228
- " FractalSlurmSSHExecutor._completion."
1229
- )
1245
+ logger.info(f"Future {future} was already cancelled.")
1246
+ logger.info(
1247
+ f"[FractalSlurmSSHExecutor._completion] END, for {job_ids=}, "
1248
+ "from within exception handling."
1249
+ )
1250
+ return
1230
1251
 
1231
1252
  def _get_subfolder_sftp(self, jobs: list[SlurmJob]) -> None:
1232
1253
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fractal-server
3
- Version: 2.7.0a10
3
+ Version: 2.7.0a11
4
4
  Summary: Server component of the Fractal analytics platform
5
5
  Home-page: https://github.com/fractal-analytics-platform/fractal-server
6
6
  License: BSD-3-Clause
@@ -1,4 +1,4 @@
1
- fractal_server/__init__.py,sha256=UeQbqAPJgZpXFlyJ7lX8wCpu8MkVzO3P6a4ALxAP1aE,25
1
+ fractal_server/__init__.py,sha256=U6Vt70hce3I5-D3BcN_SgVx3kKrnUis8AS0m58E-7IY,25
2
2
  fractal_server/__main__.py,sha256=dEkCfzLLQrIlxsGC-HBfoR-RBMWnJDgNrxYTyzmE9c0,6146
3
3
  fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
4
4
  fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -55,7 +55,7 @@ fractal_server/app/routes/api/v2/task_collection.py,sha256=gCxOwigT_tfs8lCDNoE7n
55
55
  fractal_server/app/routes/api/v2/task_collection_custom.py,sha256=9T0U_4gqrQbJCy6uFDCMSZ-b1sfNIzyz_qm4P41W2Gs,6133
56
56
  fractal_server/app/routes/api/v2/task_group.py,sha256=P32EUYbtGThexSWe5zI9WUFrgoOMof035fJBILTNnfQ,5580
57
57
  fractal_server/app/routes/api/v2/workflow.py,sha256=PyvkrUHHzFGUGZE5X0VW5u3DPQA7wtXXNcEpG7-N66I,8687
58
- fractal_server/app/routes/api/v2/workflow_import.py,sha256=3qX3iHnLJb62TQFLQKakcC_mYh-tWXkYL-4PuyEkwRs,10895
58
+ fractal_server/app/routes/api/v2/workflow_import.py,sha256=rD26vZ-ztjehvglrERixTeHtXuzepAtgAuPiKRNz84Q,10981
59
59
  fractal_server/app/routes/api/v2/workflowtask.py,sha256=ciHTwXXFiFnMF7ZpJ3Xs0q6YfuZrFvIjqndlzAEdZpo,6969
60
60
  fractal_server/app/routes/auth/__init__.py,sha256=fao6CS0WiAjHDTvBzgBVV_bSXFpEAeDBF6Z6q7rRkPc,1658
61
61
  fractal_server/app/routes/auth/_aux_auth.py,sha256=ifkNocTYatBSMYGwiR14qohmvR9SfMldceiEj6uJBrU,4783
@@ -84,7 +84,7 @@ fractal_server/app/runner/executors/slurm/remote.py,sha256=wLziIsGdSMiO-jIXM8x77
84
84
  fractal_server/app/runner/executors/slurm/ssh/__init__.py,sha256=Cjn1rYvljddi96tAwS-qqGkNfOcfPzjChdaEZEObCcM,65
85
85
  fractal_server/app/runner/executors/slurm/ssh/_executor_wait_thread.py,sha256=bKo5Ja0IGxJWpPWyh9dN0AG-PwzTDZzD5LyaEHB3YU4,3742
86
86
  fractal_server/app/runner/executors/slurm/ssh/_slurm_job.py,sha256=rwlqZzoGo4SAb4nSlFjsQJdaCgfM1J6YGcjb8yYxlqc,4506
87
- fractal_server/app/runner/executors/slurm/ssh/executor.py,sha256=9nR5aaJdsz3uHu9CQkOXb7IYibA74R0kKkf17Xq6JDo,57470
87
+ fractal_server/app/runner/executors/slurm/ssh/executor.py,sha256=si_RHAMnXwQorQ_gWeZ_hQ_cNQbbAuYPjg7nwFQoPVg,58709
88
88
  fractal_server/app/runner/executors/slurm/sudo/__init__.py,sha256=Cjn1rYvljddi96tAwS-qqGkNfOcfPzjChdaEZEObCcM,65
89
89
  fractal_server/app/runner/executors/slurm/sudo/_check_jobs_status.py,sha256=wAgwpVcr6JIslKHOuS0FhRa_6T1KCManyRJqA-fifzw,1909
90
90
  fractal_server/app/runner/executors/slurm/sudo/_executor_wait_thread.py,sha256=z5LlhaiqAb8pHsF1WwdzXN39C5anQmwjo1rSQgtRAYE,4422
@@ -223,8 +223,8 @@ fractal_server/tasks/v2/utils.py,sha256=MnY6MhcxDRo4rPuXo2tQ252eWEPZF3OlCGe-p5Mr
223
223
  fractal_server/urls.py,sha256=5o_qq7PzKKbwq12NHSQZDmDitn5RAOeQ4xufu-2v9Zk,448
224
224
  fractal_server/utils.py,sha256=jrlCBPmC7F0ptBVcDac-EbZNsdYTLbHfX9oxkXthS5Q,2193
225
225
  fractal_server/zip_tools.py,sha256=xYpzBshysD2nmxkD5WLYqMzPYUcCRM3kYy-7n9bJL-U,4426
226
- fractal_server-2.7.0a10.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
227
- fractal_server-2.7.0a10.dist-info/METADATA,sha256=rD95AUBtyVqOfXOvyO_HG4mXGow5mhKpX3znot1LGBk,4631
228
- fractal_server-2.7.0a10.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
229
- fractal_server-2.7.0a10.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
230
- fractal_server-2.7.0a10.dist-info/RECORD,,
226
+ fractal_server-2.7.0a11.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
227
+ fractal_server-2.7.0a11.dist-info/METADATA,sha256=7vwgLiEeN-_a0vB2gnMmsPX_WMaa9BH3azyswEIT128,4631
228
+ fractal_server-2.7.0a11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
229
+ fractal_server-2.7.0a11.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
230
+ fractal_server-2.7.0a11.dist-info/RECORD,,