Skip to content

Commit 9a39c6f

Browse files
committed
cleanup
1 parent 536220e commit 9a39c6f

File tree

4 files changed

+4
-19
lines changed

4 files changed

+4
-19
lines changed

services/director-v2/tests/helpers/shared_comp_utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import httpx
66
from models_library.api_schemas_directorv2.comp_tasks import ComputationGet
7-
from models_library.clusters import ClusterID
87
from models_library.projects import ProjectAtDB
98
from models_library.projects_pipeline import PipelineDetails
109
from models_library.projects_state import RunningState
@@ -26,8 +25,7 @@ async def assert_computation_task_out_obj(
2625
exp_task_state: RunningState,
2726
exp_pipeline_details: PipelineDetails,
2827
iteration: PositiveInt | None,
29-
cluster_id: ClusterID | None,
30-
):
28+
) -> None:
3129
assert task_out.id == project.uuid
3230
assert task_out.state == exp_task_state
3331
assert task_out.url.path == f"/v2/computations/{project.uuid}"
@@ -41,7 +39,6 @@ async def assert_computation_task_out_obj(
4139
else:
4240
assert task_out.stop_url is None
4341
assert task_out.iteration == iteration
44-
assert task_out.cluster_id == cluster_id
4542
# check pipeline details contents
4643
received_task_out_pipeline = task_out.pipeline_details.model_dump()
4744
expected_task_out_pipeline = exp_pipeline_details.model_dump()

services/director-v2/tests/integration/01/test_computation_api.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
assert_computation_task_out_obj,
2222
)
2323
from models_library.api_schemas_directorv2.comp_tasks import ComputationGet
24-
from models_library.clusters import DEFAULT_CLUSTER_ID, ClusterAuthentication
24+
from models_library.clusters import ClusterAuthentication
2525
from models_library.projects import ProjectAtDB
2626
from models_library.projects_nodes import NodeState
2727
from models_library.projects_nodes_io import NodeID
@@ -463,7 +463,6 @@ def _convert_to_pipeline_details(
463463
exp_task_state=RunningState.PUBLISHED,
464464
exp_pipeline_details=expected_pipeline_details,
465465
iteration=1,
466-
cluster_id=DEFAULT_CLUSTER_ID,
467466
)
468467

469468
# now wait for the computation to finish
@@ -479,7 +478,6 @@ def _convert_to_pipeline_details(
479478
exp_task_state=RunningState.SUCCESS,
480479
exp_pipeline_details=expected_pipeline_details_after_run,
481480
iteration=1,
482-
cluster_id=DEFAULT_CLUSTER_ID,
483481
)
484482

485483
# run it a second time. the tasks are all up-to-date, nothing should be run
@@ -531,7 +529,6 @@ def _convert_to_pipeline_details(
531529
exp_task_state=RunningState.PUBLISHED,
532530
exp_pipeline_details=expected_pipeline_details_forced,
533531
iteration=2,
534-
cluster_id=DEFAULT_CLUSTER_ID,
535532
)
536533

537534
# now wait for the computation to finish
@@ -572,7 +569,6 @@ async def test_run_computation(
572569
exp_task_state=RunningState.PUBLISHED,
573570
exp_pipeline_details=fake_workbench_computational_pipeline_details,
574571
iteration=1,
575-
cluster_id=DEFAULT_CLUSTER_ID,
576572
)
577573

578574
# wait for the computation to start
@@ -595,7 +591,6 @@ async def test_run_computation(
595591
exp_task_state=RunningState.SUCCESS,
596592
exp_pipeline_details=fake_workbench_computational_pipeline_details_completed,
597593
iteration=1,
598-
cluster_id=DEFAULT_CLUSTER_ID,
599594
)
600595

601596
# NOTE: currently the webserver is the one updating the projects table so we need to fake this by copying the run_hash
@@ -642,7 +637,6 @@ async def test_run_computation(
642637
exp_task_state=RunningState.PUBLISHED,
643638
exp_pipeline_details=expected_pipeline_details_forced, # NOTE: here the pipeline already ran so its states are different
644639
iteration=2,
645-
cluster_id=DEFAULT_CLUSTER_ID,
646640
)
647641

648642
# wait for the computation to finish
@@ -655,7 +649,6 @@ async def test_run_computation(
655649
exp_task_state=RunningState.SUCCESS,
656650
exp_pipeline_details=fake_workbench_computational_pipeline_details_completed,
657651
iteration=2,
658-
cluster_id=DEFAULT_CLUSTER_ID,
659652
)
660653

661654

@@ -692,7 +685,6 @@ async def test_abort_computation(
692685
exp_task_state=RunningState.PUBLISHED,
693686
exp_pipeline_details=fake_workbench_computational_pipeline_details,
694687
iteration=1,
695-
cluster_id=DEFAULT_CLUSTER_ID,
696688
)
697689

698690
# wait until the pipeline is started
@@ -765,7 +757,6 @@ async def test_update_and_delete_computation(
765757
exp_task_state=RunningState.NOT_STARTED,
766758
exp_pipeline_details=fake_workbench_computational_pipeline_details_not_started,
767759
iteration=None,
768-
cluster_id=None,
769760
)
770761

771762
# update the pipeline
@@ -784,7 +775,6 @@ async def test_update_and_delete_computation(
784775
exp_task_state=RunningState.NOT_STARTED,
785776
exp_pipeline_details=fake_workbench_computational_pipeline_details_not_started,
786777
iteration=None,
787-
cluster_id=None,
788778
)
789779

790780
# update the pipeline
@@ -803,7 +793,6 @@ async def test_update_and_delete_computation(
803793
exp_task_state=RunningState.NOT_STARTED,
804794
exp_pipeline_details=fake_workbench_computational_pipeline_details_not_started,
805795
iteration=None,
806-
cluster_id=None,
807796
)
808797

809798
# start it now
@@ -821,7 +810,6 @@ async def test_update_and_delete_computation(
821810
exp_task_state=RunningState.PUBLISHED,
822811
exp_pipeline_details=fake_workbench_computational_pipeline_details,
823812
iteration=1,
824-
cluster_id=DEFAULT_CLUSTER_ID,
825813
)
826814

827815
# wait until the pipeline is started

services/director-v2/tests/integration/02/test_dynamic_sidecar_nodeports_integration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
assert_computation_task_out_obj,
3030
)
3131
from models_library.api_schemas_directorv2.comp_tasks import ComputationGet
32-
from models_library.clusters import DEFAULT_CLUSTER_ID, ClusterAuthentication
32+
from models_library.clusters import ClusterAuthentication
3333
from models_library.projects import (
3434
Node,
3535
NodesDict,
@@ -983,7 +983,6 @@ async def test_nodeports_integration(
983983
exp_task_state=RunningState.SUCCESS,
984984
exp_pipeline_details=PipelineDetails.model_validate(fake_dy_success),
985985
iteration=1,
986-
cluster_id=DEFAULT_CLUSTER_ID,
987986
)
988987
update_project_workbench_with_comp_tasks(str(current_study.uuid))
989988

services/director-v2/tests/unit/with_dbs/comp_scheduler/test_api_route_computations.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# pylint: disable=too-many-arguments
55
# pylint: disable=unused-argument
66
# pylint: disable=unused-variable
7+
# pylint: disable=too-many-positional-arguments
78

89
import datetime as dt
910
import json

0 commit comments

Comments
 (0)