Skip to content

Commit f056755

Browse files
authored
Merge pull request #337 from ewoks-kit/336-raise-error-when-ewoks_config_uri-is-provided-but-has-a-syntax-error
raise an error when the configuration from `EWOKS_CONFIG_URI` is empty
2 parents 6fb6e64 + b367a56 commit f056755

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ jobs:
101101
with:
102102
python-version: "3.12"
103103
install-extras: "test,orange"
104-
- run: python -m gevent.monkey --module pytest . -v $PYTEST_WARNINGS
104+
- run: >-
105+
python -m gevent.monkey --module pytest . -v $PYTEST_WARNINGS
106+
-W "ignore:Field name \"pk\" in \"EmbeddedJsonModel\" shadows an attribute in parent \"JsonModel\":UserWarning"
105107
106108
test-3-12-redis:
107109
needs: build
@@ -145,7 +147,9 @@ jobs:
145147
python-version: "3.12"
146148
install-extras: "test,orange"
147149
- run: redis-server &
148-
- run: python -m gevent.monkey --module pytest . -v $PYTEST_WARNINGS
150+
- run: >-
151+
python -m gevent.monkey --module pytest . -v $PYTEST_WARNINGS
152+
-W "ignore:Field name \"pk\" in \"EmbeddedJsonModel\" shadows an attribute in parent \"JsonModel\":UserWarning"
149153
150154
test-3-12-examples-sql:
151155
needs: build

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Add ewoksjob options under `EWOKSJOB_OPTIONS`: ``log_memory_usage`` and ``detect_memory_leaks``.
1313
- Added ability to handle remote ewoksutils exception types on the client side.
1414

15+
### Fixed
16+
17+
- Raise an error when the configuration from `EWOKS_CONFIG_URI` is empty.
18+
1519
## [1.5.0] - 2026-03-30
1620

1721
### Added

src/ewoksjob/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ def read_configuration(cfg_uri: str) -> dict:
104104
if "celery" in config:
105105
celery_config = config.pop("celery")
106106
config = {**config, **celery_config}
107+
108+
if not config:
109+
raise ValueError(f"Celery configuration '{cfg_uri}' is empty")
110+
107111
return config
108112

109113

0 commit comments

Comments
 (0)