diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 30b9789..7ec24c2 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,18 +1,12 @@ # Dispatch Highlevel Interface Release Notes -## Summary - - - ## Upgrading - - -## New Features +This is a breaking release that requires you to use the new URL for the dispatch service: - + * Staging: `grpc://dispatch.eu-1.staging.api.frequenz.com:443` + * Production: `grpc://dispatch.eu-1.prod.api.frequenz.com:443` ## Bug Fixes -* Fixes reconnecting after connection loss for streams -* Fixed an issue in the `Dispatcher` class where the client connection was not properly disconnected during cleanup, potentially causing unclosed socket errors. +* Fix that a user might see invalid values for dispatches without `end_time`. diff --git a/pyproject.toml b/pyproject.toml index afc7a1b..c2b79fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ # plugins.mkdocstrings.handlers.python.import) "frequenz-sdk >= 1.0.0-rc1302, < 1.0.0-rc1900", "frequenz-channels >= 1.6.1, < 2.0.0", - "frequenz-client-dispatch >= 0.9.0, < 0.10.0", + "frequenz-client-dispatch >= 0.10.0, < 0.11.0", ] dynamic = ["version"] diff --git a/src/frequenz/dispatch/_bg_service.py b/src/frequenz/dispatch/_bg_service.py index af638b6..5bf3905 100644 --- a/src/frequenz/dispatch/_bg_service.py +++ b/src/frequenz/dispatch/_bg_service.py @@ -17,7 +17,7 @@ import grpc.aio from frequenz.channels import Broadcast, Receiver, select, selected_from from frequenz.channels.timer import SkipMissedAndResync, Timer -from frequenz.client.dispatch import Client +from frequenz.client.dispatch import DispatchApiClient from frequenz.client.dispatch.types import Event from frequenz.sdk.actor import BackgroundService @@ -90,7 +90,7 @@ def __init__( def __init__( self, microgrid_id: int, - client: Client, + client: DispatchApiClient, ) -> None: """Initialize the background service. diff --git a/src/frequenz/dispatch/_dispatcher.py b/src/frequenz/dispatch/_dispatcher.py index c18fd6a..37f3c18 100644 --- a/src/frequenz/dispatch/_dispatcher.py +++ b/src/frequenz/dispatch/_dispatcher.py @@ -12,7 +12,7 @@ from typing import Awaitable, Callable, Self from frequenz.channels import Receiver -from frequenz.client.dispatch import Client +from frequenz.client.dispatch import DispatchApiClient from frequenz.sdk.actor import Actor, BackgroundService from typing_extensions import override @@ -151,7 +151,8 @@ async def run(): ``` Example: Creating a new dispatch and then modifying it. - Note that this uses the lower-level `Client` class to create and update the dispatch. + Note that this uses the lower-level `DispatchApiClient` class to create + and update the dispatch. ```python import os @@ -213,7 +214,7 @@ def __init__( """ super().__init__() - self._client = Client(server_url=server_url, key=key) + self._client = DispatchApiClient(server_url=server_url, key=key) self._bg_service = DispatchScheduler( microgrid_id, self._client, @@ -349,7 +350,7 @@ async def stop_managing(self, dispatch_type: str) -> None: self._empty_event.set() @property - def client(self) -> Client: + def client(self) -> DispatchApiClient: """Return the client.""" return self._client diff --git a/tests/test_managing_actor.py b/tests/test_managing_actor.py index e8b3639..a08207c 100644 --- a/tests/test_managing_actor.py +++ b/tests/test_managing_actor.py @@ -333,7 +333,7 @@ def __init__(self, *, server_url: str, key: str): mid = 1 # Patch `Client` class in Dispatcher with MyFakeClient - with patch("frequenz.dispatch._dispatcher.Client", MyFakeClient): + with patch("frequenz.dispatch._dispatcher.DispatchApiClient", MyFakeClient): dispatcher = Dispatcher( microgrid_id=mid, server_url="grpc://test-url", key="test-key" )