Skip to content

Commit 73f9d21

Browse files
authored
Build(deps-dev): Bump frequenz-repo-config from 0.18.0 to 0.19.0 in the repo-config group across 1 directory (#296)
Bumps the repo-config group with 1 update in the / directory: [frequenz-repo-config](https://github.com/frequenz-floss/frequenz-repo-config-python). Updates `frequenz-repo-config` from 0.18.0 to 0.19.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/frequenz-floss/frequenz-repo-config-python/releases">frequenz-repo-config's releases</a>.</em></p> <blockquote> <h2>v0.19.0</h2> <h1>Frequenz Repository Configuration Release Notes</h1> <h2>Summary</h2> <p>This release removes the now unnecessary DCO dummy workflow for the merge queue, enables debug mode for <code>pytest-asyncio</code> and exhaustive matching in <code>mypy</code>, makes <code>pytest</code> less verbose, improves the contributing guide's release steps, and brings the cookiecutter template up to date with the latest dependencies and GitHub Actions.</p> <h2>Upgrading</h2> <h3>Cookiecutter template</h3> <p>All upgrading should be done via the migration script or regenerating the templates.</p> <pre lang="bash"><code>curl -sSLf https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/&lt;tag&gt;/cookiecutter/migrate.py | python3 -I </code></pre> <p>But you might still need to adapt your code:</p> <ul> <li>Generated API projects now build their Python bindings with <code>protobuf</code> 7.x (<code>grpcio-tools</code> 1.83.0 requires it), so the runtime requirement was raised to <code>protobuf &gt;= 7.35.1, &lt; 9</code>. Consumers of the generated bindings need to be able to install <code>protobuf</code> 7.x.</li> </ul> <h2>New Features</h2> <h3>Cookiecutter template</h3> <ul> <li>Generated <code>pyproject.toml</code> no longer sets <code>addopts = &quot;-vv&quot;</code> under <code>[tool.pytest.ini_options]</code> as this is too verbose for a default.</li> <li>Generated projects enable mypy's <code>exhaustive-match</code> error code.</li> <li>Generated non-API projects enable asyncio debug mode during tests to provide extra runtime checks.</li> <li>Removed the dummy DCO workflow for the merge queue, as the DCO GitHub App now runs on <code>merge_group</code> events. The <code>DCO</code> required status check in the &quot;Protect version branches&quot; ruleset is now pinned to the DCO GitHub App; the migration script removes the workflow and updates the ruleset (via the <code>gh</code> CLI) for existing repositories.</li> </ul> <h2>Enhancements</h2> <ul> <li>Improved the docstring documentation and cross-references across the <code>frequenz.repo.config</code> package.</li> </ul> <h3>Cookiecutter template</h3> <ul> <li>The <code>Releasing</code> section of <code>CONTRIBUTING.md</code> now covers the milestone handling, explains that the release notes are read from the <code>RELEASE_NOTES.md</code> committed at the tagged commit (so they can't be cleaned up after tagging), and that the tag signature is required by the <em>Protect released tags</em> ruleset, which also makes released tags immutable. The migration script updates existing repositories.</li> <li>All pinned dependencies were updated to their latest versions, most notably <code>setuptools</code> to 84.0.0, <code>mypy</code> to 2.3.0, <code>pytest</code> to 9.1.1, <code>pylint</code> to 4.0.7, <code>nox</code> to 2026.8.10, <code>pydoclint</code> to 0.9.1, <code>pytest-asyncio</code> to 1.4.0 and <code>flake8-datetimez</code> to 26.8.1 (its first release in almost 6 years).</li> <li>The <code>frequenz-sdk</code> requirement was bumped to 1.0.0rc2211 and, for API projects, <code>frequenz-api-common</code> to 0.8.11, <code>protobuf</code> to 7.35.1 and <code>grpcio</code>/<code>grpcio-tools</code> to 1.83.0.</li> <li>All GitHub Actions used by the generated workflows were updated to their latest releases, including the major bumps of <code>actions/checkout</code> to v7 and <code>actions/labeler</code> to v7 (no configuration changes are needed for either).</li> <li>API projects now run <code>protolint</code> 0.56.4 in CI (up from 0.53.0), which may report new issues in existing <code>.proto</code> files.</li> </ul> <h2>Bug Fixes</h2> <ul> <li>Fixed several typos and broken code examples in the docstrings.</li> <li>Fixed the building of distribution packages, which was failing with <code>setuptools-scm was unable to detect version</code>. When building a wheel from a source distribution there is no git repository to get the version from, so <code>setuptools-scm</code> 10.0.x reads it from <code>PKG-INFO</code> using an entry point provided by <code>vcs-versioning</code>, but it doesn't declare any upper bound for it. <code>vcs-versioning</code> 2.x dropped that entry point and moved the fallback to <code>setuptools-scm</code> itself, so builds started failing as soon as <code>vcs-versioning</code> 2.x was picked up. <code>setuptools-scm</code> was updated to 10.2.1, which provides the fallback again and bounds <code>vcs-versioning</code> to the 2.x series (backport from v0.18.2).</li> </ul> <h3>Cookiecutter template</h3> <ul> <li>The <code>frequenz-repo-config</code> version pinned by the template is bumped to the version being released again. It was left pointing at 0.17.0 in the v0.18.x series, so generated projects installed an outdated <code>frequenz-repo-config</code>.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/14d76da093a32c94c490f00133890a79bdaeef9c"><code>14d76da</code></a> Prepare for release v0.19.0 (<a href="https://redirect.github.com/frequenz-floss/frequenz-repo-config-python/issues/627">#627</a>)</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/4c26e2cde247ed56e1477161d84f28bf0d29d28a"><code>4c26e2c</code></a> Prepare release notes for v0.19.0</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/5e6651b5abe7c379199210389e6f88150a902862"><code>5e6651b</code></a> Document the extra release steps of this repository</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/bdc1d114d75cb82997fedd11a7a5b92f34c7948d"><code>bdc1d11</code></a> template: Bump version to the upcoming v0.19.0</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/7374efbed7059a0a3b7a8280d1ff75596fcba49d"><code>7374efb</code></a> Update template dependencies (<a href="https://redirect.github.com/frequenz-floss/frequenz-repo-config-python/issues/626">#626</a>)</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/450b1d8aa83047aad2cdaf91ff3fbf5c6d87ff52"><code>450b1d8</code></a> Update release notes</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/194dad3e03ef0420b543ec9b0e6d2820d5566dde"><code>194dad3</code></a> template: Update protolint to 0.56.4</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/a5c0b21e8b8a4bf55786e56fb6ff4f3310e2608d"><code>a5c0b21</code></a> migrate: Bump the pinned setuptools build dependency</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/420100253c5cfb342bbc08a3ca3630037d6e6133"><code>4201002</code></a> template: Update GitHub Actions</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/e90f2f7591b5ed9019ba12d542fb292ae9c67261"><code>e90f2f7</code></a> template: Bump dependencies</li> <li>Additional commits viewable in <a href="https://github.com/frequenz-floss/frequenz-repo-config-python/compare/v0.18.0...v0.19.0">compare view</a></li> </ul> </details> <br />
2 parents 6217255 + e1d656c commit 73f9d21

4 files changed

Lines changed: 35 additions & 23 deletions

File tree

‎.github/workflows/dco-merge-queue.yml‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎CONTRIBUTING.md‎

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Or you can use `nox`:
5353
nox -R -s pytest -- tests/test_*.py
5454
```
5555

56-
The same appliest to `pylint` or `mypy` for example:
56+
The same applies to `pylint` or `mypy` for example:
5757

5858
```sh
5959
nox -R -s pylint -- tests/test_*.py
@@ -121,12 +121,19 @@ These are the steps to create a new release:
121121

122122
1. Get the latest head you want to create a release from.
123123

124+
If you use milestones, check that the milestone for this release has no open
125+
issues left, and move whatever won't make it to a later milestone.
126+
124127
2. Update the `RELEASE_NOTES.md` file if it is not complete, up to date, and
125-
remove template comments (`<!-- ... ->`) and empty sections. Submit a pull
128+
remove template comments (`<!-- ... -->`) and empty sections. Submit a pull
126129
request if an update is needed, wait until it is merged, and update the
127130
latest head you want to create a release from to get the new merged pull
128131
request.
129132

133+
This can't be left for later: the notes published with the release are read
134+
from the `RELEASE_NOTES.md` committed at the tagged commit, not from the tag
135+
message.
136+
130137
3. Create a new signed tag using the release notes and
131138
a [semver](https://semver.org/) compatible version number with a `v` prefix,
132139
for example:
@@ -135,6 +142,10 @@ These are the steps to create a new release:
135142
git tag -s --cleanup=whitespace -F RELEASE_NOTES.md v0.0.1
136143
```
137144

145+
The signature is not optional: the *Protect released tags* ruleset rejects
146+
unsigned tags. It also forbids updating or deleting a released tag, so make
147+
sure you are tagging the commit you want.
148+
138149
4. Push the new tag.
139150

140151
5. A GitHub action will test the tag and if all goes well it will create
@@ -153,4 +164,7 @@ These are the steps to create a new release:
153164
Commit the new release notes and create a PR (this step should be automated
154165
eventually too).
155166

156-
7. Celebrate!
167+
7. If you use milestones, close the milestone for this release, and create the
168+
next one if it doesn't exist yet.
169+
170+
8. Celebrate!

‎pyproject.toml‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
[build-system]
55
requires = [
66
"setuptools == 84.0.0",
7-
"setuptools_scm[toml] == 10.2.3",
8-
"frequenz-repo-config[lib] == 0.18.0",
7+
"setuptools_scm[toml] == 10.2.1",
8+
"frequenz-repo-config[lib] == 0.19.0",
99
]
1010
build-backend = "setuptools.build_meta"
1111

@@ -72,7 +72,7 @@ dev-mkdocs = [
7272
"mkdocs-material == 9.7.7",
7373
"mkdocstrings[python] == 1.0.6",
7474
"mkdocstrings-python == 2.0.8",
75-
"frequenz-repo-config[lib] == 0.18.0",
75+
"frequenz-repo-config[lib] == 0.19.0",
7676
]
7777
dev-mypy = [
7878
"mypy == 2.3.1",
@@ -85,7 +85,7 @@ dev-mypy = [
8585
dev-noxfile = [
8686
"uv == 0.12.13",
8787
"nox == 2026.8.17",
88-
"frequenz-repo-config[lib] == 0.18.0",
88+
"frequenz-repo-config[lib] == 0.19.0",
8989
]
9090
dev-pylint = [
9191
"pylint == 4.0.8",
@@ -94,7 +94,7 @@ dev-pylint = [
9494
]
9595
dev-pytest = [
9696
"pytest == 9.1.1",
97-
"frequenz-repo-config[extra-lint-examples] == 0.18.0",
97+
"frequenz-repo-config[extra-lint-examples] == 0.19.0",
9898
"pytest-mock == 3.15.1",
9999
"pytest-asyncio == 1.4.0",
100100
"async-solipsism == 0.9",
@@ -176,13 +176,15 @@ disable = [
176176
# coming for external dependencies that are hard to address here, once this is
177177
# fixed, we can add the following options:
178178
# -Werror -Wdefault::DeprecationWarning -Wdefault::PendingDeprecationWarning
179-
addopts = "-W=all -vv"
179+
addopts = "-W=all"
180180
testpaths = ["tests", "src"]
181+
asyncio_debug = true
181182
asyncio_mode = "auto"
182183
asyncio_default_fixture_loop_scope = "function"
183184
required_plugins = ["pytest-asyncio", "pytest-mock"]
184185

185186
[tool.mypy]
187+
enable_error_code = ["exhaustive-match"]
186188
explicit_package_bases = true
187189
namespace_packages = true
188190
# This option disables mypy cache, and it is sometimes useful to enable it if

‎src/frequenz/dispatch/_bg_service.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,16 @@ async def _run(self) -> None: # pylint: disable=too-many-branches
341341
await self._lifecycle_events_tx.send(
342342
Deleted(dispatch=new_dispatch)
343343
)
344+
case Event.UNSPECIFIED:
345+
# The API should never send this in
346+
# practice, but the enum allows for it,
347+
# so log and ignore it rather than crash
348+
# the whole service on garbage input.
349+
_logger.warning(
350+
"Received dispatch event with an "
351+
"unspecified event type: %s",
352+
selected.message,
353+
)
344354

345355
case StreamRetrying():
346356
is_retry_attempt = True

0 commit comments

Comments
 (0)