Skip to content

Commit 96791e7

Browse files
authored
🐛Storage: Celery issues with validation (#7427)
1 parent cdff4c5 commit 96791e7

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

.github/workflows/ci-testing-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ jobs:
514514
unit-test-storage:
515515
needs: changes
516516
if: ${{ needs.changes.outputs.storage == 'true' || github.event_name == 'push' }}
517-
timeout-minutes: 18 # if this timeout gets too small, then split the tests
517+
timeout-minutes: 25 # if this timeout gets too small, then split the tests
518518
name: "[unit] storage"
519519
runs-on: ${{ matrix.os }}
520520
strategy:

packages/pytest-simcore/src/pytest_simcore/docker_compose.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# pylint: disable=unused-argument
33
# pylint: disable=unused-variable
44

5-
""" Fixtures to create docker-compose.yaml configuration files (as in Makefile)
5+
"""Fixtures to create docker-compose.yaml configuration files (as in Makefile)
66
7-
- Basically runs `docker compose config
8-
- Services in stack can be selected using 'core_services_selection', 'ops_services_selection' fixtures
7+
- Basically runs `docker compose config
8+
- Services in stack can be selected using 'core_services_selection', 'ops_services_selection' fixtures
99
1010
"""
1111

@@ -391,6 +391,10 @@ def _filter_services_and_dump(
391391
if "environment" in service:
392392
service["environment"] = _minio_fix(service["environment"])
393393

394+
if name == "postgres":
395+
# NOTE: # -c fsync=off is not recommended for production as this disable writing to disk https://pythonspeed.com/articles/faster-db-tests/
396+
service["command"] += ["-c", "fsync=off"]
397+
394398
# updates current docker-compose (also versioned ... do not change by hand)
395399
with docker_compose_path.open("wt") as fh:
396400
yaml.dump(content, fh, default_flow_style=False)

packages/service-library/src/servicelib/rabbitmq/_client_rpc.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,18 @@ async def create(
3232
cls, *, client_name: str, settings: RabbitSettings, **kwargs
3333
) -> "RabbitMQRPCClient":
3434
client = cls(client_name=client_name, settings=settings, **kwargs)
35-
await client._rpc_initialize() # noqa: SLF001
35+
await client._rpc_initialize()
3636
return client
3737

3838
async def _rpc_initialize(self) -> None:
39+
# NOTE: to show the connection name in the rabbitMQ UI see there
40+
# https://www.bountysource.com/issues/89342433-setting-custom-connection-name-via-client_properties-doesn-t-work-when-connecting-using-an-amqp-url
41+
#
42+
connection_name = f"{get_rabbitmq_client_unique_name(self.client_name)}.rpc"
43+
url = f"{self.settings.dsn}?name={connection_name}"
3944
self._connection = await aio_pika.connect_robust(
40-
self.settings.dsn,
41-
client_properties={
42-
"connection_name": f"{get_rabbitmq_client_unique_name(self.client_name)}.rpc"
43-
},
45+
url,
46+
client_properties={"connection_name": connection_name},
4447
)
4548
self._channel = await self._connection.channel()
4649

packages/settings-library/src/settings_library/redis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ def build_redis_dsn(self, db_index: RedisDatabase) -> str:
4242
),
4343
host=self.REDIS_HOST,
4444
port=self.REDIS_PORT,
45-
path=f"/{db_index}",
45+
path=f"{db_index}",
4646
)
4747
)

services/storage/src/simcore_service_storage/api/rpc/_async_jobs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ async def result(
123123
exc_type = ""
124124
exc_msg = ""
125125
with log_catch(logger=_logger, reraise=False):
126-
task_error = TaskError.model_validate_json(_result)
126+
task_error = TaskError.model_validate(_result)
127127
exc_type = task_error.exc_type
128128
exc_msg = task_error.exc_msg
129129
raise JobError(job_id=job_id, exc_type=exc_type, exc_msg=exc_msg)

0 commit comments

Comments
 (0)