Skip to content

Commit 1adee7e

Browse files
fix: node names mapping
1 parent 3b8a3ba commit 1adee7e

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

packages/models-library/src/models_library/projects.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ class BaseProjectModel(BaseModel):
107107
last_change_date: datetime
108108

109109
# Pipeline of nodes (SEE projects_nodes.py)
110-
# FIXME: pedro removes this one
111-
workbench: Annotated[NodesDict, Field(description="Project's pipeline")]
110+
# FIXME: pedro checks this one
111+
# NOTE: GCG: a validation failed (See: services/storage/src/simcore_service_storage/modules/db/projects.py)
112+
# workbench: Annotated[NodesDict, Field(description="Project's pipeline")]
112113

113114

114115
class ProjectAtDB(BaseProjectModel):

services/storage/src/simcore_service_storage/modules/db/projects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async def list_valid_projects_in(
2727
async with pass_or_acquire_connection(self.db_engine, connection) as conn:
2828
async for row in await conn.stream(
2929
sa.select(projects).where(
30-
projects.c.uuid.in_([f"{pid}" for pid in project_uuids])
30+
projects.c.uuid.in_(f"{pid}" for pid in project_uuids)
3131
)
3232
):
3333
with suppress(ValidationError):
@@ -43,7 +43,7 @@ async def get_project_id_and_node_id_to_names_map(
4343
async with pass_or_acquire_connection(self.db_engine, connection) as conn:
4444
async for row in await conn.stream(
4545
sa.select(projects.c.uuid, projects.c.name).where(
46-
projects.c.uuid.in_([f"{pid}" for pid in project_uuids])
46+
projects.c.uuid.in_(f"{pid}" for pid in project_uuids)
4747
)
4848
):
4949
names_map[ProjectID(row.uuid)] = {f"{row.uuid}": row.name}

services/storage/src/simcore_service_storage/simcore_s3_dsm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ async def _add_frontend_needed_data(
134134
assert d.project_id # nosec
135135
names_mapping = prj_names_mapping[d.project_id]
136136
d.project_name = names_mapping[f"{d.project_id}"]
137-
if d.node_id in names_mapping:
137+
if f"{d.node_id}" in names_mapping:
138138
assert d.node_id # nosec
139139
d.node_name = names_mapping[f"{d.node_id}"]
140140
if d.node_name and d.project_name:

services/storage/tests/unit/test_handlers_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
from types_aiobotocore_s3 import S3Client
6464
from yarl import URL
6565

66-
pytest_simcore_core_services_selection = ["postgres"]
66+
pytest_simcore_core_services_selection = ["postgres", "rabbit"]
6767
pytest_simcore_ops_services_selection = ["adminer"]
6868

6969

0 commit comments

Comments
 (0)