From fc2413e61e6ebdb23b8e7b406cbf4a42c6ac345b Mon Sep 17 00:00:00 2001 From: woutdenolf Date: Wed, 24 Jun 2026 07:42:31 +0200 Subject: [PATCH 1/3] raise an error when the configuration from `EWOKS_CONFIG_URI` is empty --- CHANGELOG.md | 4 ++++ src/ewoksjob/config.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d858f04..dc321bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add ewoksjob options under `EWOKSJOB_OPTIONS`: ``log_memory_usage`` and ``detect_memory_leaks``. - Added ability to handle remote ewoksutils exception types on the client side. +### Fixed + +- Raise an error when the configuration from `EWOKS_CONFIG_URI` is empty. + ## [1.5.0] - 2026-03-30 ### Added diff --git a/src/ewoksjob/config.py b/src/ewoksjob/config.py index 13ea28d..c4555fb 100644 --- a/src/ewoksjob/config.py +++ b/src/ewoksjob/config.py @@ -104,6 +104,10 @@ def read_configuration(cfg_uri: str) -> dict: if "celery" in config: celery_config = config.pop("celery") config = {**config, **celery_config} + + if not config: + raise ValueError(f"Celery configuration '{cfg_uri}' is empty") + return config From 490d785f697db0caa1851a05bfb70dad6a4b64ba Mon Sep 17 00:00:00 2001 From: woutdenolf Date: Wed, 24 Jun 2026 07:55:12 +0200 Subject: [PATCH 2/3] fix CI --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 25fd4b9..66a5263 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,6 +95,7 @@ jobs: -W ignore::DeprecationWarning:celery.utils.imports -W ignore::DeprecationWarning:kombu.transport.redis -W ignore::pydantic.warnings.PydanticDeprecatedSince20 + -W "ignore:Field name \"pk\" in \"EmbeddedJsonModel\" shadows an attribute in parent \"JsonModel\":UserWarning" steps: - uses: actions/checkout@v4 - uses: ewoks-kit/.github/.github/actions/setup-python-package@main @@ -138,6 +139,7 @@ jobs: -W ignore::DeprecationWarning:celery.utils.imports -W ignore::DeprecationWarning:kombu.transport.redis -W ignore::pydantic.warnings.PydanticDeprecatedSince20 + -W "ignore:Field name \"pk\" in \"EmbeddedJsonModel\" shadows an attribute in parent \"JsonModel\":UserWarning" steps: - uses: actions/checkout@v4 - uses: ewoks-kit/.github/.github/actions/setup-python-package@main From b367a563a3c49bb53018225c7dd6034f2c249a86 Mon Sep 17 00:00:00 2001 From: woutdenolf Date: Wed, 24 Jun 2026 07:58:47 +0200 Subject: [PATCH 3/3] fix pytest argument quotes --- .github/workflows/test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 66a5263..b854d23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,14 +95,15 @@ jobs: -W ignore::DeprecationWarning:celery.utils.imports -W ignore::DeprecationWarning:kombu.transport.redis -W ignore::pydantic.warnings.PydanticDeprecatedSince20 - -W "ignore:Field name \"pk\" in \"EmbeddedJsonModel\" shadows an attribute in parent \"JsonModel\":UserWarning" steps: - uses: actions/checkout@v4 - uses: ewoks-kit/.github/.github/actions/setup-python-package@main with: python-version: "3.12" install-extras: "test,orange" - - run: python -m gevent.monkey --module pytest . -v $PYTEST_WARNINGS + - run: >- + python -m gevent.monkey --module pytest . -v $PYTEST_WARNINGS + -W "ignore:Field name \"pk\" in \"EmbeddedJsonModel\" shadows an attribute in parent \"JsonModel\":UserWarning" test-3-12-redis: needs: build @@ -139,7 +140,6 @@ jobs: -W ignore::DeprecationWarning:celery.utils.imports -W ignore::DeprecationWarning:kombu.transport.redis -W ignore::pydantic.warnings.PydanticDeprecatedSince20 - -W "ignore:Field name \"pk\" in \"EmbeddedJsonModel\" shadows an attribute in parent \"JsonModel\":UserWarning" steps: - uses: actions/checkout@v4 - uses: ewoks-kit/.github/.github/actions/setup-python-package@main @@ -147,7 +147,9 @@ jobs: python-version: "3.12" install-extras: "test,orange" - run: redis-server & - - run: python -m gevent.monkey --module pytest . -v $PYTEST_WARNINGS + - run: >- + python -m gevent.monkey --module pytest . -v $PYTEST_WARNINGS + -W "ignore:Field name \"pk\" in \"EmbeddedJsonModel\" shadows an attribute in parent \"JsonModel\":UserWarning" test-3-12-examples-sql: needs: build