Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@

## Bug Fixes

<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
- Fixes a bug where battery pool metrics would stop for one actor when another actor managing the same components stops its pool.

7 changes: 6 additions & 1 deletion src/frequenz/sdk/timeseries/battery_pool/_battery_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,4 +399,9 @@ def _system_power_bounds(self) -> ReceiverFetcher[SystemBounds]:

async def stop(self) -> None:
"""Stop all tasks and channels owned by the BatteryPool."""
await self._pool_ref_store.stop()
# This was closing the pool_ref_store, which is not correct, because those are
# shared.
#
# This method will do until we have a mechanism to track the resources created
# through it. It can also eventually cleanup the pool_ref_store, when it is
# holding the last reference to it.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,12 @@ def power_distribution_results(self) -> ReceiverFetcher[_power_distributing.Resu

async def stop(self) -> None:
"""Stop all tasks and channels owned by the EVChargerPool."""
await self._pool_ref_store.stop()
Comment on lines 218 to -220
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add comment why this methods are empty?
It looks like bug now, because method description and definition does different thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

# This was closing the pool_ref_store, which is not correct, because those are
# shared.
#
# This method will do until we have a mechanism to track the resources created
# through it. It can also eventually cleanup the pool_ref_store, when it is
# holding the last reference to it.

@property
def _system_power_bounds(self) -> ReceiverFetcher[SystemBounds]:
Expand Down
7 changes: 6 additions & 1 deletion src/frequenz/sdk/timeseries/pv_pool/_pv_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,12 @@ def power_distribution_results(self) -> ReceiverFetcher[_power_distributing.Resu

async def stop(self) -> None:
"""Stop all tasks and channels owned by the PVPool."""
await self._pool_ref_store.stop()
# This was closing the pool_ref_store, which is not correct, because those are
# shared.
#
# This method will do until we have a mechanism to track the resources created
# through it. It can also eventually cleanup the pool_ref_store, when it is
# holding the last reference to it.

@property
def _system_power_bounds(self) -> ReceiverFetcher[SystemBounds]:
Expand Down
Loading