fractal-server 2.14.0a15__tar.gz → 2.14.0a17__tar.gz

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.
Files changed (215) hide show
  1. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/PKG-INFO +1 -1
  2. fractal_server-2.14.0a17/fractal_server/__init__.py +1 -0
  3. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/local/runner.py +31 -5
  4. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_common/base_slurm_runner.py +116 -31
  5. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_sudo/runner.py +2 -2
  6. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/v2/db_tools.py +15 -1
  7. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/v2/runner_functions.py +3 -4
  8. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/pyproject.toml +2 -2
  9. fractal_server-2.14.0a15/fractal_server/__init__.py +0 -1
  10. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/LICENSE +0 -0
  11. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/README.md +0 -0
  12. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/__main__.py +0 -0
  13. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/alembic.ini +0 -0
  14. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/__init__.py +0 -0
  15. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/db/__init__.py +0 -0
  16. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/history/__init__.py +0 -0
  17. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/__init__.py +0 -0
  18. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/linkusergroup.py +0 -0
  19. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/linkuserproject.py +0 -0
  20. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/security.py +0 -0
  21. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/user_settings.py +0 -0
  22. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/v2/__init__.py +0 -0
  23. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/v2/accounting.py +0 -0
  24. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/v2/dataset.py +0 -0
  25. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/v2/history.py +0 -0
  26. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/v2/job.py +0 -0
  27. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/v2/project.py +0 -0
  28. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/v2/task.py +0 -0
  29. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/v2/task_group.py +0 -0
  30. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/v2/workflow.py +0 -0
  31. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/models/v2/workflowtask.py +0 -0
  32. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/__init__.py +0 -0
  33. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/admin/__init__.py +0 -0
  34. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/admin/v2/__init__.py +0 -0
  35. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/admin/v2/accounting.py +0 -0
  36. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/admin/v2/impersonate.py +0 -0
  37. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/admin/v2/job.py +0 -0
  38. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/admin/v2/project.py +0 -0
  39. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/admin/v2/task.py +0 -0
  40. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/admin/v2/task_group.py +0 -0
  41. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/admin/v2/task_group_lifecycle.py +0 -0
  42. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/__init__.py +0 -0
  43. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/__init__.py +0 -0
  44. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/_aux_functions.py +0 -0
  45. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/_aux_functions_history.py +0 -0
  46. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/_aux_functions_task_lifecycle.py +0 -0
  47. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/_aux_functions_tasks.py +0 -0
  48. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/dataset.py +0 -0
  49. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/history.py +0 -0
  50. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/images.py +0 -0
  51. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/job.py +0 -0
  52. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/project.py +0 -0
  53. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/status_legacy.py +0 -0
  54. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/submit.py +0 -0
  55. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/task.py +0 -0
  56. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/task_collection.py +0 -0
  57. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/task_collection_custom.py +0 -0
  58. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/task_group.py +0 -0
  59. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/task_group_lifecycle.py +0 -0
  60. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/verify_image_types.py +0 -0
  61. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/workflow.py +0 -0
  62. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/workflow_import.py +0 -0
  63. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/api/v2/workflowtask.py +0 -0
  64. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/auth/__init__.py +0 -0
  65. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/auth/_aux_auth.py +0 -0
  66. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/auth/current_user.py +0 -0
  67. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/auth/group.py +0 -0
  68. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/auth/login.py +0 -0
  69. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/auth/oauth.py +0 -0
  70. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/auth/register.py +0 -0
  71. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/auth/router.py +0 -0
  72. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/auth/users.py +0 -0
  73. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/aux/__init__.py +0 -0
  74. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/aux/_job.py +0 -0
  75. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/aux/_runner.py +0 -0
  76. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/aux/validate_user_settings.py +0 -0
  77. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/routes/pagination.py +0 -0
  78. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/__init__.py +0 -0
  79. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/components.py +0 -0
  80. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/compress_folder.py +0 -0
  81. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/exceptions.py +0 -0
  82. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/__init__.py +0 -0
  83. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/base_runner.py +0 -0
  84. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/local/__init__.py +0 -0
  85. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/local/get_local_config.py +0 -0
  86. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_common/__init__.py +0 -0
  87. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_common/_batching.py +0 -0
  88. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_common/_handle_exception_proxy.py +0 -0
  89. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_common/_job_states.py +0 -0
  90. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_common/_slurm_config.py +0 -0
  91. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_common/get_slurm_config.py +0 -0
  92. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_common/remote.py +0 -0
  93. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_common/slurm_job_task_models.py +0 -0
  94. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_common/utils_executors.py +0 -0
  95. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_ssh/__init__.py +0 -0
  96. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_ssh/runner.py +0 -0
  97. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_sudo/__init__.py +0 -0
  98. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/executors/slurm_sudo/_subprocess_run_as_user.py +0 -0
  99. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/extract_archive.py +0 -0
  100. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/filenames.py +0 -0
  101. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/run_subprocess.py +0 -0
  102. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/set_start_and_last_task_index.py +0 -0
  103. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/shutdown.py +0 -0
  104. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/task_files.py +0 -0
  105. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/v2/__init__.py +0 -0
  106. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/v2/_local.py +0 -0
  107. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/v2/_slurm_ssh.py +0 -0
  108. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/v2/_slurm_sudo.py +0 -0
  109. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/v2/deduplicate_list.py +0 -0
  110. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/v2/merge_outputs.py +0 -0
  111. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/v2/runner.py +0 -0
  112. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/v2/runner_functions_low_level.py +0 -0
  113. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/v2/submit_workflow.py +0 -0
  114. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/v2/task_interface.py +0 -0
  115. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/runner/versions.py +0 -0
  116. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/__init__.py +0 -0
  117. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/_filter_validators.py +0 -0
  118. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/_validators.py +0 -0
  119. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/user.py +0 -0
  120. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/user_group.py +0 -0
  121. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/user_settings.py +0 -0
  122. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/__init__.py +0 -0
  123. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/accounting.py +0 -0
  124. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/dataset.py +0 -0
  125. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/dumps.py +0 -0
  126. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/history.py +0 -0
  127. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/job.py +0 -0
  128. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/manifest.py +0 -0
  129. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/project.py +0 -0
  130. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/status_legacy.py +0 -0
  131. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/task.py +0 -0
  132. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/task_collection.py +0 -0
  133. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/task_group.py +0 -0
  134. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/workflow.py +0 -0
  135. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/schemas/v2/workflowtask.py +0 -0
  136. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/security/__init__.py +0 -0
  137. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/security/signup_email.py +0 -0
  138. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/app/user_settings.py +0 -0
  139. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/config.py +0 -0
  140. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/data_migrations/README.md +0 -0
  141. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/data_migrations/tools.py +0 -0
  142. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/gunicorn_fractal.py +0 -0
  143. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/images/__init__.py +0 -0
  144. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/images/models.py +0 -0
  145. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/images/tools.py +0 -0
  146. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/logger.py +0 -0
  147. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/main.py +0 -0
  148. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/env.py +0 -0
  149. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/naming_convention.py +0 -0
  150. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/034a469ec2eb_task_groups.py +0 -0
  151. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/091b01f51f88_add_usergroup_and_linkusergroup_table.py +0 -0
  152. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/19eca0dd47a9_user_settings_project_dir.py +0 -0
  153. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/1eac13a26c83_drop_v1_tables.py +0 -0
  154. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/316140ff7ee1_remove_usersettings_cache_dir.py +0 -0
  155. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/47351f8c7ebc_drop_dataset_filters.py +0 -0
  156. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/4c308bcaea2b_add_task_args_schema_and_task_args_.py +0 -0
  157. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/4cedeb448a53_workflowtask_foreign_keys_not_nullables.py +0 -0
  158. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/501961cfcd85_remove_link_between_v1_and_v2_tasks_.py +0 -0
  159. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/50a13d6138fd_initial_schema.py +0 -0
  160. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/5b6007027595_on_cascade.py +0 -0
  161. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/5bf02391cfef_v2.py +0 -0
  162. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/70e77f1c38b0_add_applyworkflow_first_task_index_and_.py +0 -0
  163. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/71eefd1dd202_add_slurm_accounts.py +0 -0
  164. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/84bf0fffde30_add_dumps_to_applyworkflow.py +0 -0
  165. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/8e8f227a3e36_update_taskv2_post_2_7_0.py +0 -0
  166. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/8f79bd162e35_add_docs_info_and_docs_link_to_task_.py +0 -0
  167. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/94a47ea2d3ff_remove_cache_dir_slurm_user_and_slurm_.py +0 -0
  168. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/97f444d47249_add_applyworkflow_project_dump.py +0 -0
  169. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/99ea79d9e5d2_add_dataset_history.py +0 -0
  170. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/9c5ae74c9b98_add_user_settings_table.py +0 -0
  171. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/9fd26a2b0de4_add_workflow_timestamp_created.py +0 -0
  172. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/a7f4d6137b53_add_workflow_dump_to_applyworkflow.py +0 -0
  173. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/af1ef1c83c9b_add_accounting_tables.py +0 -0
  174. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/af8673379a5c_drop_old_filter_columns.py +0 -0
  175. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/d256a7379ab8_taskgroup_activity_and_venv_info_to_.py +0 -0
  176. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/d4fe3708d309_make_applyworkflow_workflow_dump_non_.py +0 -0
  177. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/da2cb2ac4255_user_group_viewer_paths.py +0 -0
  178. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/db09233ad13a_split_filters_and_keep_old_columns.py +0 -0
  179. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/e75cac726012_make_applyworkflow_start_timestamp_not_.py +0 -0
  180. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/e81103413827_add_job_type_filters.py +0 -0
  181. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/efa89c30e0a4_add_project_timestamp_created.py +0 -0
  182. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/f384e1c0cf5d_drop_task_default_args_columns.py +0 -0
  183. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/migrations/versions/fbce16ff4e47_new_history_items.py +0 -0
  184. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/py.typed +0 -0
  185. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/ssh/__init__.py +0 -0
  186. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/ssh/_fabric.py +0 -0
  187. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/string_tools.py +0 -0
  188. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/syringe.py +0 -0
  189. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/__init__.py +0 -0
  190. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/utils.py +0 -0
  191. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/__init__.py +0 -0
  192. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/local/__init__.py +0 -0
  193. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/local/_utils.py +0 -0
  194. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/local/collect.py +0 -0
  195. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/local/deactivate.py +0 -0
  196. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/local/reactivate.py +0 -0
  197. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/ssh/__init__.py +0 -0
  198. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/ssh/_utils.py +0 -0
  199. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/ssh/collect.py +0 -0
  200. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/ssh/deactivate.py +0 -0
  201. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/ssh/reactivate.py +0 -0
  202. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/templates/1_create_venv.sh +0 -0
  203. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/templates/2_pip_install.sh +0 -0
  204. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/templates/3_pip_freeze.sh +0 -0
  205. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/templates/4_pip_show.sh +0 -0
  206. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/templates/5_get_venv_size_and_file_number.sh +0 -0
  207. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/templates/6_pip_install_from_freeze.sh +0 -0
  208. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/utils_background.py +0 -0
  209. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/utils_database.py +0 -0
  210. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/utils_package_names.py +0 -0
  211. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/utils_python_interpreter.py +0 -0
  212. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/tasks/v2/utils_templates.py +0 -0
  213. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/urls.py +0 -0
  214. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/utils.py +0 -0
  215. {fractal_server-2.14.0a15 → fractal_server-2.14.0a17}/fractal_server/zip_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: fractal-server
3
- Version: 2.14.0a15
3
+ Version: 2.14.0a17
4
4
  Summary: Backend component of the Fractal analytics platform
5
5
  License: BSD-3-Clause
6
6
  Author: Tommaso Comparin
@@ -0,0 +1 @@
1
+ __VERSION__ = "2.14.0a17"
@@ -11,6 +11,9 @@ from fractal_server.app.runner.executors.base_runner import BaseRunner
11
11
  from fractal_server.app.runner.task_files import MULTISUBMIT_PREFIX
12
12
  from fractal_server.app.runner.task_files import SUBMIT_PREFIX
13
13
  from fractal_server.app.runner.task_files import TaskFiles
14
+ from fractal_server.app.runner.v2.db_tools import (
15
+ update_logfile_of_history_unit,
16
+ )
14
17
  from fractal_server.app.runner.v2.db_tools import update_status_of_history_unit
15
18
  from fractal_server.app.schemas.v2 import HistoryUnitStatus
16
19
  from fractal_server.logger import set_logger
@@ -69,7 +72,12 @@ class LocalRunner(BaseRunner):
69
72
  workdir_local = task_files.wftask_subfolder_local
70
73
  workdir_local.mkdir()
71
74
 
75
+ # Add prefix to task_files object
72
76
  task_files.prefix = SUBMIT_PREFIX
77
+ update_logfile_of_history_unit(
78
+ history_unit_id=history_unit_id,
79
+ logfile=task_files.log_file_local,
80
+ )
73
81
 
74
82
  # SUBMISSION PHASE
75
83
  future = self.executor.submit(
@@ -155,17 +163,35 @@ class LocalRunner(BaseRunner):
155
163
  active_futures: dict[int, Future] = {}
156
164
  for ind_within_chunk, kwargs in enumerate(list_parameters_chunk):
157
165
  positional_index = ind_chunk + ind_within_chunk
158
- current_task_files = list_task_files[positional_index]
159
- current_task_files.prefix = (
160
- f"{MULTISUBMIT_PREFIX}-{positional_index:06d}"
161
- )
166
+ list_task_files[
167
+ positional_index
168
+ ].prefix = f"{MULTISUBMIT_PREFIX}-{positional_index:06d}"
162
169
  future = self.executor.submit(
163
170
  func,
164
171
  parameters=kwargs,
165
- remote_files=current_task_files.remote_files_dict,
172
+ remote_files=list_task_files[
173
+ positional_index
174
+ ].remote_files_dict,
166
175
  )
167
176
  active_futures[positional_index] = future
168
177
 
178
+ if task_type == "parallel":
179
+ # FIXME: replace loop with a `bulk_update_history_unit`
180
+ # function
181
+ update_logfile_of_history_unit(
182
+ history_unit_id=history_unit_ids[positional_index],
183
+ logfile=list_task_files[
184
+ positional_index
185
+ ].log_file_local,
186
+ )
187
+ else:
188
+ logger.debug(
189
+ f"Unclear what logfile to associate to {task_type=} "
190
+ "within multisubmit (see issue #2382)."
191
+ )
192
+ # FIXME: Improve definition for compound tasks
193
+ pass
194
+
169
195
  while active_futures:
170
196
  # FIXME: add shutdown detection
171
197
  # if file exists: cancel all futures, and raise
@@ -23,12 +23,18 @@ from fractal_server.app.runner.filenames import SHUTDOWN_FILENAME
23
23
  from fractal_server.app.runner.task_files import MULTISUBMIT_PREFIX
24
24
  from fractal_server.app.runner.task_files import SUBMIT_PREFIX
25
25
  from fractal_server.app.runner.task_files import TaskFiles
26
+ from fractal_server.app.runner.v2.db_tools import (
27
+ update_logfile_of_history_unit,
28
+ )
26
29
  from fractal_server.app.runner.v2.db_tools import update_status_of_history_unit
27
30
  from fractal_server.app.schemas.v2 import HistoryUnitStatus
28
31
  from fractal_server.config import get_settings
29
32
  from fractal_server.logger import set_logger
30
33
  from fractal_server.syringe import Inject
31
34
 
35
+ SHUTDOWN_ERROR_MESSAGE = "Failed due to job-execution shutdown."
36
+ SHUTDOWN_EXCEPTION = JobExecutionError(SHUTDOWN_ERROR_MESSAGE)
37
+
32
38
  logger = set_logger(__name__)
33
39
 
34
40
  # FIXME: Transform several logger.info into logger.debug.
@@ -91,6 +97,7 @@ class BaseSlurmRunner(BaseRunner):
91
97
 
92
98
  def run_squeue(self, job_ids: list[str]) -> tuple[bool, str]:
93
99
  # FIXME: review different cases (exception vs no job found)
100
+ # FIXME: Fail for empty list
94
101
  job_id_single_str = ",".join([str(j) for j in job_ids])
95
102
  cmd = (
96
103
  f"squeue --noheader --format='%i %T' --jobs {job_id_single_str}"
@@ -225,9 +232,11 @@ class BaseSlurmRunner(BaseRunner):
225
232
  logger.info(script_lines)
226
233
 
227
234
  # Always print output of `uname -n` and `pwd`
228
- script_lines.append("Hostname: $(uname -n)\n")
229
- script_lines.append("Current directory : $(pwd)\n")
230
- script_lines.append('Start time: $(date + "%Y-%m-%dT%H:%M:%S%z")\n')
235
+ script_lines.append('\necho "Hostname: $(uname -n)"')
236
+ script_lines.append('echo "Current directory : $(pwd)"')
237
+ script_lines.append(
238
+ 'echo "Start time: $(date +"%Y-%m-%dT%H:%M:%S%z")"'
239
+ )
231
240
 
232
241
  # Complete script preamble
233
242
  script_lines.append("\n")
@@ -242,7 +251,9 @@ class BaseSlurmRunner(BaseRunner):
242
251
  )
243
252
  script_lines.append("wait\n")
244
253
  script = "\n".join(script_lines)
245
- script_lines.append('End time: $(date + "%Y-%m-%dT%H:%M:%S%z")\n')
254
+ script_lines.append(
255
+ 'echo "End time: $(date +"%Y-%m-%dT%H:%M:%S%z")"'
256
+ )
246
257
 
247
258
  # Write submission script
248
259
  with open(slurm_job.slurm_submission_script_local, "w") as f:
@@ -332,7 +343,10 @@ class BaseSlurmRunner(BaseRunner):
332
343
  pass
333
344
 
334
345
  def _postprocess_single_task(
335
- self, *, task: SlurmTask
346
+ self,
347
+ *,
348
+ task: SlurmTask,
349
+ was_job_scancelled: bool = False,
336
350
  ) -> tuple[Any, Exception]:
337
351
  try:
338
352
  with open(task.output_pickle_file_local, "rb") as f:
@@ -344,17 +358,24 @@ class BaseSlurmRunner(BaseRunner):
344
358
  else:
345
359
  exception = _handle_exception_proxy(output)
346
360
  return None, exception
361
+
347
362
  except Exception as e:
348
363
  exception = JobExecutionError(f"ERROR, {str(e)}")
364
+ # If job was scancelled and task failed, replace
365
+ # exception with a shutdown-related one.
366
+ if was_job_scancelled:
367
+ logger.debug(
368
+ "Replacing exception with a shutdown-related one, "
369
+ f"for {task.index=}."
370
+ )
371
+ exception = SHUTDOWN_EXCEPTION
372
+
349
373
  return None, exception
350
374
  finally:
351
- pass
352
- # FIXME: Re-include unlinks of pickle files
353
- # Path(task.input_pickle_file_local).unlink(missing_ok=True)
354
- # Path(task.output_pickle_file_local).unlink(missing_ok=True)
375
+ Path(task.input_pickle_file_local).unlink(missing_ok=True)
376
+ Path(task.output_pickle_file_local).unlink(missing_ok=True)
355
377
 
356
378
  def is_shutdown(self) -> bool:
357
- # FIXME: shutdown is not implemented
358
379
  return self.shutdown_file.exists()
359
380
 
360
381
  @property
@@ -385,7 +406,14 @@ class BaseSlurmRunner(BaseRunner):
385
406
  raise JobExecutionError("Unexpected branch: jobs should be empty.")
386
407
 
387
408
  if self.is_shutdown():
388
- raise JobExecutionError("Cannot continue after shutdown.")
409
+ with next(get_sync_db()) as db:
410
+ update_status_of_history_unit(
411
+ history_unit_id=history_unit_id,
412
+ status=HistoryUnitStatus.FAILED,
413
+ db_sync=db,
414
+ )
415
+
416
+ return None, SHUTDOWN_EXCEPTION
389
417
 
390
418
  # Validation phase
391
419
  self.validate_submit_parameters(
@@ -401,6 +429,10 @@ class BaseSlurmRunner(BaseRunner):
401
429
 
402
430
  # Add prefix to task_files object
403
431
  task_files.prefix = SUBMIT_PREFIX
432
+ update_logfile_of_history_unit(
433
+ history_unit_id=history_unit_id,
434
+ logfile=task_files.log_file_local,
435
+ )
404
436
 
405
437
  # Submission phase
406
438
  slurm_job = SlurmJob(
@@ -437,19 +469,29 @@ class BaseSlurmRunner(BaseRunner):
437
469
  # Retrieval phase
438
470
  logger.info("[submit] START retrieval phase")
439
471
  while len(self.jobs) > 0:
472
+
473
+ # Handle shutdown
474
+ scancelled_job_ids = []
440
475
  if self.is_shutdown():
441
- self.scancel_jobs()
476
+ logger.info("[submit] Shutdown file detected")
477
+ scancelled_job_ids = self.scancel_jobs()
478
+ logger.info(f"[submit] {scancelled_job_ids=}")
479
+
480
+ # Look for finished jobs
442
481
  finished_job_ids = self._get_finished_jobs(job_ids=self.job_ids)
443
- logger.info(f"{finished_job_ids=}")
482
+ logger.debug(f"[submit] {finished_job_ids=}")
483
+
444
484
  with next(get_sync_db()) as db:
445
485
  for slurm_job_id in finished_job_ids:
446
- logger.info(f"Now process {slurm_job_id=}")
486
+ logger.debug(f"[submit] Now process {slurm_job_id=}")
447
487
  slurm_job = self.jobs.pop(slurm_job_id)
448
-
449
488
  self._copy_files_from_remote_to_local(slurm_job)
489
+ was_job_scancelled = slurm_job_id in scancelled_job_ids
450
490
  result, exception = self._postprocess_single_task(
451
- task=slurm_job.tasks[0]
491
+ task=slurm_job.tasks[0],
492
+ was_job_scancelled=was_job_scancelled,
452
493
  )
494
+
453
495
  if exception is not None:
454
496
  update_status_of_history_unit(
455
497
  history_unit_id=history_unit_id,
@@ -477,13 +519,29 @@ class BaseSlurmRunner(BaseRunner):
477
519
  list_task_files: list[TaskFiles],
478
520
  task_type: Literal["parallel", "compound", "converter_compound"],
479
521
  config: SlurmConfig,
480
- ):
522
+ ) -> tuple[dict[int, Any], dict[int, BaseException]]:
481
523
 
482
524
  if len(self.jobs) > 0:
483
525
  raise RuntimeError(
484
- f"Cannot run .multisubmit when {len(self.jobs)=}"
526
+ f"Cannot run `multisubmit` when {len(self.jobs)=}"
485
527
  )
486
528
 
529
+ if self.is_shutdown():
530
+ if task_type == "parallel":
531
+ with next(get_sync_db()) as db:
532
+ # FIXME: Replace with bulk function
533
+ for history_unit_id in history_unit_ids:
534
+ update_status_of_history_unit(
535
+ history_unit_id=history_unit_id,
536
+ status=HistoryUnitStatus.FAILED,
537
+ db_sync=db,
538
+ )
539
+ results = {}
540
+ exceptions = {
541
+ ind: SHUTDOWN_EXCEPTION for ind in range(len(list_parameters))
542
+ }
543
+ return results, exceptions
544
+
487
545
  self.validate_multisubmit_parameters(
488
546
  list_parameters=list_parameters,
489
547
  task_type=task_type,
@@ -550,18 +608,17 @@ class BaseSlurmRunner(BaseRunner):
550
608
  tasks = []
551
609
  for ind_chunk, parameters in enumerate(chunk):
552
610
  index = (ind_batch * batch_size) + ind_chunk
553
- current_task_files = list_task_files[index]
554
- current_task_files.prefix = prefix
611
+ list_task_files[index].prefix = prefix
555
612
  tasks.append(
556
613
  SlurmTask(
557
614
  prefix=prefix,
558
615
  index=index,
559
- component=current_task_files.component,
616
+ component=list_task_files[index].component,
560
617
  workdir_local=workdir_local,
561
618
  workdir_remote=workdir_remote,
562
619
  parameters=parameters,
563
620
  zarr_url=parameters["zarr_url"],
564
- task_files=current_task_files,
621
+ task_files=list_task_files[index],
565
622
  ),
566
623
  )
567
624
 
@@ -576,6 +633,21 @@ class BaseSlurmRunner(BaseRunner):
576
633
  slurm_job=slurm_job,
577
634
  slurm_config=config,
578
635
  )
636
+ if task_type == "parallel":
637
+ # FIXME: replace loop with a `bulk_update_history_unit` function
638
+ for ind, task_files in enumerate(list_task_files):
639
+ update_logfile_of_history_unit(
640
+ history_unit_id=history_unit_ids[ind],
641
+ logfile=task_files.log_file_local,
642
+ )
643
+ else:
644
+ logger.debug(
645
+ f"Unclear what logfile to associate to {task_type=} "
646
+ "within multisubmit (see issue #2382)."
647
+ )
648
+ # FIXME: Improve definition for compound tasks
649
+ pass
650
+
579
651
  logger.info(f"END submission phase, {self.job_ids=}")
580
652
 
581
653
  # FIXME: replace this sleep a more precise check
@@ -584,22 +656,34 @@ class BaseSlurmRunner(BaseRunner):
584
656
  logger.warning(f"[submit] Now sleep {sleep_time} (FIXME)")
585
657
  time.sleep(sleep_time)
586
658
 
659
+ # FIXME: Could we merge the submit/multisubmit retrieval phases?
660
+
587
661
  # Retrieval phase
588
- logger.info("START retrieval phase")
662
+ logger.info("[multisubmit] START retrieval phase")
589
663
  while len(self.jobs) > 0:
664
+
665
+ # Handle shutdown
666
+ scancelled_job_ids = []
590
667
  if self.is_shutdown():
591
- self.scancel_jobs()
668
+ logger.info("[multisubmit] Shutdown file detected")
669
+ scancelled_job_ids = self.scancel_jobs()
670
+ logger.info(f"[multisubmit] {scancelled_job_ids=}")
671
+
672
+ # Look for finished jobs
592
673
  finished_job_ids = self._get_finished_jobs(job_ids=self.job_ids)
593
- logger.info(f"{finished_job_ids=}")
674
+ logger.debug(f"[multisubmit] {finished_job_ids=}")
675
+
594
676
  with next(get_sync_db()) as db:
595
677
  for slurm_job_id in finished_job_ids:
596
- logger.info(f"Now processing {slurm_job_id=}")
678
+ logger.info(f"[multisubmit] Now process {slurm_job_id=}")
597
679
  slurm_job = self.jobs.pop(slurm_job_id)
598
680
  self._copy_files_from_remote_to_local(slurm_job)
599
681
  for task in slurm_job.tasks:
600
- logger.info(f"Now processing {task.index=}")
682
+ logger.info(f"[multisubmit] Now process {task.index=}")
683
+ was_job_scancelled = slurm_job_id in scancelled_job_ids
601
684
  result, exception = self._postprocess_single_task(
602
- task=task
685
+ task=task,
686
+ was_job_scancelled=was_job_scancelled,
603
687
  )
604
688
 
605
689
  # Note: the relevant done/failed check is based on
@@ -659,11 +743,12 @@ class BaseSlurmRunner(BaseRunner):
659
743
  logger.error(error_msg)
660
744
  raise RuntimeError(error_msg)
661
745
 
662
- def scancel_jobs(self) -> None:
746
+ def scancel_jobs(self) -> list[str]:
663
747
  logger.info("[scancel_jobs] START")
664
748
 
665
749
  if self.jobs:
666
- scancel_string = " ".join(self.job_ids)
750
+ scancelled_job_ids = self.job_ids
751
+ scancel_string = " ".join(scancelled_job_ids)
667
752
  scancel_cmd = f"scancel {scancel_string}"
668
753
  logger.warning(f"Now scancel-ing SLURM jobs {scancel_string}")
669
754
  try:
@@ -673,5 +758,5 @@ class BaseSlurmRunner(BaseRunner):
673
758
  "[scancel_jobs] `scancel` command failed. "
674
759
  f"Original error:\n{str(e)}"
675
760
  )
676
-
677
761
  logger.info("[scancel_jobs] END")
762
+ return scancelled_job_ids
@@ -140,7 +140,7 @@ class SudoSlurmRunner(BaseSlurmRunner):
140
140
  f"Original error: {str(e)}"
141
141
  )
142
142
 
143
- def _run_remote_cmd(self, cmd: str):
143
+ def _run_remote_cmd(self, cmd: str) -> str:
144
144
  res = _run_command_as_user(
145
145
  cmd=cmd,
146
146
  user=self.slurm_user,
@@ -149,6 +149,6 @@ class SudoSlurmRunner(BaseSlurmRunner):
149
149
  )
150
150
  return res.stdout
151
151
 
152
- def _run_local_cmd(self, cmd: str):
152
+ def _run_local_cmd(self, cmd: str) -> str:
153
153
  res = _subprocess_run_or_raise(cmd)
154
154
  return res.stdout
@@ -3,11 +3,14 @@ from typing import Any
3
3
  from sqlalchemy.dialects.postgresql import insert as pg_insert
4
4
  from sqlalchemy.orm import Session
5
5
 
6
+ from fractal_server.app.db import get_sync_db
6
7
  from fractal_server.app.models.v2 import HistoryImageCache
7
8
  from fractal_server.app.models.v2 import HistoryRun
8
9
  from fractal_server.app.models.v2 import HistoryUnit
9
10
  from fractal_server.app.schemas.v2 import HistoryUnitStatus
10
11
 
12
+ _CHUNK_SIZE = 2_000
13
+
11
14
 
12
15
  def update_status_of_history_run(
13
16
  *,
@@ -37,7 +40,18 @@ def update_status_of_history_unit(
37
40
  db_sync.commit()
38
41
 
39
42
 
40
- _CHUNK_SIZE = 2_000
43
+ def update_logfile_of_history_unit(
44
+ *,
45
+ history_unit_id: int,
46
+ logfile: str,
47
+ ) -> None:
48
+ with next(get_sync_db()) as db_sync:
49
+ unit = db_sync.get(HistoryUnit, history_unit_id)
50
+ if unit is None:
51
+ raise ValueError(f"HistoryUnit {history_unit_id} not found.")
52
+ unit.logfile = logfile
53
+ db_sync.merge(unit)
54
+ db_sync.commit()
41
55
 
42
56
 
43
57
  def bulk_upsert_image_cache_fast(
@@ -172,7 +172,7 @@ def run_v2_task_non_parallel(
172
172
  history_unit = HistoryUnit(
173
173
  history_run_id=history_run_id,
174
174
  status=HistoryUnitStatus.SUBMITTED,
175
- logfile=task_files.log_file_local,
175
+ logfile=None,
176
176
  zarr_urls=zarr_urls,
177
177
  )
178
178
  db.add(history_unit)
@@ -275,7 +275,7 @@ def run_v2_task_parallel(
275
275
  HistoryUnit(
276
276
  history_run_id=history_run_id,
277
277
  status=HistoryUnitStatus.SUBMITTED,
278
- logfile=list_task_files[ind].log_file_local,
278
+ logfile=None,
279
279
  zarr_urls=[image["zarr_url"]],
280
280
  )
281
281
  for ind, image in enumerate(images)
@@ -401,8 +401,7 @@ def run_v2_task_compound(
401
401
  history_unit = HistoryUnit(
402
402
  history_run_id=history_run_id,
403
403
  status=HistoryUnitStatus.SUBMITTED,
404
- # FIXME: What about compute-task logs?
405
- logfile=task_files_init.log_file_local,
404
+ logfile=None,
406
405
  zarr_urls=input_image_zarr_urls,
407
406
  )
408
407
  db.add(history_unit)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fractal-server"
3
- version = "2.14.0a15"
3
+ version = "2.14.0a17"
4
4
  description = "Backend component of the Fractal analytics platform"
5
5
  authors = [
6
6
  { name="Tommaso Comparin", email="tommaso.comparin@exact-lab.it" },
@@ -95,7 +95,7 @@ filterwarnings = [
95
95
  markers = ["container", "ssh"]
96
96
 
97
97
  [tool.bumpver]
98
- current_version = "2.14.0a15"
98
+ current_version = "2.14.0a17"
99
99
  version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
100
100
  commit_message = "bump version {old_version} -> {new_version}"
101
101
  commit = true
@@ -1 +0,0 @@
1
- __VERSION__ = "2.14.0a15"