fractal-server 2.18.6__py3-none-any.whl → 2.19.0__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.
Files changed (57) hide show
  1. fractal_server/__init__.py +1 -1
  2. fractal_server/app/models/security.py +16 -0
  3. fractal_server/app/models/v2/dataset.py +0 -4
  4. fractal_server/app/models/v2/job.py +4 -0
  5. fractal_server/app/models/v2/task.py +0 -1
  6. fractal_server/app/models/v2/task_group.py +4 -0
  7. fractal_server/app/models/v2/workflow.py +2 -0
  8. fractal_server/app/models/v2/workflowtask.py +3 -0
  9. fractal_server/app/routes/admin/v2/sharing.py +47 -0
  10. fractal_server/app/routes/admin/v2/task.py +0 -5
  11. fractal_server/app/routes/admin/v2/task_group_lifecycle.py +6 -0
  12. fractal_server/app/routes/api/__init__.py +4 -52
  13. fractal_server/app/routes/api/alive.py +13 -0
  14. fractal_server/app/routes/api/settings.py +44 -0
  15. fractal_server/app/routes/api/v2/__init__.py +0 -2
  16. fractal_server/app/routes/api/v2/_aux_functions_task_lifecycle.py +1 -20
  17. fractal_server/app/routes/api/v2/dataset.py +9 -8
  18. fractal_server/app/routes/api/v2/history.py +8 -8
  19. fractal_server/app/routes/api/v2/images.py +6 -5
  20. fractal_server/app/routes/api/v2/job.py +10 -9
  21. fractal_server/app/routes/api/v2/pre_submission_checks.py +3 -3
  22. fractal_server/app/routes/api/v2/project.py +7 -6
  23. fractal_server/app/routes/api/v2/sharing.py +17 -9
  24. fractal_server/app/routes/api/v2/submit.py +5 -3
  25. fractal_server/app/routes/api/v2/task.py +7 -6
  26. fractal_server/app/routes/api/v2/task_collection.py +4 -2
  27. fractal_server/app/routes/api/v2/task_collection_custom.py +2 -2
  28. fractal_server/app/routes/api/v2/task_collection_pixi.py +4 -2
  29. fractal_server/app/routes/api/v2/task_group.py +9 -30
  30. fractal_server/app/routes/api/v2/task_group_lifecycle.py +10 -4
  31. fractal_server/app/routes/api/v2/task_version_update.py +4 -3
  32. fractal_server/app/routes/api/v2/workflow.py +10 -9
  33. fractal_server/app/routes/api/v2/workflow_import.py +14 -45
  34. fractal_server/app/routes/api/v2/workflowtask.py +7 -11
  35. fractal_server/app/routes/auth/__init__.py +18 -1
  36. fractal_server/app/routes/auth/current_user.py +8 -0
  37. fractal_server/app/routes/auth/users.py +11 -0
  38. fractal_server/app/routes/aux/_versions.py +42 -0
  39. fractal_server/app/schemas/user.py +7 -0
  40. fractal_server/app/schemas/v2/__init__.py +0 -1
  41. fractal_server/app/schemas/v2/dumps.py +0 -1
  42. fractal_server/app/schemas/v2/task.py +0 -5
  43. fractal_server/app/schemas/v2/workflow.py +2 -0
  44. fractal_server/app/schemas/v2/workflowtask.py +6 -2
  45. fractal_server/app/security/__init__.py +8 -3
  46. fractal_server/migrations/versions/18a26fcdea5d_drop_dataset_history.py +41 -0
  47. fractal_server/migrations/versions/1bf8785755f9_add_description_to_workflow_and_.py +53 -0
  48. fractal_server/migrations/versions/5fb08bf05b14_drop_taskv2_source.py +36 -0
  49. fractal_server/migrations/versions/cfd13f7954e7_add_fractal_server_version_to_jobv2_and_.py +52 -0
  50. fractal_server/migrations/versions/e53dc51fdf93_add_useroauth_is_guest.py +36 -0
  51. fractal_server/runner/v2/submit_workflow.py +0 -2
  52. {fractal_server-2.18.6.dist-info → fractal_server-2.19.0.dist-info}/METADATA +2 -2
  53. {fractal_server-2.18.6.dist-info → fractal_server-2.19.0.dist-info}/RECORD +56 -49
  54. fractal_server/app/routes/api/v2/status_legacy.py +0 -156
  55. {fractal_server-2.18.6.dist-info → fractal_server-2.19.0.dist-info}/WHEEL +0 -0
  56. {fractal_server-2.18.6.dist-info → fractal_server-2.19.0.dist-info}/entry_points.txt +0 -0
  57. {fractal_server-2.18.6.dist-info → fractal_server-2.19.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,52 @@
1
+ """add fractal_server_version to jobv2 and taskgroupactivityv2
2
+
3
+ Revision ID: cfd13f7954e7
4
+ Revises: 18a26fcdea5d
5
+ Create Date: 2026-01-29 12:33:00.064562
6
+
7
+ """
8
+
9
+ import sqlalchemy as sa
10
+ from alembic import op
11
+
12
+ # revision identifiers, used by Alembic.
13
+ revision = "cfd13f7954e7"
14
+ down_revision = "18a26fcdea5d"
15
+ branch_labels = None
16
+ depends_on = None
17
+
18
+
19
+ def upgrade() -> None:
20
+ # ### commands auto generated by Alembic - please adjust! ###
21
+ with op.batch_alter_table("jobv2", schema=None) as batch_op:
22
+ batch_op.add_column(
23
+ sa.Column(
24
+ "fractal_server_version",
25
+ sa.String(),
26
+ server_default="pre-2.19.0",
27
+ nullable=False,
28
+ )
29
+ )
30
+
31
+ with op.batch_alter_table("taskgroupactivityv2", schema=None) as batch_op:
32
+ batch_op.add_column(
33
+ sa.Column(
34
+ "fractal_server_version",
35
+ sa.String(),
36
+ server_default="pre-2.19.0",
37
+ nullable=False,
38
+ )
39
+ )
40
+
41
+ # ### end Alembic commands ###
42
+
43
+
44
+ def downgrade() -> None:
45
+ # ### commands auto generated by Alembic - please adjust! ###
46
+ with op.batch_alter_table("taskgroupactivityv2", schema=None) as batch_op:
47
+ batch_op.drop_column("fractal_server_version")
48
+
49
+ with op.batch_alter_table("jobv2", schema=None) as batch_op:
50
+ batch_op.drop_column("fractal_server_version")
51
+
52
+ # ### end Alembic commands ###
@@ -0,0 +1,36 @@
1
+ """add UserOAuth.is_guest
2
+
3
+ Revision ID: e53dc51fdf93
4
+ Revises: 068496367952
5
+ Create Date: 2026-01-14 14:32:25.044504
6
+
7
+ """
8
+
9
+ import sqlalchemy as sa
10
+ from alembic import op
11
+
12
+ # revision identifiers, used by Alembic.
13
+ revision = "e53dc51fdf93"
14
+ down_revision = "068496367952"
15
+ branch_labels = None
16
+ depends_on = None
17
+
18
+
19
+ def upgrade() -> None:
20
+ # ### commands auto generated by Alembic - please adjust! ###
21
+ with op.batch_alter_table("user_oauth", schema=None) as batch_op:
22
+ batch_op.add_column(
23
+ sa.Column(
24
+ "is_guest", sa.BOOLEAN(), server_default="false", nullable=False
25
+ )
26
+ )
27
+
28
+ # ### end Alembic commands ###
29
+
30
+
31
+ def downgrade() -> None:
32
+ # ### commands auto generated by Alembic - please adjust! ###
33
+ with op.batch_alter_table("user_oauth", schema=None) as batch_op:
34
+ batch_op.drop_column("is_guest")
35
+
36
+ # ### end Alembic commands ###
@@ -13,7 +13,6 @@ from typing import Protocol
13
13
 
14
14
  from sqlalchemy.orm import Session as DBSyncSession
15
15
 
16
- from fractal_server import __VERSION__
17
16
  from fractal_server.app.db import DB
18
17
  from fractal_server.app.models.v2 import DatasetV2
19
18
  from fractal_server.app.models.v2 import JobV2
@@ -224,7 +223,6 @@ def submit_workflow(
224
223
  f'Start execution of workflow "{workflow.name}"; '
225
224
  f"more logs at {str(log_file_path)}"
226
225
  )
227
- logger.debug(f"fractal_server.__VERSION__: {__VERSION__}")
228
226
  logger.debug(f"Resource name: {resource.name}")
229
227
  logger.debug(f"Profile name: {profile.name}")
230
228
  logger.debug(f"Username: {profile.username}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fractal-server
3
- Version: 2.18.6
3
+ Version: 2.19.0
4
4
  Summary: Backend component of the Fractal analytics platform
5
5
  Author: Tommaso Comparin, Marco Franzon, Yuri Chiucconi, Jacopo Nespolo
6
6
  Author-email: Tommaso Comparin <tommaso.comparin@exact-lab.it>, Marco Franzon <marco.franzon@exact-lab.it>, Yuri Chiucconi <yuri.chiucconi@exact-lab.it>, Jacopo Nespolo <jacopo.nespolo@exact-lab.it>
@@ -17,7 +17,7 @@ Requires-Dist: pydantic>=2.12.0,<2.13.0
17
17
  Requires-Dist: pydantic-settings==2.12.0
18
18
  Requires-Dist: packaging>=25.0.0,<26.0.0
19
19
  Requires-Dist: fabric>=3.2.2,<3.3.0
20
- Requires-Dist: gunicorn>=23.0,<24.0
20
+ Requires-Dist: gunicorn>=24.1,<25
21
21
  Requires-Dist: psycopg[binary]>=3.1.0,<4.0.0
22
22
  Requires-Dist: tomli-w>=1.2.0,<1.3.0
23
23
  Requires-Python: >=3.12, <3.15
@@ -1,4 +1,4 @@
1
- fractal_server/__init__.py,sha256=8bUDUYK1WiiLbGAi77y3BEN7scczf-cXLjHQfvbdlHc,23
1
+ fractal_server/__init__.py,sha256=1UbL9iwVuF5UCZ96vJT-FT78kHbhBr9fS7C7nat-FUo,23
2
2
  fractal_server/__main__.py,sha256=QeKoAgqoiozLJDa8kSVe-Aso1WWgrk1yLUYWS8RxZVM,11405
3
3
  fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
4
4
  fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -6,19 +6,19 @@ fractal_server/app/db/__init__.py,sha256=2b8wF-EBkEgFwWNoRD_ZKbfIf4eRCg74Epgwe2B
6
6
  fractal_server/app/models/__init__.py,sha256=oglUT1A1lLhXy2GFz3XsQ7wqkyfs3NXRtuNov-gOHXM,368
7
7
  fractal_server/app/models/linkusergroup.py,sha256=3KkkE4QIUAlTrBAZs_tVy0pGvAxUAq6yOEjflct_z2M,678
8
8
  fractal_server/app/models/linkuserproject.py,sha256=Bk0VzjzG7RbnVnOwrztqxKIPxz_AsUynXVxyMWHCbXA,1109
9
- fractal_server/app/models/security.py,sha256=Wh25Vk_lTU-qwgwCNn_m5FEfj_dlY-yk5ASsfK_blyQ,4592
9
+ fractal_server/app/models/security.py,sha256=2gKF2JQX2Xpb58fW-s7UgkgUneEy5SspgawawWoju3M,4970
10
10
  fractal_server/app/models/v2/__init__.py,sha256=xL05Mvdx0dqUFhJf694oPfuqkUQxZbxOkoUgRuNIXl4,949
11
11
  fractal_server/app/models/v2/accounting.py,sha256=VNweFARrvY3mj5LI0834Ku061S2aGC61kuVHzi_tZhc,1187
12
- fractal_server/app/models/v2/dataset.py,sha256=BL5elDU0UXnUSwvuXSO4JeKa9gje0QFerU_LP7sI754,1273
12
+ fractal_server/app/models/v2/dataset.py,sha256=5UEV75LZTYAOq5d8UqRAuIIVBh3rAer3D5qvWmGbw8s,1154
13
13
  fractal_server/app/models/v2/history.py,sha256=869RQzBssHFYnBLBvCGlKrLV_HAXwsdO5DgwG9U8D-U,2339
14
- fractal_server/app/models/v2/job.py,sha256=IwlOPgx4FU-6PsPd_aBJRGsp5qVXddRBv6xxSMdh524,2360
14
+ fractal_server/app/models/v2/job.py,sha256=-9PKE5Gh9UCBStYE0DZj3I8XTPDa5qd7g2eVufp-9hw,2521
15
15
  fractal_server/app/models/v2/profile.py,sha256=YajSmV4J_-zC4RX917s-A_lJt4mxYdPRVS3RH_uvJ48,1006
16
16
  fractal_server/app/models/v2/project.py,sha256=VvLXrgzKYLH585mYg_txrO8q3JoSoSEy4XkWjex4sDU,585
17
17
  fractal_server/app/models/v2/resource.py,sha256=XaHlJj9CladIahkrpywWXn8JBSx7_qEHp_wnkFuQ0rU,3896
18
- fractal_server/app/models/v2/task.py,sha256=iBIQB8POQE5MyKvLZhw7jZWlBhbrThzCDzRTcgiAczQ,1493
19
- fractal_server/app/models/v2/task_group.py,sha256=C03LGKIO61Asj7Qz7qeIrZwWdfzoXBliLCeb9jzT5WI,4595
20
- fractal_server/app/models/v2/workflow.py,sha256=AsL7p8UMGbow--21IG2lYZnOjQ--m85dRWaNCHqb35I,1069
21
- fractal_server/app/models/v2/workflowtask.py,sha256=qkTc-hcFLpJUVsEUbnDq2BJL0qg9jagy2doZeusF1ek,1266
18
+ fractal_server/app/models/v2/task.py,sha256=v0brBHnAbcHrgDiuRHMWYahklq0fgyezZ0c9krKSA10,1463
19
+ fractal_server/app/models/v2/task_group.py,sha256=8UcyFMG-6J-_hkgSkrLIxFLSwVCyrWB0Fl-LCgkeo54,4756
20
+ fractal_server/app/models/v2/workflow.py,sha256=VKXIX3L3jP8eCdIQhVf5AhhwKGO_LTxn7uB4_sCirLs,1135
21
+ fractal_server/app/models/v2/workflowtask.py,sha256=jEt81PGHuXSY8MYid0t15CntIIg0Lzq39uvG4X4Mx6s,1391
22
22
  fractal_server/app/routes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
23
  fractal_server/app/routes/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  fractal_server/app/routes/admin/v2/__init__.py,sha256=VF4wg09fvz6gVgIFe-r7LoCU9tlF9kBcEhkQRQPhatY,1134
@@ -28,60 +28,62 @@ fractal_server/app/routes/admin/v2/impersonate.py,sha256=ictDjuvBr3iLv3YtwkVRMNQ
28
28
  fractal_server/app/routes/admin/v2/job.py,sha256=VaVMUrHV7edHyjp2rsqoWf-wh5zlXFM-VjXIlxBnwG0,10795
29
29
  fractal_server/app/routes/admin/v2/profile.py,sha256=DwLlA9K3hkl9BqzyifIDiaWeHOM_N_17kqB5CSJOhSI,3165
30
30
  fractal_server/app/routes/admin/v2/resource.py,sha256=c2z6b_D_W6_dqVnxNF8F8OdlI5Z4asex8Zgfwzjbi2Q,6330
31
- fractal_server/app/routes/admin/v2/sharing.py,sha256=x7RtbDPapyENEU_s4-glPoEeEOxxj2VBgduVQ1V7wkE,3796
32
- fractal_server/app/routes/admin/v2/task.py,sha256=M4cetPkzn73-6faftk49AU_PeaPLqKE_dZxrrQ_x_98,6087
31
+ fractal_server/app/routes/admin/v2/sharing.py,sha256=I2BoyO0rZNWxFKyq3Em9sjz_0n3kfRynC-WmUZxSzzU,5455
32
+ fractal_server/app/routes/admin/v2/task.py,sha256=9OglWWYjGbA1k2wdE8k8vr2ynLn6zqdp_BxwPGfjj9A,5873
33
33
  fractal_server/app/routes/admin/v2/task_group.py,sha256=3LxH2LEstj7L9qGNN3kkLo4JdFw4GXDlnlM6s4ulc_0,9377
34
- fractal_server/app/routes/admin/v2/task_group_lifecycle.py,sha256=LkHSQVXRRUkicpIDQpc7dwT944uabtCTTrZCoESHjik,9935
35
- fractal_server/app/routes/api/__init__.py,sha256=GaNOm1elJLldHNWZ482qlvETLAXhdJ8u_X6kGxMmwQs,1409
36
- fractal_server/app/routes/api/v2/__init__.py,sha256=_J8ekQqNGJ3DC1mKum8m8SNOcv66oZ7A260MFjcEtGE,2710
34
+ fractal_server/app/routes/admin/v2/task_group_lifecycle.py,sha256=mC7zKuoyDZSOOuOiXiQeGfFv78JYHFBQ9RNtNAdAQfQ,10202
35
+ fractal_server/app/routes/api/__init__.py,sha256=ZQtqy-HGJZsehAL8UjnTvRhWd9MI9Noi2NvwD5hE_xA,231
36
+ fractal_server/app/routes/api/alive.py,sha256=hE42dfh1naix9EKvpyKCoLMA6WqThObgA3jIro2rx-M,206
37
+ fractal_server/app/routes/api/settings.py,sha256=9wV4To1FjW3jCcRtFp-QGGu3235s1oUg4HwKQIw-TWc,1210
38
+ fractal_server/app/routes/api/v2/__init__.py,sha256=_pNH8odiUYpv2Okiqbqe0VNjbvK2jWqIoaImlgYzI84,2580
37
39
  fractal_server/app/routes/api/v2/_aux_functions.py,sha256=pxXcauCMZEVKkft8nOCK_Nq5m7hkx7BVUXch_j2KVtg,15131
38
40
  fractal_server/app/routes/api/v2/_aux_functions_history.py,sha256=vB8AwSBf3Dp1sxpTAYtWj4s9kgAp_D5Hd1BX6Z8JTxc,6057
39
41
  fractal_server/app/routes/api/v2/_aux_functions_sharing.py,sha256=IvDII3Sl00eypdD3QRELQ4SLyC3gq6-HsXhuCx5Bp5I,2995
40
- fractal_server/app/routes/api/v2/_aux_functions_task_lifecycle.py,sha256=qTJdKC3nKLwLYfuKbzJW6tREmzy-dNk57xcmvgi_UDA,8529
42
+ fractal_server/app/routes/api/v2/_aux_functions_task_lifecycle.py,sha256=EffjYdQCHoUc5i59c7KmyH8hoLYxQsPh4RPo8qY8CYA,7796
41
43
  fractal_server/app/routes/api/v2/_aux_functions_task_version_update.py,sha256=PKjV7r8YsPRXoNiVSnOK4KBYVV3l_Yb_ZPrqAkMkXrQ,1182
42
44
  fractal_server/app/routes/api/v2/_aux_functions_tasks.py,sha256=Hrumknv0vH5VX7SFp8WZDzsJv_z7quvFyNoDYmYoD7A,13623
43
45
  fractal_server/app/routes/api/v2/_aux_task_group_disambiguation.py,sha256=vdvMTa3San1HMTzctN5Vk7zxpqe4ccByrFBQyHfgWW8,4889
44
- fractal_server/app/routes/api/v2/dataset.py,sha256=HZGJezPqzbU1PYlFZfQSOj-ONmhtitCv6I7SDORGiPg,8515
45
- fractal_server/app/routes/api/v2/history.py,sha256=-aLwLhDLDqwKFy3JrM1vFswyBPdolMXlH3sS7OiQsK8,18339
46
- fractal_server/app/routes/api/v2/images.py,sha256=gaLHglxN9VwhNQP6uD9Ij-qaMJWC6zFcj_TcM1V8_AI,8245
47
- fractal_server/app/routes/api/v2/job.py,sha256=nrfus2bD49Ww4E6I3vTCrOqRnXjnsHMk4KxtKYCrIp0,7352
48
- fractal_server/app/routes/api/v2/pre_submission_checks.py,sha256=Cs_ODoRWmkbSJJhlIE7pQh9JuJGXZTAr-EVF6wqKNGA,5215
49
- fractal_server/app/routes/api/v2/project.py,sha256=sRlmNntaTm7LYCwjVhgnpYE0O8gCWDjOwIR6k2hoMUM,5748
50
- fractal_server/app/routes/api/v2/sharing.py,sha256=MvegcF3xaT9nztVwLiUisp4B8IrKRa2LVlSR2GGTqYk,9398
51
- fractal_server/app/routes/api/v2/status_legacy.py,sha256=XfU7sJS3luPziGzGxjiLmrLe4P-8OyBU7hTdcYmcyB8,6026
52
- fractal_server/app/routes/api/v2/submit.py,sha256=YCeMLXhHzouQbjR_Rh3Rdw-htBGOpznEeWIdAVf3AIk,9570
53
- fractal_server/app/routes/api/v2/task.py,sha256=uIVjb_J-kGu38ddy7lsYFHVF2lT1FyJtT1J1CM6AsVU,7437
54
- fractal_server/app/routes/api/v2/task_collection.py,sha256=DC_qI7cv-4eT2be8opcU3LfkzXjNvLoo4FPCfT77UM0,12348
55
- fractal_server/app/routes/api/v2/task_collection_custom.py,sha256=gzllPiZp94rNfmAZMegS0B6wZZa-JPvqrapsWb9dyeY,6920
56
- fractal_server/app/routes/api/v2/task_collection_pixi.py,sha256=wed_nciaJrDFfjhUiORTnsStWUSk3wfQUehsZUurwgk,7172
57
- fractal_server/app/routes/api/v2/task_group.py,sha256=2ocRRQ1dTzrGl01hIsl39vP3ckRuBJqy2Usg19Hkw2Q,8365
58
- fractal_server/app/routes/api/v2/task_group_lifecycle.py,sha256=T0nDJpqZl1SEzp-Jtwf8YY0rJVTNis4Lv7CQXY8CH-Y,10523
59
- fractal_server/app/routes/api/v2/task_version_update.py,sha256=W6UXmh2ngqMBkSSHyP3eOyakd6y7rBFTbDq4jd45QaM,8487
60
- fractal_server/app/routes/api/v2/workflow.py,sha256=TFmZsojPqcxawNC6PdgfDrgapG9808Lj6f9Gdzp5eSc,10752
61
- fractal_server/app/routes/api/v2/workflow_import.py,sha256=mf5u2q9XRDOGa0-gbDmJKNsJj9zbBdzkJvrWRz2CEyY,9646
62
- fractal_server/app/routes/api/v2/workflowtask.py,sha256=QZSRiH2vy8W-Tns8aBRGD9rl81XRyaltB8UKHOtRIC4,8233
63
- fractal_server/app/routes/auth/__init__.py,sha256=RghfjGuu0RTW8RxBCvaePx9KErO4rTkI96XgbtbeSJU,2337
46
+ fractal_server/app/routes/api/v2/dataset.py,sha256=O2wzEpQSSmC4SAzP3t9YQFL8eKt_zkbdKddhSp2SWbs,8471
47
+ fractal_server/app/routes/api/v2/history.py,sha256=wKiNhYCA8Ioemvr721nZVY4n9PMwIVnG48cgiQ0Fmhw,18243
48
+ fractal_server/app/routes/api/v2/images.py,sha256=N32PCbwY0-CWLMMN8GMwcc8QKZwhQsDowZqLJll_s9s,8238
49
+ fractal_server/app/routes/api/v2/job.py,sha256=gulXJyP0Kc2_dNkPHPpc_XZlWoBEA1lrrBt3h8rP_6E,7332
50
+ fractal_server/app/routes/api/v2/pre_submission_checks.py,sha256=wqZ44rCJ8f2WcpyFOQ0FZN3g-66EzDnuYCrJJXawSdY,5179
51
+ fractal_server/app/routes/api/v2/project.py,sha256=dirGShqcuEnK1sVh-Bl6kemj_z6A32s8ARNqSLIFhM8,5729
52
+ fractal_server/app/routes/api/v2/sharing.py,sha256=W8Zf_rmTJwbFYz3XCrL9IFN6KXph5c97YS6Ok8oHTHM,9658
53
+ fractal_server/app/routes/api/v2/submit.py,sha256=fhWLAsD-XgEunUfZpoSDsTpuYl3wReKAPg811iAmFRU,9642
54
+ fractal_server/app/routes/api/v2/task.py,sha256=xKeGon7aRBOu1gnYd9EnWW1V-pnIqSVpXkN3dnubH3A,7418
55
+ fractal_server/app/routes/api/v2/task_collection.py,sha256=VkxPwkKxQxvKJJL8ShkGVT4YolX5KjP8yLBaNS7WkP8,12405
56
+ fractal_server/app/routes/api/v2/task_collection_custom.py,sha256=yZ0c3hWkq3nR5CKYP63yU6D1--xWjS2aimqoYWrQT5I,6894
57
+ fractal_server/app/routes/api/v2/task_collection_pixi.py,sha256=IT-vhTFPUpMA2kY4z8i5us03vQCTquEvjjH7k7bgYVg,7229
58
+ fractal_server/app/routes/api/v2/task_group.py,sha256=Jemgrc_1qA6b8at48BePMLJennterLIpJwoa077jMmc,7632
59
+ fractal_server/app/routes/api/v2/task_group_lifecycle.py,sha256=0iv4MOCesCngujiMUU9i3EdPADnoGIilXrR2Rc1yY04,10738
60
+ fractal_server/app/routes/api/v2/task_version_update.py,sha256=dFzUetvIkd0RXw-cgOGGQGu8843y62AG30RbCQL15Tc,8506
61
+ fractal_server/app/routes/api/v2/workflow.py,sha256=lHssUNN3ekqvXp4wWX8a33-5m2ZwLuLPkoL3keCsFhA,10741
62
+ fractal_server/app/routes/api/v2/workflow_import.py,sha256=UND3U9zE-2o_85BW0uWNsm3_9125PgDtnUlki13jDT4,8740
63
+ fractal_server/app/routes/api/v2/workflowtask.py,sha256=vn3pvaCIC9ydJYwboDAFT61IWRIJ6uYe5p3u4W9iloQ,7962
64
+ fractal_server/app/routes/auth/__init__.py,sha256=JL4MUBjPiNsNJLlb0lbn6_LbIzdRLosquQNqpn6niFw,2836
64
65
  fractal_server/app/routes/auth/_aux_auth.py,sha256=gKdYTWUzxcU44Iep787zReWwdAs4kW5baNDXCPmiKn8,9195
65
- fractal_server/app/routes/auth/current_user.py,sha256=uDWttWo9isG69Jv1EGnnr2Ki5ZGd0D76jgjVDQMkn8c,3251
66
+ fractal_server/app/routes/auth/current_user.py,sha256=gOLk-jUnkXTrBj8aN_yRlUcvCoJMHxxoWz13M8DBCbg,3502
66
67
  fractal_server/app/routes/auth/group.py,sha256=uR98vdQHH-7BFl-Czj85ESPxT2yQymy4qtagaMrnUPU,6491
67
68
  fractal_server/app/routes/auth/login.py,sha256=buVa5Y8T0cd_SW1CqC-zMv-3SfPxGJknf7MYlUyKOl0,567
68
69
  fractal_server/app/routes/auth/oauth.py,sha256=dOt1bWz1viW36CAnHVLmLkYzdCHUMdOhdTNgoQp-VvU,3663
69
70
  fractal_server/app/routes/auth/register.py,sha256=IiUJhgY0ZrTs0RlBRRjoTv4wF5Gb3eXTInFV-dXkpsE,615
70
71
  fractal_server/app/routes/auth/router.py,sha256=Zip_fw9qJWtoXWjluznschyrCKb2n_rf3xWarSXMkgI,692
71
- fractal_server/app/routes/auth/users.py,sha256=5BagdH1dz-ZoXdvTgIo9QWBNFPW3p1pIZfY9BBu4eds,7397
72
+ fractal_server/app/routes/auth/users.py,sha256=tt9rsnVOXTVnHSWtIbY8f6RtnBl2UFwmH1yg9tE_lL4,7753
72
73
  fractal_server/app/routes/auth/viewer_paths.py,sha256=uDIwP3AWjLOskG2ZSMUokmn6DWJX2NSviG6k4hiJRSU,1911
73
74
  fractal_server/app/routes/aux/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
75
  fractal_server/app/routes/aux/_job.py,sha256=n-UhONvomKyKkQDDqd0lFh2kCMhlCGXpfdMNW39R1E4,644
75
76
  fractal_server/app/routes/aux/_runner.py,sha256=-SvcXCVEV7Mb6q4PbbxuTCCruX6sAlR5QGXk9CzBVv8,979
77
+ fractal_server/app/routes/aux/_versions.py,sha256=6ZnH5KcLlJXACfZsFXhgARQcp2AwekIaaTVz68H6HWs,1527
76
78
  fractal_server/app/routes/aux/validate_user_profile.py,sha256=fGqJDdAFkbQoEIjqZ5F9-SDY_4os63R2EUMqODC7eBg,1969
77
79
  fractal_server/app/routes/pagination.py,sha256=C4XW6cnyDfyu1XMHXRN4wgk72lsS0UtlINZmwGZFb4Y,1174
78
80
  fractal_server/app/schemas/__init__.py,sha256=VIWJCaqokte3OljDLX00o-EC2d12rFoPb5HOLKQI94Y,86
79
- fractal_server/app/schemas/user.py,sha256=qixLVZWeANxX5TIWoruLjYE_oh4DMZ2q3vMgMBsnzQE,3294
81
+ fractal_server/app/schemas/user.py,sha256=ncPPxl6DsF_YDsEKJ1idTpAZTsVyh1iC9p4KfK25WZ4,3421
80
82
  fractal_server/app/schemas/user_group.py,sha256=irel29GbffKCXNcyrAYbNSN3pCgmoUQ1wG32_s6jvos,1082
81
- fractal_server/app/schemas/v2/__init__.py,sha256=6W1uSthuLGXs9oOYnjmScoqJYkWyUTT-9cNHFZoTmkM,4005
83
+ fractal_server/app/schemas/v2/__init__.py,sha256=cYyOsr-6jttq1jzRNa_tOuCXPp3zwV3jBDR72F4u4vU,3957
82
84
  fractal_server/app/schemas/v2/accounting.py,sha256=6EVUdPTkFY6Wb9-Vc0cIEZYVXwGEvJ3tP4YOXYE1hao,546
83
85
  fractal_server/app/schemas/v2/dataset.py,sha256=SBS3TwHxPRHtLvFu-Bm4eQlI96DIkCiFF7oKvfcfTOc,2736
84
- fractal_server/app/schemas/v2/dumps.py,sha256=UPtb1Rqkd48AFpWsVfcHcAjKGzF2ZoHLdYrAJzPdsSM,2276
86
+ fractal_server/app/schemas/v2/dumps.py,sha256=x3LK-Xq1OQgp7waAjy-5gaQVNbcF5JQNTqqPw86xkpM,2246
85
87
  fractal_server/app/schemas/v2/history.py,sha256=pZiMKfh6nMWbTp5MUtrnGySPKbeRFf5tM1VLFaTgGcw,1784
86
88
  fractal_server/app/schemas/v2/job.py,sha256=YnnxnrbI_l7EgZNzk_KgnuEuh0COg-RPoph2foHUvZo,3308
87
89
  fractal_server/app/schemas/v2/manifest.py,sha256=I8KyVZvW6r6_DrcKX5aZ9zJwa-Kk_u3gCKlz6HVPF5o,6655
@@ -90,12 +92,12 @@ fractal_server/app/schemas/v2/project.py,sha256=jTc4jhwdkO1Ht2K27AguA0z9wWX0CYKv
90
92
  fractal_server/app/schemas/v2/resource.py,sha256=LPi1D67vGngOn5BWNicqAIHCKExaf2XyzuZKByo7wfc,6841
91
93
  fractal_server/app/schemas/v2/sharing.py,sha256=wHBiEmqhU53NokQ2rmm6xkH3lumBR6TdWw4nvDz6uww,1818
92
94
  fractal_server/app/schemas/v2/status_legacy.py,sha256=ajLm2p0wNfJ_lQX9Oq3NJn0jxQj50U3eZxuRjOIdOpg,949
93
- fractal_server/app/schemas/v2/task.py,sha256=Fd4n6vitliOuQyoofQ0daFy25QzIoWe9NPbXanNyrrE,4351
95
+ fractal_server/app/schemas/v2/task.py,sha256=le62bHu4nRrXlN-cCOdpkStLQNLtkR_myqK1j8fLoNs,4260
94
96
  fractal_server/app/schemas/v2/task_collection.py,sha256=ljGnZOmYg9pQ9PbYnNxLJDf4O2BDym-BQ_cXr-NWSd4,4590
95
97
  fractal_server/app/schemas/v2/task_group.py,sha256=sbg6AkvonU7F_-QC4G9kDxO6YVcz7wUPY3k3n9jYkRY,3392
96
- fractal_server/app/schemas/v2/workflow.py,sha256=87Aa92H6ceBbkDUsDhDqVNJyuBZuVRRAgFqNeg_djwE,1738
97
- fractal_server/app/schemas/v2/workflowtask.py,sha256=1k56KHwzZDZGjl7FG1yslj-MKtKKR5fZ5RKGlJbopNc,3608
98
- fractal_server/app/security/__init__.py,sha256=sblIH9DFCt_iyk22WzV6k4LuKdbvNPtS1HqPCHIiBJ4,18363
98
+ fractal_server/app/schemas/v2/workflow.py,sha256=m-udZHvOFokjaD3cGdTMHdtC8qHLNlmx7PsCEgcvN7U,1801
99
+ fractal_server/app/schemas/v2/workflowtask.py,sha256=sAzu6ZHWGgwvQgviIZJB3J6X79TxchlClkqzNHMlxTo,3683
100
+ fractal_server/app/security/__init__.py,sha256=Z-xQjt5jx6ldBBrz1iJ0IQ-SLKbv8Gq7fQ4U18NAxXc,18471
99
101
  fractal_server/app/security/signup_email.py,sha256=R69U5eTi9X7gZHSTfZ26SaHMQAeqReYEpGnB8r3AVig,1992
100
102
  fractal_server/app/shutdown.py,sha256=bfEmf6Xdc906ES0zDDWsihmd6neQpGFyIc7qnadnNu8,2283
101
103
  fractal_server/config/__init__.py,sha256=WvcoE3qiY1qnkumv3qspcemCFw5iFG5NkSFR78vN4ks,562
@@ -120,8 +122,10 @@ fractal_server/migrations/versions/034a469ec2eb_task_groups.py,sha256=uuf0sJibC4
120
122
  fractal_server/migrations/versions/068496367952_drop_taskgroup_venv_size_and_files_.py,sha256=rVFmB7eO7LtOfJivNnfnniQecD8DebAWnSvYEE2yq7k,1239
121
123
  fractal_server/migrations/versions/091b01f51f88_add_usergroup_and_linkusergroup_table.py,sha256=cSz3Jc2X79dN7I-rh0OSefOd5WOJU65wNWFNMnX2LR4,1450
122
124
  fractal_server/migrations/versions/0f5f85bb2ae7_add_pre_pinned_packages.py,sha256=XH6msE3On7P7S2gz-Xec20bWAI6vR29zRT1ZafFwStI,1056
125
+ fractal_server/migrations/versions/18a26fcdea5d_drop_dataset_history.py,sha256=AzCnz-PJCzKw8Sm28zN1cIrHexgv-5Bcw5dGIxkzDOU,1064
123
126
  fractal_server/migrations/versions/19eca0dd47a9_user_settings_project_dir.py,sha256=5OzcIQjTfwiqh9vK_yLQHJlNtIHxKiEPr-IjZ9iir-Y,961
124
127
  fractal_server/migrations/versions/1a83a5260664_rename.py,sha256=BGZrM2UfccWc0s0kNlpACEw1LB1K6AemHPR5irkJ1gA,790
128
+ fractal_server/migrations/versions/1bf8785755f9_add_description_to_workflow_and_.py,sha256=OVugy2ftELqAE8_6zTGiwwpDxj1STmf8XNHOa8TBr6o,1507
125
129
  fractal_server/migrations/versions/1eac13a26c83_drop_v1_tables.py,sha256=DGdm1Q58UHfQ-6GAg0ucyKCiMxXb1JzELYQ50d1f5bo,1605
126
130
  fractal_server/migrations/versions/316140ff7ee1_remove_usersettings_cache_dir.py,sha256=5gIIZp3Apc2fTiUoHEvd-k34W-HIq7cjFt7Fwqjq6lE,911
127
131
  fractal_server/migrations/versions/40d6d6511b20_add_index_to_history_models.py,sha256=dZglAP0b3_YAeYc7Pphxs9iI73icSaMkgku7R6MaPL0,1357
@@ -133,6 +137,7 @@ fractal_server/migrations/versions/4cedeb448a53_workflowtask_foreign_keys_not_nu
133
137
  fractal_server/migrations/versions/501961cfcd85_remove_link_between_v1_and_v2_tasks_.py,sha256=SeBUvMEikyl4qkCjiOgkkqbcIeaim57EPuufjFh_X8k,3271
134
138
  fractal_server/migrations/versions/50a13d6138fd_initial_schema.py,sha256=sh0tB5K35ui8bfvBPI2jwDkeNVDtdlGvWrvTeumA0iY,8654
135
139
  fractal_server/migrations/versions/5bf02391cfef_v2.py,sha256=jTNyZ8H5VDh4eRvCEy-WliXAu55kUybddsaTeexXr6c,8367
140
+ fractal_server/migrations/versions/5fb08bf05b14_drop_taskv2_source.py,sha256=bUs6xhVFGeCU4rR7yRdQXEXsns28lFUKBdcDsd-Bj4Q,880
136
141
  fractal_server/migrations/versions/70e77f1c38b0_add_applyworkflow_first_task_index_and_.py,sha256=vJ6nDb7UnkCMIPg2zNM7ZE0JOTvaqFL3Fe9UarP-ivM,1633
137
142
  fractal_server/migrations/versions/71eefd1dd202_add_slurm_accounts.py,sha256=qpHZC97AduFk5_G0xHs9akhnhpzb1LZooYCTPHy7n28,1353
138
143
  fractal_server/migrations/versions/7673fe18c05d_remove_project_dir_server_default.py,sha256=PwTfY9Kq3_cwb5G4E0sM9u7UjzOhOwsYCspymmPgipQ,795
@@ -160,11 +165,13 @@ fractal_server/migrations/versions/b7477cc98f45_2_18_1.py,sha256=clKGCwh95sWFTeU
160
165
  fractal_server/migrations/versions/bc0e8b3327a7_project_sharing.py,sha256=5h8ogjfQPbKbVwN0-pfh5ixPQSCCYsiVnQoOveUKKUA,2145
161
166
  fractal_server/migrations/versions/c90a7c76e996_job_id_in_history_run.py,sha256=CPQNKHqsx22wSY4ylqM8UMhDOWkQeC9eLAHlQQJYSfQ,1102
162
167
  fractal_server/migrations/versions/caba9fb1ea5e_drop_useroauth_user_settings_id.py,sha256=7MpunfOBk0LM6u-xrwca8GUHIjinAJZrS9AUT3l62qU,1320
168
+ fractal_server/migrations/versions/cfd13f7954e7_add_fractal_server_version_to_jobv2_and_.py,sha256=rqF1f3j5exatdKyeEvccX-TMC_bcZEFcHmixguOQRqw,1447
163
169
  fractal_server/migrations/versions/d256a7379ab8_taskgroup_activity_and_venv_info_to_.py,sha256=bFMJUFJAnOaHYyYYKISHpbQWKBoQopiEKRT0PSidqhk,3796
164
170
  fractal_server/migrations/versions/d4fe3708d309_make_applyworkflow_workflow_dump_non_.py,sha256=zLHqar9iduiLs5Ib50B9RKrdLLbWSffahWxXDDePnI8,950
165
171
  fractal_server/migrations/versions/da2cb2ac4255_user_group_viewer_paths.py,sha256=-ihE-KJEVemb8ZhRejg6xdC5TPTW8GkKWnzcl1ReAHQ,901
166
172
  fractal_server/migrations/versions/db09233ad13a_split_filters_and_keep_old_columns.py,sha256=mOaFWcay-rznXcM9cdmGqA9EgM9Qn0dOjUOOs8RHKiQ,2907
167
173
  fractal_server/migrations/versions/e0e717ae2f26_delete_linkuserproject_ondelete_project.py,sha256=wmxB9EOIUHpFiCVhQIsCBnC2deMUbrsZTOgQSUAgSAo,1409
174
+ fractal_server/migrations/versions/e53dc51fdf93_add_useroauth_is_guest.py,sha256=fxc6JrgRmGZQxyiQI4LPXqHuTVqPfCtAOtMNbjY6JBE,900
168
175
  fractal_server/migrations/versions/e75cac726012_make_applyworkflow_start_timestamp_not_.py,sha256=x6eCYsx_Cb7yDC5K_gV2RNHeCF_K-964NtZF1mmxUb0,964
169
176
  fractal_server/migrations/versions/e81103413827_add_job_type_filters.py,sha256=w0HYX1645_JXsfUB259OrmXLUasOgRnpKvJJaF44GpQ,890
170
177
  fractal_server/migrations/versions/efa89c30e0a4_add_project_timestamp_created.py,sha256=3ppXZxLsljAlN5Def9lHuEZlf_7hMXaIIeTV2N5zUXY,1222
@@ -213,7 +220,7 @@ fractal_server/runner/v2/deduplicate_list.py,sha256=TWxHDucal0VZPswy_H7IFaEb4ddG
213
220
  fractal_server/runner/v2/merge_outputs.py,sha256=0ahaSwdMFAoEhxVaEaO9nSJuKIcWg9pDZ356ktSHcC0,897
214
221
  fractal_server/runner/v2/runner.py,sha256=aKz5ocgsMcUUsvaz00db8cWbBHMBA_g_PJhwV973pdY,20884
215
222
  fractal_server/runner/v2/runner_functions.py,sha256=1wW2ByskwPtx_mhyJiCpKMXDnDyZ_y5fDWv8hktFZXI,19564
216
- fractal_server/runner/v2/submit_workflow.py,sha256=FSqXF0_BzhNMRGqYxdjwSVD5rdonk4fTL6Fkp31O_fQ,11867
223
+ fractal_server/runner/v2/submit_workflow.py,sha256=MNUyBlXKfPjSbJgB5HlpAhXPvDeuMtPXc2h6HHmJkU0,11761
217
224
  fractal_server/runner/v2/task_interface.py,sha256=ftPPpOU16rbJD8q-QV7o_3ey8W7MQTFuWJiYUr4OmF4,2532
218
225
  fractal_server/runner/versions.py,sha256=uz59Dxj7BphnFnr-p0kyaZRH0h4w5Xkd0UJNVGtt4ds,474
219
226
  fractal_server/ssh/__init__.py,sha256=sVUmzxf7_DuXG1xoLQ1_00fo5NPhi2LJipSmU5EAkPs,124
@@ -267,8 +274,8 @@ fractal_server/types/validators/_workflow_task_arguments_validators.py,sha256=zt
267
274
  fractal_server/urls.py,sha256=QjIKAC1a46bCdiPMu3AlpgFbcv6a4l3ABcd5xz190Og,471
268
275
  fractal_server/utils.py,sha256=-rjg8QTXQcKweXjn0NcmETFs1_uM9PGnbl0Q7c4ERPM,2181
269
276
  fractal_server/zip_tools.py,sha256=Uhn-ax4_9g1PJ32BdyaX30hFpAeVOv2tZYTUK-zVn1E,5719
270
- fractal_server-2.18.6.dist-info/licenses/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
271
- fractal_server-2.18.6.dist-info/WHEEL,sha256=eycQt0QpYmJMLKpE3X9iDk8R04v2ZF0x82ogq-zP6bQ,79
272
- fractal_server-2.18.6.dist-info/entry_points.txt,sha256=3TpdcjmETRYWJxFyAh3z-9955EWua9jdkSnBwxES1uE,60
273
- fractal_server-2.18.6.dist-info/METADATA,sha256=8kWN7fybjXbZX3Ull8rBcymWRBDqGRGkNlsSupUCyuM,4183
274
- fractal_server-2.18.6.dist-info/RECORD,,
277
+ fractal_server-2.19.0.dist-info/licenses/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
278
+ fractal_server-2.19.0.dist-info/WHEEL,sha256=eycQt0QpYmJMLKpE3X9iDk8R04v2ZF0x82ogq-zP6bQ,79
279
+ fractal_server-2.19.0.dist-info/entry_points.txt,sha256=3TpdcjmETRYWJxFyAh3z-9955EWua9jdkSnBwxES1uE,60
280
+ fractal_server-2.19.0.dist-info/METADATA,sha256=IxX_tJLqbH-qtYWusf2Q846BSHL9pIm6Pr7EcFTFuY0,4181
281
+ fractal_server-2.19.0.dist-info/RECORD,,
@@ -1,156 +0,0 @@
1
- from fastapi import APIRouter
2
- from fastapi import Depends
3
-
4
- from fractal_server.app.db import AsyncSession
5
- from fractal_server.app.db import get_async_db
6
- from fractal_server.app.models import UserOAuth
7
- from fractal_server.app.models.v2 import JobV2
8
- from fractal_server.app.routes.auth import current_user_act_ver_prof
9
- from fractal_server.app.schemas.v2.sharing import ProjectPermissions
10
- from fractal_server.app.schemas.v2.status_legacy import LegacyStatusRead
11
- from fractal_server.app.schemas.v2.status_legacy import WorkflowTaskStatusType
12
- from fractal_server.logger import set_logger
13
-
14
- from ._aux_functions import _get_dataset_check_access
15
- from ._aux_functions import _get_submitted_jobs_statement
16
- from ._aux_functions import _get_workflow_check_access
17
-
18
- router = APIRouter()
19
-
20
- logger = set_logger(__name__)
21
-
22
-
23
- @router.get(
24
- "/project/{project_id}/status-legacy/",
25
- response_model=LegacyStatusRead,
26
- )
27
- async def get_workflowtask_status(
28
- project_id: int,
29
- dataset_id: int,
30
- workflow_id: int,
31
- user: UserOAuth = Depends(current_user_act_ver_prof),
32
- db: AsyncSession = Depends(get_async_db),
33
- ) -> LegacyStatusRead | None:
34
- """
35
- Extract the status of all `WorkflowTaskV2` of a given `WorkflowV2` that ran
36
- on a given `DatasetV2`.
37
-
38
- *NOTE*: the current endpoint is not guaranteed to provide consistent
39
- results if the workflow task list is modified in a non-trivial way
40
- (that is, by adding intermediate tasks, removing tasks, or changing their
41
- order). See fractal-server GitHub issues: 793, 1083.
42
- """
43
- # Get the dataset DB entry
44
- output = await _get_dataset_check_access(
45
- project_id=project_id,
46
- dataset_id=dataset_id,
47
- user_id=user.id,
48
- required_permissions=ProjectPermissions.READ,
49
- db=db,
50
- )
51
- dataset = output["dataset"]
52
-
53
- # Get the workflow DB entry
54
- workflow = await _get_workflow_check_access(
55
- project_id=project_id,
56
- workflow_id=workflow_id,
57
- user_id=user.id,
58
- required_permissions=ProjectPermissions.READ,
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
- res = await db.execute(
66
- _get_submitted_jobs_statement()
67
- .where(JobV2.dataset_id == dataset_id)
68
- .where(JobV2.workflow_id == workflow_id)
69
- )
70
- running_job = res.scalars().one_or_none()
71
-
72
- # Initialize empty dictionary for WorkflowTaskV2 status
73
- workflow_tasks_status_dict: dict = {}
74
-
75
- # Lowest priority: read status from DB, which corresponds to jobs that are
76
- # not running
77
- history = dataset.history
78
- for history_item in history:
79
- wftask_id = history_item["workflowtask"]["id"]
80
- wftask_status = history_item["status"]
81
- workflow_tasks_status_dict[wftask_id] = wftask_status
82
-
83
- if running_job is None:
84
- # If no job is running, the chronological-last history item is also the
85
- # positional-last workflow task to be included in the response.
86
- if len(history) > 0:
87
- last_valid_wftask_id = history[-1]["workflowtask"]["id"]
88
- else:
89
- last_valid_wftask_id = None
90
- else:
91
- # If a job is running, then gather more up-to-date information
92
-
93
- # Mid priority: Set all WorkflowTask's that are part of the running job
94
- # as "submitted"
95
- start = running_job.first_task_index
96
- end = running_job.last_task_index + 1
97
-
98
- running_job_wftasks = workflow.task_list[start:end]
99
- running_job_statuses = [
100
- workflow_tasks_status_dict.get(wft.id, None)
101
- for wft in running_job_wftasks
102
- ]
103
- try:
104
- first_submitted_index = running_job_statuses.index(
105
- WorkflowTaskStatusType.SUBMITTED
106
- )
107
- except ValueError:
108
- logger.warning(
109
- f"Job {running_job.id} is submitted but its task list does not"
110
- f" contain a {WorkflowTaskStatusType.SUBMITTED} task."
111
- )
112
- first_submitted_index = 0
113
-
114
- for wftask in running_job_wftasks[first_submitted_index:]:
115
- workflow_tasks_status_dict[wftask.id] = (
116
- WorkflowTaskStatusType.SUBMITTED
117
- )
118
-
119
- # The last workflow task that is included in the submitted job is also
120
- # the positional-last workflow task to be included in the response.
121
- try:
122
- last_valid_wftask_id = workflow.task_list[end - 1].id
123
- except IndexError as e:
124
- logger.warning(
125
- f"Handled IndexError in `get_workflowtask_status` ({str(e)})."
126
- )
127
- logger.warning(
128
- "Additional information: "
129
- f"{running_job.first_task_index=}; "
130
- f"{running_job.last_task_index=}; "
131
- f"{len(workflow.task_list)=}; "
132
- f"{dataset_id=}; "
133
- f"{workflow_id=}."
134
- )
135
- last_valid_wftask_id = None
136
- logger.warning(f"Now setting {last_valid_wftask_id=}.")
137
-
138
- # Based on previously-gathered information, clean up the response body
139
- clean_workflow_tasks_status_dict = {}
140
- for wf_task in workflow.task_list:
141
- wf_task_status = workflow_tasks_status_dict.get(wf_task.id)
142
- if wf_task_status is None:
143
- # If a wftask ID was not found, ignore it and continue
144
- continue
145
- clean_workflow_tasks_status_dict[str(wf_task.id)] = wf_task_status
146
- if wf_task_status == WorkflowTaskStatusType.FAILED:
147
- # Starting from the beginning of `workflow.task_list`, stop the
148
- # first time that you hit a failed job
149
- break
150
- if wf_task.id == last_valid_wftask_id:
151
- # Starting from the beginning of `workflow.task_list`, stop the
152
- # first time that you hit `last_valid_wftask_id``
153
- break
154
-
155
- response_body = LegacyStatusRead(status=clean_workflow_tasks_status_dict)
156
- return response_body