Skip to content

Commit f5c4161

Browse files
authored
Pin grpc related dependencies (#254)
2 parents b12e4d9 + 714f2b6 commit f5c4161

File tree

3 files changed

+19
-49
lines changed

3 files changed

+19
-49
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,5 @@
11
# Frequenz Microgrid API Release Notes
22

3-
## Summary
4-
5-
In this release, the Microgrid API has been updated to use the latest version
6-
of `frequenz-api-common`, in addition a few improvements and a bug fix.
7-
8-
## Upgrading
9-
10-
- This release upgrades `frequenz-api-common` to version `v0.6.1`. Please refer
11-
to the release notes for [v0.6.0](https://github.com/frequenz-floss/frequenz-api-common/releases/tag/v0.6.0)
12-
and [v0.6.1](https://github.com/frequenz-floss/frequenz-api-common/releases/tag/v0.6.1)
13-
of `frequenz-api-common` for more information.
14-
15-
- A new RPC named `AddComponentBounds` has been introduced, which accepts only
16-
inclusive bounds. The old RPCs `AddComponentInclusionBounds` and
17-
`AddComponentExclusionBounds` have been removed.
18-
19-
- The enum `ComponentBoundsTargetMetric` has been removed in favour of the
20-
`Metric` enum from `frequenz-api-common`.
21-
22-
- The polarity of reactive power has been changed to follow the IEEE 1459-2010
23-
standard definitions. In this standard, positive reactive power is inductive
24-
(current is lagging the voltage), and negative reactive power is capacitive
25-
(current is leading the voltage).
26-
27-
## New Features
28-
29-
- The `AddComponentBoundsRequest` message has a field `validity_duration` which
30-
allows the user to specify the duration for which the bounds are valid. The
31-
bounds will be automatically removed after the specified duration. The client
32-
can select between 5 seconds, 1 minute, 5 minutes, and 15 minutes. If set to
33-
`UNSPECIFIED`, the bounds will be valid for a default duration of 5 seconds.
34-
35-
- The request messages `SetComponentPowerActiveRequest` and
36-
`SetComponentPowerReactiveRequest` have a new field named `request_lifetime`
37-
which allows the user to specify the duration for which the power setpoints
38-
are valid. If this field is not specified in a request, the power setpoint
39-
will be valid for 60 seconds.
40-
413
## Bug Fixes
424

43-
- The CI was unable to catch unused imports in the proto file before. This has
44-
been fixed by adding a new step to the CI to build using `protoc` with the
45-
`--fatal-warnings` flag.
5+
- Fix a dependency issue by pinning the `grpcio` version and related libraries.

mkdocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ plugins:
9191
- mike:
9292
canonical_version: latest
9393
- mkdocstrings:
94-
custom_templates: templates
9594
default_handler: python
9695
handlers:
9796
python:

pyproject.toml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ requires = [
66
"setuptools == 68.1.0",
77
"setuptools_scm[toml] == 7.1.0",
88
"frequenz-repo-config[api] == 0.9.1",
9+
# We need to pin the protobuf, grpcio and grpcio-tools dependencies to make
10+
# sure the code is generated using the minimum supported versions, as older
11+
# versions can't work with code that was generated with newer versions.
12+
# https://protobuf.dev/support/cross-version-runtime-guarantee/#backwards
13+
"protobuf == 4.25.3",
14+
"grpcio-tools == 1.51.1",
15+
"grpcio == 1.51.1",
916
]
1017
build-backend = "setuptools.build_meta"
1118

@@ -26,9 +33,15 @@ classifiers = [
2633
]
2734
requires-python = ">= 3.11, < 4"
2835
dependencies = [
29-
"frequenz-api-common >= 0.6.1, < 0.7",
36+
"frequenz-api-common >= 0.6.2, < 0.7",
3037
"googleapis-common-protos >= 1.56.4, < 2",
31-
"grpcio >= 1.51.1, < 2",
38+
# We can't widen beyond 6 because of protobuf cross-version runtime guarantees
39+
# https://protobuf.dev/support/cross-version-runtime-guarantee/#major
40+
"protobuf >= 4.25.3, < 6", # Do not widen beyond 6!
41+
# We couldn't find any document with a spec about the cross-version runtime
42+
# guarantee for grpcio, so unless we find one in the future, we'll assume
43+
# major version jumps are not compatible
44+
"grpcio >= 1.51.1, < 2", # Do not widen beyond 2!
3245
]
3346
dynamic = ["version"]
3447

@@ -50,7 +63,8 @@ dev-mkdocs = [
5063
"mkdocs-gen-files == 0.5.0",
5164
"mkdocs-literate-nav == 0.6.1",
5265
"mkdocs-material == 9.5.20",
53-
"mkdocstrings[python] == 0.23.0",
66+
"mkdocstrings[python] == 0.26.1",
67+
"mkdocstrings-python == 1.11.1",
5468
"frequenz-repo-config[api] == 0.9.1",
5569
]
5670
dev-mypy = [
@@ -59,10 +73,7 @@ dev-mypy = [
5973
# For checking the noxfile, docs/ script, and tests
6074
"frequenz-api-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]",
6175
]
62-
dev-noxfile = [
63-
"nox == 2024.4.15",
64-
"frequenz-repo-config[api] == 0.9.1",
65-
]
76+
dev-noxfile = ["nox == 2024.4.15", "frequenz-repo-config[api] == 0.9.1"]
6677
dev-pylint = [
6778
"pylint == 3.1.0",
6879
# For checking the noxfile, docs/ script, and tests

0 commit comments

Comments
 (0)