fractal-server 2.13.1__py3-none-any.whl → 2.14.0a0__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.
- fractal_server/__init__.py +1 -1
- fractal_server/app/history/__init__.py +4 -0
- fractal_server/app/history/image_updates.py +142 -0
- fractal_server/app/history/status_enum.py +16 -0
- fractal_server/app/models/v2/__init__.py +5 -1
- fractal_server/app/models/v2/history.py +53 -0
- fractal_server/app/routes/api/v2/__init__.py +2 -2
- fractal_server/app/routes/api/v2/_aux_functions.py +78 -0
- fractal_server/app/routes/api/v2/dataset.py +12 -9
- fractal_server/app/routes/api/v2/history.py +247 -0
- fractal_server/app/routes/api/v2/workflow.py +18 -3
- fractal_server/app/routes/api/v2/workflowtask.py +22 -0
- fractal_server/app/runner/executors/base_runner.py +114 -0
- fractal_server/app/runner/{v2/_local → executors/local}/_local_config.py +3 -3
- fractal_server/app/runner/executors/local/_submit_setup.py +54 -0
- fractal_server/app/runner/executors/local/runner.py +200 -0
- fractal_server/app/runner/executors/{slurm → slurm_common}/_batching.py +1 -1
- fractal_server/app/runner/executors/{slurm → slurm_common}/_slurm_config.py +3 -3
- fractal_server/app/runner/{v2/_slurm_ssh → executors/slurm_common}/_submit_setup.py +13 -12
- fractal_server/app/runner/{v2/_slurm_common → executors/slurm_common}/get_slurm_config.py +9 -15
- fractal_server/app/runner/executors/{slurm/ssh → slurm_ssh}/_executor_wait_thread.py +1 -1
- fractal_server/app/runner/executors/{slurm/ssh → slurm_ssh}/_slurm_job.py +1 -1
- fractal_server/app/runner/executors/{slurm/ssh → slurm_ssh}/executor.py +13 -14
- fractal_server/app/runner/executors/{slurm/sudo → slurm_sudo}/_check_jobs_status.py +11 -9
- fractal_server/app/runner/executors/{slurm/sudo → slurm_sudo}/_executor_wait_thread.py +3 -3
- fractal_server/app/runner/executors/{slurm/sudo → slurm_sudo}/_subprocess_run_as_user.py +2 -68
- fractal_server/app/runner/executors/slurm_sudo/runner.py +632 -0
- fractal_server/app/runner/task_files.py +70 -96
- fractal_server/app/runner/v2/__init__.py +5 -19
- fractal_server/app/runner/v2/_local.py +84 -0
- fractal_server/app/runner/v2/{_slurm_ssh/__init__.py → _slurm_ssh.py} +10 -13
- fractal_server/app/runner/v2/{_slurm_sudo/__init__.py → _slurm_sudo.py} +10 -12
- fractal_server/app/runner/v2/runner.py +93 -28
- fractal_server/app/runner/v2/runner_functions.py +85 -62
- fractal_server/app/runner/v2/runner_functions_low_level.py +20 -20
- fractal_server/app/schemas/v2/dataset.py +0 -17
- fractal_server/app/schemas/v2/history.py +23 -0
- fractal_server/config.py +2 -2
- fractal_server/migrations/versions/8223fcef886c_image_status.py +63 -0
- fractal_server/migrations/versions/87cd72a537a2_add_historyitem_table.py +68 -0
- {fractal_server-2.13.1.dist-info → fractal_server-2.14.0a0.dist-info}/METADATA +1 -1
- {fractal_server-2.13.1.dist-info → fractal_server-2.14.0a0.dist-info}/RECORD +52 -46
- fractal_server/app/routes/api/v2/status.py +0 -168
- fractal_server/app/runner/executors/slurm/sudo/executor.py +0 -1281
- fractal_server/app/runner/v2/_local/__init__.py +0 -132
- fractal_server/app/runner/v2/_local/_submit_setup.py +0 -52
- fractal_server/app/runner/v2/_local/executor.py +0 -100
- fractal_server/app/runner/v2/_slurm_sudo/_submit_setup.py +0 -83
- fractal_server/app/runner/v2/handle_failed_job.py +0 -59
- /fractal_server/app/runner/executors/{slurm → local}/__init__.py +0 -0
- /fractal_server/app/runner/executors/{slurm/ssh → slurm_common}/__init__.py +0 -0
- /fractal_server/app/runner/executors/{_job_states.py → slurm_common/_job_states.py} +0 -0
- /fractal_server/app/runner/executors/{slurm → slurm_common}/remote.py +0 -0
- /fractal_server/app/runner/executors/{slurm → slurm_common}/utils_executors.py +0 -0
- /fractal_server/app/runner/executors/{slurm/sudo → slurm_ssh}/__init__.py +0 -0
- /fractal_server/app/runner/{v2/_slurm_common → executors/slurm_sudo}/__init__.py +0 -0
- {fractal_server-2.13.1.dist-info → fractal_server-2.14.0a0.dist-info}/LICENSE +0 -0
- {fractal_server-2.13.1.dist-info → fractal_server-2.14.0a0.dist-info}/WHEEL +0 -0
- {fractal_server-2.13.1.dist-info → fractal_server-2.14.0a0.dist-info}/entry_points.txt +0 -0
@@ -1,16 +1,20 @@
|
|
1
|
-
fractal_server/__init__.py,sha256
|
1
|
+
fractal_server/__init__.py,sha256=-BpqXrn9rdBZ9nskTf9w2keznxwwl_s4iKTWVW5MXlA,25
|
2
2
|
fractal_server/__main__.py,sha256=igfS2XL3e8JycuhASl2vsYuIPma0MG0cfPPFRuQfh14,6906
|
3
3
|
fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
|
4
4
|
fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
fractal_server/app/db/__init__.py,sha256=wup2wcOkyOh8Vd0Xm76PZn_naxeMqaL4eF8DHHXTGlI,2889
|
6
|
+
fractal_server/app/history/__init__.py,sha256=bisQpsMCFmtQGhIsf9ES0HdEuH4DYkPxVO7SlvxaWTY,239
|
7
|
+
fractal_server/app/history/image_updates.py,sha256=7fwZ11NBi3hfjdCl-6C3rA6bIXx0lITHtKMkjsSCRLs,3948
|
8
|
+
fractal_server/app/history/status_enum.py,sha256=xBBLHQY2Z105b2_HVU9DVRgdEVbbjLm6l4kkcV0Q1Sk,275
|
6
9
|
fractal_server/app/models/__init__.py,sha256=xJWiGAwpXmCpnFMC4c_HTqoUCzMOXrakoGLUH_uMvdA,415
|
7
10
|
fractal_server/app/models/linkusergroup.py,sha256=LWTUfhH2uAnn_4moK7QdRUIHWtpw-hPZuW-5jClv_OE,610
|
8
11
|
fractal_server/app/models/linkuserproject.py,sha256=hvaxh3Lkiy2uUCwB8gvn8RorCpvxSSdzWdCS_U1GL7g,315
|
9
12
|
fractal_server/app/models/security.py,sha256=mMb_HiwWY74QZrs9xuyno0CVSmk4GYQWk5FxGixr8SU,3860
|
10
13
|
fractal_server/app/models/user_settings.py,sha256=Y-ZV-uZAFLZqXxy8c5_Qeh_F7zQuZDWOgLpU6Zs6iqU,1316
|
11
|
-
fractal_server/app/models/v2/__init__.py,sha256=
|
14
|
+
fractal_server/app/models/v2/__init__.py,sha256=VNoK2OUB8_IPvZoItLOxup84ZMNslO7j30jojNS2lI0,774
|
12
15
|
fractal_server/app/models/v2/accounting.py,sha256=f2ALxfKKBNxFLJTtC2-YqRepVK253x68y7zkD2V_Nls,1115
|
13
16
|
fractal_server/app/models/v2/dataset.py,sha256=O5_6YfNeX6JM7PUcEZhbeV4JCvuAhFCQbOOuefpVnqc,1544
|
17
|
+
fractal_server/app/models/v2/history.py,sha256=MFr4Z29RLIFSPH5M8GhgDMaXOz4SMAiC1MZmaC4kLk4,1528
|
14
18
|
fractal_server/app/models/v2/job.py,sha256=L0P1mrztMqqb-6qdPEbuHXhCsf2mxVUct_ehcXrREGg,1844
|
15
19
|
fractal_server/app/models/v2/project.py,sha256=rAHoh5KfYwIaW7rTX0_O0jvWmxEvfo1BafvmcXuSSRk,786
|
16
20
|
fractal_server/app/models/v2/task.py,sha256=8KEROaadgccXRZIP7EriBp2j1FgzYkgiirOi5_fG79M,1494
|
@@ -28,24 +32,24 @@ fractal_server/app/routes/admin/v2/task.py,sha256=h6O_DLYgp7KMExydPRO-1UsvsYj8S5
|
|
28
32
|
fractal_server/app/routes/admin/v2/task_group.py,sha256=XTjdqgABXZcx9EenaoqSmHh12BXSentUus3SV0oxBMs,7929
|
29
33
|
fractal_server/app/routes/admin/v2/task_group_lifecycle.py,sha256=0e0ZJ_k75TVHaT2o8Xk33DPDSgh-eBhZf-y4y7t-Adg,9429
|
30
34
|
fractal_server/app/routes/api/__init__.py,sha256=2IDheFi0OFdsUg7nbUiyahqybvpgXqeHUXIL2QtWrQQ,641
|
31
|
-
fractal_server/app/routes/api/v2/__init__.py,sha256=
|
32
|
-
fractal_server/app/routes/api/v2/_aux_functions.py,sha256=
|
35
|
+
fractal_server/app/routes/api/v2/__init__.py,sha256=S7zOeoLkD6Sss1JLRQxeQWPSXKMX2yaIVhLQUw0PDh0,2176
|
36
|
+
fractal_server/app/routes/api/v2/_aux_functions.py,sha256=m4gqcOAatwShBmUeiSSF-I_rIRY-bHRSjEfmvnGU0AA,13498
|
33
37
|
fractal_server/app/routes/api/v2/_aux_functions_task_lifecycle.py,sha256=qdXCb6IP8-qPEAxGZKljtjIqNzIAyRaAsQSRi5VqFHM,6773
|
34
38
|
fractal_server/app/routes/api/v2/_aux_functions_tasks.py,sha256=uhNSs-jcS7ndIUFKiOC1yrDiViw3uvKEXi9UL04BMks,11642
|
35
|
-
fractal_server/app/routes/api/v2/dataset.py,sha256=
|
39
|
+
fractal_server/app/routes/api/v2/dataset.py,sha256=gS5169eJRGHBQNUnkDB75Bv3Kg8Ql-tMVw5_FAxUEKc,9664
|
40
|
+
fractal_server/app/routes/api/v2/history.py,sha256=Np2TzTLstOKhrbqTsxak8Z1uvafsrGU2EHIflzgHfXQ,8093
|
36
41
|
fractal_server/app/routes/api/v2/images.py,sha256=32sSDSWri_A8uQHcdbVTPvGGEjj9vk5ILj8q0-2jLX8,8507
|
37
42
|
fractal_server/app/routes/api/v2/job.py,sha256=m89FTh9Px25oXCeWj2k2NdGWQaO2oxMh-6lZppcsJOY,5551
|
38
43
|
fractal_server/app/routes/api/v2/project.py,sha256=3kMp1ValIVwY-qogfRNgWmSMk0jgsk1VJlY8MhwvH1Q,6665
|
39
|
-
fractal_server/app/routes/api/v2/status.py,sha256=Ls_TMPBE_pqOFsO1XBWf8NDSoQkle45XuI7clKwGouQ,6305
|
40
44
|
fractal_server/app/routes/api/v2/submit.py,sha256=K4OjcSg476JXIeeMUaYdTDk8Qpj5IO5UULvfErI7Y5Y,8624
|
41
45
|
fractal_server/app/routes/api/v2/task.py,sha256=z3_SxsXoKsbM9GGNJUdIiZisQwAJSBqvCc7thaJIOTU,7191
|
42
46
|
fractal_server/app/routes/api/v2/task_collection.py,sha256=IDNF6sjDuU37HIQ0TuQA-TZIuf7nfHAQXUUNmkrlhLM,12706
|
43
47
|
fractal_server/app/routes/api/v2/task_collection_custom.py,sha256=cctW61-C2QYF2KXluS15lLhZJS_kt30Ca6UGLFO32z0,6207
|
44
48
|
fractal_server/app/routes/api/v2/task_group.py,sha256=j3zDvVZizB7NWEgVgZU42JCXETkaVkk2ImJPr0jS7BQ,8164
|
45
49
|
fractal_server/app/routes/api/v2/task_group_lifecycle.py,sha256=3o9bCC8ubMwffQPPaxQZy-CjH9IB2RkIReIecI6L2_w,9300
|
46
|
-
fractal_server/app/routes/api/v2/workflow.py,sha256=
|
50
|
+
fractal_server/app/routes/api/v2/workflow.py,sha256=R-wnT9tWTSbaNobGcfgLdk-4pbfbxoBwKZd1JRZXsSU,12223
|
47
51
|
fractal_server/app/routes/api/v2/workflow_import.py,sha256=INmnhlMEBJp-vHPR0f940DANPmIidts3OfcooeM_aNA,11205
|
48
|
-
fractal_server/app/routes/api/v2/workflowtask.py,sha256=
|
52
|
+
fractal_server/app/routes/api/v2/workflowtask.py,sha256=89yLpSzdr7Mv3wRmdMt71CSC3hclrVUP56UVtfTQHOQ,12152
|
49
53
|
fractal_server/app/routes/auth/__init__.py,sha256=fao6CS0WiAjHDTvBzgBVV_bSXFpEAeDBF6Z6q7rRkPc,1658
|
50
54
|
fractal_server/app/routes/auth/_aux_auth.py,sha256=UZgauY0V6mSqjte_sYI1cBl2h8bcbLaeWzgpl1jdJlk,4883
|
51
55
|
fractal_server/app/routes/auth/current_user.py,sha256=FUegTahlxT3BdPVCQYir0-ogg2YAaZ1DYuLcE_5NC9Y,5906
|
@@ -64,44 +68,43 @@ fractal_server/app/runner/components.py,sha256=ZF8ct_Ky5k8IAcrmpYOZ-bc6OBgdELEig
|
|
64
68
|
fractal_server/app/runner/compress_folder.py,sha256=HSc1tv7x2DBjBoXwugZlC79rm9GNBIWtQKK9yWn5ZBI,3991
|
65
69
|
fractal_server/app/runner/exceptions.py,sha256=_qZ_t8O4umAdJ1ikockiF5rDJuxnEskrGrLjZcnQl7A,4159
|
66
70
|
fractal_server/app/runner/executors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
67
|
-
fractal_server/app/runner/executors/
|
68
|
-
fractal_server/app/runner/executors/
|
69
|
-
fractal_server/app/runner/executors/
|
70
|
-
fractal_server/app/runner/executors/
|
71
|
-
fractal_server/app/runner/executors/
|
72
|
-
fractal_server/app/runner/executors/
|
73
|
-
fractal_server/app/runner/executors/
|
74
|
-
fractal_server/app/runner/executors/
|
75
|
-
fractal_server/app/runner/executors/
|
76
|
-
fractal_server/app/runner/executors/
|
77
|
-
fractal_server/app/runner/executors/
|
78
|
-
fractal_server/app/runner/executors/
|
79
|
-
fractal_server/app/runner/executors/
|
80
|
-
fractal_server/app/runner/executors/
|
81
|
-
fractal_server/app/runner/executors/
|
71
|
+
fractal_server/app/runner/executors/base_runner.py,sha256=uUA4hGeNF6d8IYZ80nueq7PSjuliWiFpyxnhTKBk0U4,3721
|
72
|
+
fractal_server/app/runner/executors/local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
73
|
+
fractal_server/app/runner/executors/local/_local_config.py,sha256=8dyg2Gh8L2FlG_jJRYLMkcMgVHGEY2w7DME9aaKXFFo,3688
|
74
|
+
fractal_server/app/runner/executors/local/_submit_setup.py,sha256=6h4DVcVgzL8Oubw83zixvya4ljmNSXlG0Kp8a01OBLc,1440
|
75
|
+
fractal_server/app/runner/executors/local/runner.py,sha256=tEI3qe9UQKgqNoY6gkP1b2O1yRw3VGTiPTDKztrCt2I,7577
|
76
|
+
fractal_server/app/runner/executors/slurm_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
77
|
+
fractal_server/app/runner/executors/slurm_common/_batching.py,sha256=ZY020JZlDS5mfpgpWTChQkyHU7iLE5kx2HVd57_C6XA,8850
|
78
|
+
fractal_server/app/runner/executors/slurm_common/_job_states.py,sha256=nuV-Zba38kDrRESOVB3gaGbrSPZc4q7YGichQaeqTW0,238
|
79
|
+
fractal_server/app/runner/executors/slurm_common/_slurm_config.py,sha256=yqcjAlYF_Gasv0b013cg3vz7abmjIHIgOwei7bCojuk,15896
|
80
|
+
fractal_server/app/runner/executors/slurm_common/_submit_setup.py,sha256=crbfAAvXbxe_9PaokXkkVdPV65lSCFbInZ0RlT6uyHI,2746
|
81
|
+
fractal_server/app/runner/executors/slurm_common/get_slurm_config.py,sha256=GwdJsEAP9vEBA-FkOGSRHHeRUv1E6bmKZwWyO5Daa70,5994
|
82
|
+
fractal_server/app/runner/executors/slurm_common/remote.py,sha256=wLziIsGdSMiO-jIXM8x77JRK82g_2hx0iBKTiMghuIo,5852
|
83
|
+
fractal_server/app/runner/executors/slurm_common/utils_executors.py,sha256=naPyJI0I3lD-sYHbSXbMFGUBK4h_SggA5V91Z1Ch1Xg,1416
|
84
|
+
fractal_server/app/runner/executors/slurm_ssh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
85
|
+
fractal_server/app/runner/executors/slurm_ssh/_executor_wait_thread.py,sha256=lnW8dNNPqqbpQvojVBQaNJm4wN3Qkw02RWBZ1w68Hyw,3755
|
86
|
+
fractal_server/app/runner/executors/slurm_ssh/_slurm_job.py,sha256=IL1C52dezEiincVX2yKryNiPHi4YOMURNLdQO_QPdGw,4406
|
87
|
+
fractal_server/app/runner/executors/slurm_ssh/executor.py,sha256=JW6zguEy9XsHebSPt_JTK4Kw78r5rlbDEipSOxOqoHk,53660
|
88
|
+
fractal_server/app/runner/executors/slurm_sudo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
89
|
+
fractal_server/app/runner/executors/slurm_sudo/_check_jobs_status.py,sha256=eZd9lxbObsqc1M3B96IGMJ-1oC0jo8lBOX4Nto97VvE,2036
|
90
|
+
fractal_server/app/runner/executors/slurm_sudo/_executor_wait_thread.py,sha256=7CaMarvaKFCq3RcyqW5CABng_3b3QaS2pmTzVRDgm3I,4077
|
91
|
+
fractal_server/app/runner/executors/slurm_sudo/_subprocess_run_as_user.py,sha256=O1bNg1DiSDJmQE0RmOk2Ii47DagiXp5ryd0R6KxO2OM,3177
|
92
|
+
fractal_server/app/runner/executors/slurm_sudo/runner.py,sha256=JFVGb0K7w0l6kuy4QjIey_3M4indQUwvqbflzdW9Gi8,21256
|
82
93
|
fractal_server/app/runner/extract_archive.py,sha256=tLpjDrX47OjTNhhoWvm6iNukg8KoieWyTb7ZfvE9eWU,2483
|
83
94
|
fractal_server/app/runner/filenames.py,sha256=lPnxKHtdRizr6FqG3zOdjDPyWA7GoaJGTtiuJV0gA8E,70
|
84
95
|
fractal_server/app/runner/run_subprocess.py,sha256=c3JbYXq3hX2aaflQU19qJ5Xs6J6oXGNvnTEoAfv2bxc,959
|
85
96
|
fractal_server/app/runner/set_start_and_last_task_index.py,sha256=-q4zVybAj8ek2XlbENKlfOAJ39hT_zoJoZkqzDqiAMY,1254
|
86
97
|
fractal_server/app/runner/shutdown.py,sha256=9pfSKHDNdIcm0eY-opgRTi7y0HmvfPmYiu9JR6Idark,2082
|
87
|
-
fractal_server/app/runner/task_files.py,sha256=
|
88
|
-
fractal_server/app/runner/v2/__init__.py,sha256=
|
89
|
-
fractal_server/app/runner/v2/_local
|
90
|
-
fractal_server/app/runner/v2/
|
91
|
-
fractal_server/app/runner/v2/
|
92
|
-
fractal_server/app/runner/v2/_local/executor.py,sha256=QrJlD77G6q4WohoJQO7XXbvi2RlCUsNvMnPDEZIoAqA,3620
|
93
|
-
fractal_server/app/runner/v2/_slurm_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
94
|
-
fractal_server/app/runner/v2/_slurm_common/get_slurm_config.py,sha256=21Tl70L8oyo3H_r0vXW6KO9pq2IKEiV5ZkshsPsBjzI,6226
|
95
|
-
fractal_server/app/runner/v2/_slurm_ssh/__init__.py,sha256=qSRQrCSnPJJ-EwjdQP9sPPtn-Tm2e4zmgOJo2_bCtyU,3321
|
96
|
-
fractal_server/app/runner/v2/_slurm_ssh/_submit_setup.py,sha256=a5_FDPH_yxYmrjAjMRLgh_Y4DSG3mRslCLQodGM3-t4,2838
|
97
|
-
fractal_server/app/runner/v2/_slurm_sudo/__init__.py,sha256=F9YsldPrGeEYQ27jz6bn-Nf6u0bwOpmgFhZPXYlJ1fE,2968
|
98
|
-
fractal_server/app/runner/v2/_slurm_sudo/_submit_setup.py,sha256=a5_FDPH_yxYmrjAjMRLgh_Y4DSG3mRslCLQodGM3-t4,2838
|
98
|
+
fractal_server/app/runner/task_files.py,sha256=5enzBqiQct1AUGwrGX-rxFCxnhW3SPYIUylMYwyVfrE,2482
|
99
|
+
fractal_server/app/runner/v2/__init__.py,sha256=fExxP-EQEaXADncxX45DPG9GVlJNjKwnK9yBBjJFqGA,14245
|
100
|
+
fractal_server/app/runner/v2/_local.py,sha256=Zas2RS_f9mfdkXszBpzISHylLX1bX8pFuoLA1fHLFqQ,2945
|
101
|
+
fractal_server/app/runner/v2/_slurm_ssh.py,sha256=6NzRy3Yp84DHhsRHie2NI_UXhhiAusY4nOdTYlhqJOw,3226
|
102
|
+
fractal_server/app/runner/v2/_slurm_sudo.py,sha256=iQ_BwvS88sMzd1vAce_9MOjC8YzZq7rHx2YUpkVRWXQ,2913
|
99
103
|
fractal_server/app/runner/v2/deduplicate_list.py,sha256=IVTE4abBU1bUprFTkxrTfYKnvkNTanWQ-KWh_etiT08,645
|
100
|
-
fractal_server/app/runner/v2/handle_failed_job.py,sha256=-zFWw4d208bQEFUF_sAdH2LdHEARyg1FC8BENr1SjhU,2045
|
101
104
|
fractal_server/app/runner/v2/merge_outputs.py,sha256=D1L4Taieq9i71SPQyNc1kMokgHh-sV_MqF3bv7QMDBc,907
|
102
|
-
fractal_server/app/runner/v2/runner.py,sha256=
|
103
|
-
fractal_server/app/runner/v2/runner_functions.py,sha256=
|
104
|
-
fractal_server/app/runner/v2/runner_functions_low_level.py,sha256=
|
105
|
+
fractal_server/app/runner/v2/runner.py,sha256=YPzuo4QfXm9nVmZinF3qI1w1AlJwpZ1wVNboyhyTyU4,14456
|
106
|
+
fractal_server/app/runner/v2/runner_functions.py,sha256=EBY64v0NC_fdgKUqZQqCp8XZtPbwVo21P1eXS6Y0AUc,10456
|
107
|
+
fractal_server/app/runner/v2/runner_functions_low_level.py,sha256=dvvRK7od8iQ8vdPf80uGUxs3i5i0buGjCodBxSjZ7PQ,3671
|
105
108
|
fractal_server/app/runner/v2/task_interface.py,sha256=e1GGQSYd0MyBj1EZvEVzqv-HpVE4YffXOq82WLrCaOc,1866
|
106
109
|
fractal_server/app/runner/versions.py,sha256=dSaPRWqmFPHjg20kTCHmi_dmGNcCETflDtDLronNanU,852
|
107
110
|
fractal_server/app/schemas/__init__.py,sha256=stURAU_t3AOBaH0HSUbV-GKhlPKngnnIMoqWc3orFyI,135
|
@@ -112,8 +115,9 @@ fractal_server/app/schemas/user_group.py,sha256=Uao1igRYflBu7Dg6Zs0kaFU3zBFJzIwD
|
|
112
115
|
fractal_server/app/schemas/user_settings.py,sha256=4XeXQ3rnDS1UvLPd9hvh-WVSbzBGcMDjChfiZ_WGi-w,3134
|
113
116
|
fractal_server/app/schemas/v2/__init__.py,sha256=pjRUOJwZGzsDbBbxfnCgQgShs5V8SaHRqwIQDW3STpY,2676
|
114
117
|
fractal_server/app/schemas/v2/accounting.py,sha256=Wylt7uWTiDIFlHJOh4XEtYitk2FjFlmnodDrJDxcr0E,397
|
115
|
-
fractal_server/app/schemas/v2/dataset.py,sha256=
|
118
|
+
fractal_server/app/schemas/v2/dataset.py,sha256=xo7Y3fq5ThMVBp6xDVypdG-EmGfBX_vWVRs66u2pC34,5157
|
116
119
|
fractal_server/app/schemas/v2/dumps.py,sha256=2GUjoqeblUvrSoojBz5odoUUf53IABtbY_5GvFZoMVc,1782
|
120
|
+
fractal_server/app/schemas/v2/history.py,sha256=OHwRIbOIjBiiTYUNZYsHTdEXJHff17JRizQ8pf1e0vk,601
|
117
121
|
fractal_server/app/schemas/v2/job.py,sha256=Dp_RRiC5uvJqq1fAJlBXztAFA-tS5FWuRnUbTnLtL6M,4226
|
118
122
|
fractal_server/app/schemas/v2/manifest.py,sha256=AhUkv3ZfoUffdcpHKOuUTmcZa-0G5Y53hp-O4UaTkG0,7133
|
119
123
|
fractal_server/app/schemas/v2/project.py,sha256=uqBreoS0UAkbVEJJS2HkSdjCCWfFIkv6N70TWk9HgxA,868
|
@@ -126,7 +130,7 @@ fractal_server/app/schemas/v2/workflowtask.py,sha256=qMvwlnFCsnyD8uv8HJ4cFy2-QMm
|
|
126
130
|
fractal_server/app/security/__init__.py,sha256=8dg7vBzLjU43p_eGoHuFBO97FtIDtNnbJJ5mzVSVRNI,14094
|
127
131
|
fractal_server/app/security/signup_email.py,sha256=CR1VbsGFNshxsWquLDZPbUAYnGzkCHeJChtncq63RBc,1434
|
128
132
|
fractal_server/app/user_settings.py,sha256=OP1yiYKtPadxwM51_Q0hdPk3z90TCN4z1BLpQsXyWiU,1316
|
129
|
-
fractal_server/config.py,sha256=
|
133
|
+
fractal_server/config.py,sha256=Lc1lgN4J1sTeE5kdWm3b2ltDYtTzyzmuA6ms1T1ZboI,28824
|
130
134
|
fractal_server/data_migrations/README.md,sha256=_3AEFvDg9YkybDqCLlFPdDmGJvr6Tw7HRI14aZ3LOIw,398
|
131
135
|
fractal_server/data_migrations/tools.py,sha256=LeMeASwYGtEqd-3wOLle6WARdTGAimoyMmRbbJl-hAM,572
|
132
136
|
fractal_server/gunicorn_fractal.py,sha256=u6U01TLGlXgq1v8QmEpLih3QnsInZD7CqphgJ_GrGzc,1230
|
@@ -149,7 +153,9 @@ fractal_server/migrations/versions/50a13d6138fd_initial_schema.py,sha256=zwXegXs
|
|
149
153
|
fractal_server/migrations/versions/5bf02391cfef_v2.py,sha256=axhNkr_H6R4rRbY7oGYazNbFvPXeSyBDWFVbKNmiqs8,8433
|
150
154
|
fractal_server/migrations/versions/70e77f1c38b0_add_applyworkflow_first_task_index_and_.py,sha256=Q-DsMzG3IcUV2Ol1dhJWosDvKERamBE6QvA2zzS5zpQ,1632
|
151
155
|
fractal_server/migrations/versions/71eefd1dd202_add_slurm_accounts.py,sha256=mbWuCkTpRAdGbRhW7lhXs_e5S6O37UAcCN6JfoY5H8A,1353
|
156
|
+
fractal_server/migrations/versions/8223fcef886c_image_status.py,sha256=Nhlw22F9w1Obh-Tte6787Fyglb4NuQwdJQeO-HlkqSs,1743
|
152
157
|
fractal_server/migrations/versions/84bf0fffde30_add_dumps_to_applyworkflow.py,sha256=NSCuhANChsg76vBkShBl-9tQ4VEHubOjtAv1etHhlvY,2684
|
158
|
+
fractal_server/migrations/versions/87cd72a537a2_add_historyitem_table.py,sha256=xxAftQYyQ2C_7qiuPcG5FeVmhFQGznxfCglsfk2CjiU,2092
|
153
159
|
fractal_server/migrations/versions/8e8f227a3e36_update_taskv2_post_2_7_0.py,sha256=68y9-fpSuKx6KPtM_9n8Ho0I1qwa8IoG-yJqXUYQrGg,1111
|
154
160
|
fractal_server/migrations/versions/8f79bd162e35_add_docs_info_and_docs_link_to_task_.py,sha256=6pgODDtyAxevZvAJBj9IJ41inhV1RpwbpZr_qfPPu1A,1115
|
155
161
|
fractal_server/migrations/versions/94a47ea2d3ff_remove_cache_dir_slurm_user_and_slurm_.py,sha256=yL3-Hvzw5jBLKj4LFP1z5ofZE9L9W3tLwYtPNW7z4ko,1508
|
@@ -199,8 +205,8 @@ fractal_server/tasks/v2/utils_templates.py,sha256=07TZpJ0Mh_A4lXVXrrH2o1VLFFGwxe
|
|
199
205
|
fractal_server/urls.py,sha256=QjIKAC1a46bCdiPMu3AlpgFbcv6a4l3ABcd5xz190Og,471
|
200
206
|
fractal_server/utils.py,sha256=PMwrxWFxRTQRl1b9h-NRIbFGPKqpH_hXnkAT3NfZdpY,3571
|
201
207
|
fractal_server/zip_tools.py,sha256=GjDgo_sf6V_DDg6wWeBlZu5zypIxycn_l257p_YVKGc,4876
|
202
|
-
fractal_server-2.
|
203
|
-
fractal_server-2.
|
204
|
-
fractal_server-2.
|
205
|
-
fractal_server-2.
|
206
|
-
fractal_server-2.
|
208
|
+
fractal_server-2.14.0a0.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
|
209
|
+
fractal_server-2.14.0a0.dist-info/METADATA,sha256=mbF86y24zVVZ18m50gnS2ghCXEDjqktpK5DWwv7Tok0,4550
|
210
|
+
fractal_server-2.14.0a0.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
211
|
+
fractal_server-2.14.0a0.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
|
212
|
+
fractal_server-2.14.0a0.dist-info/RECORD,,
|
@@ -1,168 +0,0 @@
|
|
1
|
-
from typing import Optional
|
2
|
-
|
3
|
-
from fastapi import APIRouter
|
4
|
-
from fastapi import Depends
|
5
|
-
from fastapi import HTTPException
|
6
|
-
from fastapi import status
|
7
|
-
|
8
|
-
from .....logger import set_logger
|
9
|
-
from ....db import AsyncSession
|
10
|
-
from ....db import get_async_db
|
11
|
-
from ....models.v2 import JobV2
|
12
|
-
from ....schemas.v2.dataset import WorkflowTaskStatusTypeV2
|
13
|
-
from ....schemas.v2.status import StatusReadV2
|
14
|
-
from ._aux_functions import _get_dataset_check_owner
|
15
|
-
from ._aux_functions import _get_submitted_jobs_statement
|
16
|
-
from ._aux_functions import _get_workflow_check_owner
|
17
|
-
from fractal_server.app.models import UserOAuth
|
18
|
-
from fractal_server.app.routes.auth import current_active_user
|
19
|
-
|
20
|
-
router = APIRouter()
|
21
|
-
|
22
|
-
logger = set_logger(__name__)
|
23
|
-
|
24
|
-
|
25
|
-
@router.get(
|
26
|
-
"/project/{project_id}/status/",
|
27
|
-
response_model=StatusReadV2,
|
28
|
-
)
|
29
|
-
async def get_workflowtask_status(
|
30
|
-
project_id: int,
|
31
|
-
dataset_id: int,
|
32
|
-
workflow_id: int,
|
33
|
-
user: UserOAuth = Depends(current_active_user),
|
34
|
-
db: AsyncSession = Depends(get_async_db),
|
35
|
-
) -> Optional[StatusReadV2]:
|
36
|
-
"""
|
37
|
-
Extract the status of all `WorkflowTaskV2` of a given `WorkflowV2` that ran
|
38
|
-
on a given `DatasetV2`.
|
39
|
-
|
40
|
-
*NOTE*: the current endpoint is not guaranteed to provide consistent
|
41
|
-
results if the workflow task list is modified in a non-trivial way
|
42
|
-
(that is, by adding intermediate tasks, removing tasks, or changing their
|
43
|
-
order). See fractal-server GitHub issues: 793, 1083.
|
44
|
-
"""
|
45
|
-
# Get the dataset DB entry
|
46
|
-
output = await _get_dataset_check_owner(
|
47
|
-
project_id=project_id,
|
48
|
-
dataset_id=dataset_id,
|
49
|
-
user_id=user.id,
|
50
|
-
db=db,
|
51
|
-
)
|
52
|
-
dataset = output["dataset"]
|
53
|
-
|
54
|
-
# Get the workflow DB entry
|
55
|
-
workflow = await _get_workflow_check_owner(
|
56
|
-
project_id=project_id,
|
57
|
-
workflow_id=workflow_id,
|
58
|
-
user_id=user.id,
|
59
|
-
db=db,
|
60
|
-
)
|
61
|
-
|
62
|
-
# Check whether there exists a submitted job associated to this
|
63
|
-
# workflow/dataset pair. If it does exist, it will be used later.
|
64
|
-
# If there are multiple jobs, raise an error.
|
65
|
-
stm = _get_submitted_jobs_statement()
|
66
|
-
stm = stm.where(JobV2.dataset_id == dataset_id)
|
67
|
-
stm = stm.where(JobV2.workflow_id == workflow_id)
|
68
|
-
res = await db.execute(stm)
|
69
|
-
running_jobs = res.scalars().all()
|
70
|
-
if len(running_jobs) == 0:
|
71
|
-
running_job = None
|
72
|
-
elif len(running_jobs) == 1:
|
73
|
-
running_job = running_jobs[0]
|
74
|
-
else:
|
75
|
-
string_ids = str([job.id for job in running_jobs])[1:-1]
|
76
|
-
raise HTTPException(
|
77
|
-
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
|
78
|
-
detail=(
|
79
|
-
f"Cannot get WorkflowTaskV2 statuses as DatasetV2 {dataset.id}"
|
80
|
-
f" is linked to multiple active jobs: {string_ids}."
|
81
|
-
),
|
82
|
-
)
|
83
|
-
|
84
|
-
# Initialize empty dictionary for WorkflowTaskV2 status
|
85
|
-
workflow_tasks_status_dict: dict = {}
|
86
|
-
|
87
|
-
# Lowest priority: read status from DB, which corresponds to jobs that are
|
88
|
-
# not running
|
89
|
-
history = dataset.history
|
90
|
-
for history_item in history:
|
91
|
-
wftask_id = history_item["workflowtask"]["id"]
|
92
|
-
wftask_status = history_item["status"]
|
93
|
-
workflow_tasks_status_dict[wftask_id] = wftask_status
|
94
|
-
|
95
|
-
if running_job is None:
|
96
|
-
# If no job is running, the chronological-last history item is also the
|
97
|
-
# positional-last workflow task to be included in the response.
|
98
|
-
if len(history) > 0:
|
99
|
-
last_valid_wftask_id = history[-1]["workflowtask"]["id"]
|
100
|
-
else:
|
101
|
-
last_valid_wftask_id = None
|
102
|
-
else:
|
103
|
-
# If a job is running, then gather more up-to-date information
|
104
|
-
|
105
|
-
# Mid priority: Set all WorkflowTask's that are part of the running job
|
106
|
-
# as "submitted"
|
107
|
-
start = running_job.first_task_index
|
108
|
-
end = running_job.last_task_index + 1
|
109
|
-
|
110
|
-
running_job_wftasks = workflow.task_list[start:end]
|
111
|
-
running_job_statuses = [
|
112
|
-
workflow_tasks_status_dict.get(wft.id, None)
|
113
|
-
for wft in running_job_wftasks
|
114
|
-
]
|
115
|
-
try:
|
116
|
-
first_submitted_index = running_job_statuses.index(
|
117
|
-
WorkflowTaskStatusTypeV2.SUBMITTED
|
118
|
-
)
|
119
|
-
except ValueError:
|
120
|
-
logger.warning(
|
121
|
-
f"Job {running_job.id} is submitted but its task list does "
|
122
|
-
f"not contain a {WorkflowTaskStatusTypeV2.SUBMITTED} task."
|
123
|
-
)
|
124
|
-
first_submitted_index = 0
|
125
|
-
|
126
|
-
for wftask in running_job_wftasks[first_submitted_index:]:
|
127
|
-
workflow_tasks_status_dict[
|
128
|
-
wftask.id
|
129
|
-
] = WorkflowTaskStatusTypeV2.SUBMITTED
|
130
|
-
|
131
|
-
# The last workflow task that is included in the submitted job is also
|
132
|
-
# the positional-last workflow task to be included in the response.
|
133
|
-
try:
|
134
|
-
last_valid_wftask_id = workflow.task_list[end - 1].id
|
135
|
-
except IndexError as e:
|
136
|
-
logger.warning(
|
137
|
-
f"Handled IndexError in `get_workflowtask_status` ({str(e)})."
|
138
|
-
)
|
139
|
-
logger.warning(
|
140
|
-
"Additional information: "
|
141
|
-
f"{running_job.first_task_index=}; "
|
142
|
-
f"{running_job.last_task_index=}; "
|
143
|
-
f"{len(workflow.task_list)=}; "
|
144
|
-
f"{dataset_id=}; "
|
145
|
-
f"{workflow_id=}."
|
146
|
-
)
|
147
|
-
last_valid_wftask_id = None
|
148
|
-
logger.warning(f"Now setting {last_valid_wftask_id=}.")
|
149
|
-
|
150
|
-
# Based on previously-gathered information, clean up the response body
|
151
|
-
clean_workflow_tasks_status_dict = {}
|
152
|
-
for wf_task in workflow.task_list:
|
153
|
-
wf_task_status = workflow_tasks_status_dict.get(wf_task.id)
|
154
|
-
if wf_task_status is None:
|
155
|
-
# If a wftask ID was not found, ignore it and continue
|
156
|
-
continue
|
157
|
-
clean_workflow_tasks_status_dict[str(wf_task.id)] = wf_task_status
|
158
|
-
if wf_task_status == WorkflowTaskStatusTypeV2.FAILED:
|
159
|
-
# Starting from the beginning of `workflow.task_list`, stop the
|
160
|
-
# first time that you hit a failed job
|
161
|
-
break
|
162
|
-
if wf_task.id == last_valid_wftask_id:
|
163
|
-
# Starting from the beginning of `workflow.task_list`, stop the
|
164
|
-
# first time that you hit `last_valid_wftask_id``
|
165
|
-
break
|
166
|
-
|
167
|
-
response_body = StatusReadV2(status=clean_workflow_tasks_status_dict)
|
168
|
-
return response_body
|