Repository navigation
Conversation
v1.1.0 was released from the previous contents; start a clean file for the next version. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Both match statements over the update mask silently ignored unrecognized
paths. The real service rejects them instead: `generate_update_model`
returns `Invalid fields in update_mask` when a path went unhandled, and
`partial_recurrence_update` returns `Invalid recurrence path: {path}`.
That divergence let a test pass against an update that would fail in
production, which is the opposite of what a test double is for. Raise
`INVALID_ARGUMENT` with the same messages, and drop the comments claiming
the silent ignoring was intentional.
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
The handler for the "recurrence" path went straight to `split_path[1]`, so a bare "recurrence" path raised an `IndexError`. The real service accepts it to replace the whole recurrence rule (`generate_update_model` handles it separately from the "recurrence.<field>" paths), so do the same. `RecurrenceRuleUpdate` is a distinct message from `RecurrenceRule`, so the fields are copied one by one. `end_criteria` is cleared rather than copied when unset, as copying it would leave it present but empty, which reads back as an end criteria with no count and no end time. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
`EndCriteria.from_protobuf` handles an unset `count_or_until` oneof, but no test exercised it: the round-trip loop only covered the `count` and `until_time` cases. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
`update()` raises `ValueError` for any key that is not an updatable field, not only for `type` and `dry_run`. Also fixes a "preceeded" typo. Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
This branch has not been deployed
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.
FakeServicesilently ignored unknown update-mask paths and crashed with anIndexErroron a barerecurrencepath. The real service rejects the former and accepts the latter, so tests could pass against updates that fail in production.Also adds the missing round-trip coverage for an
EndCriteriawith neithercountnoruntilset, and fixes theupdate()docstring.RELEASE_NOTES.mdwas still the released v1.1.0 text, so it is reset first.