Skip to content

Releases: frequenz-floss/frequenz-dispatch-python

v0.7.0

15 May 12:57
v0.7.0
b906c7e
Compare
Choose a tag to compare

Dispatch Highlevel Interface Release Notes

Upgrading

This is a breaking release that requires you to use the new URL for the dispatch service.

Bug Fixes

  • Fix that a user might see invalid values for dispatches without end_time.

What's Changed

Full Changelog: v0.6.2...v0.7.0

v0.6.3

12 May 09:59
v0.6.3
3f17316
Compare
Choose a tag to compare

Dispatch Highlevel Interface Release Notes

Summary

Upgrading

New Features

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.

What's Changed

Full Changelog: v0.6.2...v0.6.3

v0.6.2

15 Apr 12:37
v0.6.2
2ff1865
Compare
Choose a tag to compare

Dispatch Highlevel Interface Release Notes

Summary

Upgrading

New Features

Bug Fixes

  • ActorDispatcher: Fix that every actor instance wrongly received all updates for their dispatch type. This is only relevant to you if your actor has more than one running instance at any time.

What's Changed

  • Clear release notes by @shsms in #134
  • Fix that every actor instance receives every update for their type by @Marenz in #135
  • Update frequenz-sdk dependency range to allow v1.0.0-rc18xx by @shsms in #136

Full Changelog: v0.6.1...v0.6.2

v0.6.1

04 Apr 12:57
v0.6.1
883d953
Compare
Choose a tag to compare

Dispatch Highlevel Interface Release Notes

Upgrading

  • Some minimal dependencies were updated, you might need to adjust your project's dependencies too.

New Features

  • DispatchInfo._src was added for rare complex scenarios where the source of a dispatch needs to be accessed.

What's Changed

New Contributors

Full Changelog: v0.6.0...v0.6.1

v0.6.0

04 Mar 13:05
v0.6.0
ecaca06
Compare
Choose a tag to compare

Dispatch Highlevel Interface Release Notes

Summary

This release introduces a more flexible and powerful mechanism for managing dispatch events with new strategies for merging intervals, enhanced customization options, and better overall alignment with evolving SDK dependencies. It also simplifies actor initialization while maintaining robust support for diverse dispatch scenarios.

Upgrading

A new simplified way to manage actors has been introduced:

Change your code from:

dispatcher = Dispatcher(
    microgrid_id=microgrid_id,
    server_url=url,
    key=key
)
dispatcher.start()

status_receiver = dispatcher.new_running_state_event_receiver("EXAMPLE_TYPE")

managing_actor = ActorDispatcher(
    actor_factory=MyActor.new_with_dispatch,
    running_status_receiver=status_receiver,
)

await run(managing_actor)

to

async with Dispatcher(
    microgrid_id=microgrid_id,
    server_url=url,
    key=key
) as dispatcher:
    await dispatcher.start_managing(
        dispatch_type="EXAMPLE_TYPE",
        actor_factory=MyActor.new_with_dispatch, # now async factory!
        merge_strategy=MergeByType,
    )
    await dispatcher

Further changes:

  • Dispatcher.start is no longer async. Remove await when calling it.
  • Two properties have been replaced by methods that require a type as parameter.
    • Dispatcher.lifecycle_events has been replaced by the method Dispatcher.new_lifecycle_events_receiver(self, dispatch_type: str).
    • Dispatcher.running_status_change has been replaced by the method Dispatcher.new_running_state_event_receiver(self, dispatch_type: str, merge_strategy: MergeStrategy).
  • The managing actor constructor no longer requires the dispatch_type parameter. Instead you're expected to pass the type to the new_receiver function.
  • The DispatchManagingActor class has been renamed to DispatchActorsService.
    • It's interface has been simplified and now only requires an actor factory and a running status receiver.
    • It only starts/stops a single actor at a time now instead of a set of actors.
    • Refer to the updated usage example for more information.
  • DispatchUpdate was renamed to DispatchInfo.

New Features

  • A new feature "merge strategy" (MergeByType, MergeByTypeTarget) has been added to the Dispatcher.new_running_state_event_receiver method. Using it, you can automatically merge consecutive and overlapping dispatch start/stop events of the same type. E.g. dispatch A starting at 10:10 and ending at 10:30 and dispatch B starts at 10:30 until 11:00, with the feature enabled this would in total trigger one start event, one reconfigure event at 10:30 and one stop event at 11:00.
  • The SDK dependency was widened to allow versions up to (excluding) v1.0.0-rc1800.
  • Actor management with dispatches has been simplified:
    • Dispatcher.start_managing(dispatch_type, actor_factory, merge_strategy, retry_interval) to manage your actor for the given type and merge strategy. All you need provide is an actor factory.
    • Dispatcher.stop_managing(dispatch_type) to stop dispatching for the given type.
    • Dispatcher.is_managed(dispatch_type) to check if dispatching is active for the given type.
    • Dispatches that failed to start will now be retried after a delay.
  • A new method Dispatcher.wait_for_initialization() has been added to wait for all actors to be initialized.
  • When using async with Dispatcher(..) as dispatcher, the dispatcher will first wait for the dispatch service to be initialized before entering the block.

What's Changed

New Contributors

Full Changelog: v0.5.0...v0.6.0

v0.5.1

24 Jan 13:11
v0.5.1
afe3002
Compare
Choose a tag to compare

Dispatch Highlevel Interface Release Notes

Summary

  • The SDK dependency was widened to allow versions up to (excluding) v1.0.0-rc1600

What's Changed

  • Widen the SDK dependency range to support 1.0.0rc1500 by @llucax in #100
  • Update release notes for the release by @llucax in #101

Full Changelog: v0.5.0...v0.5.1

v0.5.0

04 Dec 18:06
v0.5.0
c4a8200
Compare
Choose a tag to compare

Dispatch Highlevel Interface Release Notes

Summary

Upgrading

  • The method Dispatch.running(type: str) was replaced with the property Dispatch.started: bool.
  • The SDK dependency was widened to allow versions up to (excluding) v1.0.0-rc1500

New Features

Bug Fixes

  • Fixed a crash when reading a Dispatch with frequency YEARLY.

What's Changed

  • Bump setuptools-scm[toml] from 7.1.0 to 8.1.0 by @dependabot in #80
  • Update dispatch and sdk dependencies by @Marenz in #83
  • Reset release notes by @Marenz in #84
  • Bump the required group across 1 directory with 7 updates by @dependabot in #85
  • Bump setuptools from 68.1.0 to 75.6.0 by @dependabot in #79
  • Remove methods that were moved to client repo by @Marenz in #82
  • Add note about SDK dependency change by @Marenz in #88

Full Changelog: v0.4.0...v0.5.0

v0.4.0

19 Nov 15:19
v0.4.0
12a3368
Compare
Choose a tag to compare

Dispatch Highlevel Interface Release Notes

Summary

  • Updates lots of dependencies and through those gets a few new features:
  • start_immediately when creating dispatches is now supported.
  • http2 keepalive is now supported and enabled by default.
  • Some bugfixes from the channels & sdk libraries. are now included.

Upgrading

  • Dispatch.selector was renamed to Dispatch.target, the ComponentSelector type was accordingly renamed TargetComponents

New Features

Bug Fixes

  • Fixed a crash in the DispatchManagingActor when dispatches shared an equal start time.

What's Changed

  • Bump the required group with 9 updates by @dependabot in #72
  • Bump types-python-dateutil from 2.9.0.20240906 to 2.9.0.20241003 by @dependabot in #73
  • Fix crash when dispatches share equal start time by @Marenz in #75
  • Update dependencies by @Marenz in #76

Full Changelog: v0.3.4...v0.4.0

v0.3.4

24 Oct 09:36
v0.3.4
2f9c764
Compare
Choose a tag to compare

Dispatch Highlevel Interface Release Notes

Summary

This is a hot fix for recurrence not working

What's Changed

Full Changelog: v0.3.3...v0.3.4

v0.3.3

21 Oct 13:07
v0.3.3
bee57c0
Compare
Choose a tag to compare

Dispatch Highlevel Interface Release Notes

Summary

  • frequenz-sdk dependency has been extended to include version 1.0.0-rc1000.

What's Changed

Full Changelog: v0.3.2...v0.3.3