Skip to content

Commit 1c2c9ab

Browse files
committed
Disable warn on overflow in config channel receivers
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 98fec4b commit 1c2c9ab

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies = [
3030
# changing the version
3131
# (plugins.mkdocstrings.handlers.python.import)
3232
"frequenz-client-microgrid >= 0.6.0, < 0.7.0",
33-
"frequenz-channels >= 1.4.0, < 2.0.0",
33+
"frequenz-channels >= 1.6.0, < 2.0.0",
3434
"frequenz-quantities[marshmallow] >= 1.0.0, < 2.0.0",
3535
"networkx >= 2.8, < 4",
3636
"numpy >= 1.26.4, < 2",
@@ -48,7 +48,7 @@ email = "[email protected]"
4848
dev-flake8 = [
4949
"flake8 == 7.1.1",
5050
"flake8-docstrings == 1.7.0",
51-
"flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml
51+
"flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml
5252
"pydoclint == 0.5.14",
5353
"pydocstyle == 6.3.0",
5454
]

src/frequenz/sdk/config/_manager.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,11 @@ def new_receiver( # pylint: disable=too-many-arguments
227227
"""
228228
_validate_load_kwargs(marshmallow_load_kwargs)
229229

230-
receiver = self.config_channel.new_receiver(name=f"{self}:{key}", limit=1).map(
230+
# We disable warning on overflow, because we are only interested in the latest
231+
# configuration, it is completely fine to drop old configuration updates.
232+
receiver = self.config_channel.new_receiver(
233+
name=f"{self}:{key}", limit=1, warn_on_overflow=False
234+
).map(
231235
lambda config: _load_config_with_logging_and_errors(
232236
config,
233237
config_class,

0 commit comments

Comments
 (0)