Skip to content

Commit

Permalink
fix issues after renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed Jul 5, 2023
1 parent 5cb4fe3 commit 1c57f2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 2 additions & 3 deletions services/director/src/simcore_service_director/producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ async def _check_node_uuid_available(
# not filtering by "swarm_stack_name" label because it's safer
list_of_running_services_w_uuid = await client.services.list(
filters={
"label": f"{_to_simcore_runtime_docker_label_key('node_id')}="
+ node_uuid
"label": f"{_to_simcore_runtime_docker_label_key('node_id')}={node_uuid}"
}
)
except aiodocker.exceptions.DockerError as err:
Expand Down Expand Up @@ -1036,7 +1035,7 @@ async def get_services_details(
)
if study_id:
filters.append(
f"{_to_simcore_runtime_docker_label_key('study_id')}=" + study_id
f"{_to_simcore_runtime_docker_label_key('project_id')}=" + study_id
)
list_running_services = await client.services.list(
filters={"label": filters}
Expand Down
10 changes: 6 additions & 4 deletions services/director/tests/test_producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ async def test_service_assigned_env_variables(
for service in started_services:
service_uuid = service["service_uuid"]
list_of_services = client.services.list(
filters={"label": "uuid=" + service_uuid}
filters={"label": f"io.simcore.runtime.node-id={service_uuid}"}
)
assert len(list_of_services) == 1
docker_service = list_of_services[0]
Expand Down Expand Up @@ -219,7 +219,9 @@ async def test_interactive_service_published_port(docker_network, run_services):

client = docker.from_env()
service_uuid = service["service_uuid"]
list_of_services = client.services.list(filters={"label": "uuid=" + service_uuid})
list_of_services = client.services.list(
filters={"label": f"io.simcore.runtime.node-id={service_uuid}"}
)
assert len(list_of_services) == 1

docker_service = list_of_services[0]
Expand Down Expand Up @@ -265,7 +267,7 @@ async def test_interactive_service_in_correct_network(
client = docker.from_env()
service_uuid = service["service_uuid"]
list_of_services = client.services.list(
filters={"label": "uuid=" + service_uuid}
filters={"label": f"io.simcore.runtime.node-id={service_uuid}"}
)
assert list_of_services
assert len(list_of_services) == 1
Expand All @@ -285,7 +287,7 @@ async def test_dependent_services_have_common_network(docker_network, run_servic
client = docker.from_env()
service_uuid = service["service_uuid"]
list_of_services = client.services.list(
filters={"label": "uuid=" + service_uuid}
filters={"label": f"io.simcore.runtime.node-id={service_uuid}"}
)
# there is one dependency per service
assert len(list_of_services) == 2
Expand Down

0 comments on commit 1c57f2a

Please sign in to comment.