fix: Raise ValueError for invalid start_time in create()#264
Merged
Marenz merged 2 commits intofrequenz-floss:v1.x.xfrom Feb 27, 2026
Merged
fix: Raise ValueError for invalid start_time in create()#264Marenz merged 2 commits intofrequenz-floss:v1.x.xfrom
start_time in create()#264Marenz merged 2 commits intofrequenz-floss:v1.x.xfrom
Conversation
cwasicki
reviewed
Feb 23, 2026
cwasicki
left a comment
There was a problem hiding this comment.
Some inconsistency in release notes, otherwise LGTM
RELEASE_NOTES.md
Outdated
| ## Upgrading | ||
|
|
||
| <!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with --> | ||
| - `DispatchApiClient.__init__()`: The `key` parameter is now canonical. `auth_key` still works but emits a `DeprecationWarning`. Rename usages to `key=`. |
Contributor
Author
There was a problem hiding this comment.
Indeed, that slipped in, sorry
8a72083 to
77a5f0b
Compare
Contributor
Author
|
Fixed — RELEASE_NOTES now only covers the |
cwasicki
approved these changes
Feb 23, 2026
77a5f0b to
30567fe
Compare
Passing a non-datetime, non-'NOW' value (e.g. numpy.datetime64) previously silently produced a dispatch with an epoch timestamp (1970-01-01). It now raises ValueError immediately, making the bug surface at the call site. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
30567fe to
1980a45
Compare
Covers: non-datetime types (int, str, object), naive datetime, and past datetime — all of which should raise ValueError. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
1980a45 to
e0ae50d
Compare
cwasicki
approved these changes
Feb 23, 2026
llucax
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Passing a non-
datetime, non-"NOW"value tocreate(start_time=...)(e.g. anumpy.datetime64from an MLTimeSeriesindex) previously bypassed theisinstance(start_time, datetime)check and silently produced a dispatch with an epoch timestamp (1970-01-01 00:00:00 UTC). It now raisesValueErrorimmediately.Discovered via frequenz-io/frequenz-actor-electricity-trading#570 — cc @cwasicki.