Skip to content
Merged
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
14 changes: 6 additions & 8 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@

## Summary

This release updates the underlying Rust crate to v0.6.0, which brings a rewritten formula fallback engine. Generated formula strings can differ from the previous release. The default source order in per-category formulas is now component-first, and graph validation errors use a new message format. It also bumps PyO3 to 0.29 to fix a security advisory. See the Upgrading section for details.
<!-- Here goes a general summary of what this release is about -->

## Upgrading

- Bumped PyO3 to 0.29 to pull in the fix for RUSTSEC out-of-bounds read advisory GHSA-36hh-v3qg-5jq4 (`nth`/`nth_back` on list/tuple iterators).
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->

- Updated the `frequenz-microgrid-component-graph` Rust crate to v0.6.0. This changes some outputs that are visible from Python:
## New Features

- The formula fallback engine was rewritten. Formulas can now contain meter-subtraction and diamond terms. Exact formula strings can differ from the previous release, even for the same graph.
<!-- Here goes the main new features and examples or instructions on how to use them -->

- The consumer formula now measures the non-consumer components behind one internal meter as one group: it subtracts `COALESCE(#meter, component readings...)` instead of each component on its own. Note: if such a meter also carries a load that is not in the component graph, that load is now subtracted together with the group while the meter reading is used.
## Bug Fixes

- Graph validation failures now raise `InvalidGraphError` with a message that starts with `Graph validation failed:`, followed by one indented line per problem. The old format was `InvalidGraph: <description>`. Note: some errors found while building the graph, for example a missing grid component, still use the old format. Code that matches on the message text of validation failures must be updated.

- `prefer_meters_in_component_formulas` now defaults to `False`: per-category formulas use the component reading as the primary source and the meter as the fallback. Set it to `True` to restore the old meter-first order. This changes only the order of the sources; the new fallback terms from v0.6.0 are used either way.
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
Loading