Skip to content

Commit d58cd5e

Browse files
authored
chore(deps-dev): bump frequenz-repo-config from 0.16.0 to 0.18.0 in the repo-config group across 1 directory (#99)
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.16.0 to 0.18.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.18.0</h2> <h1>Frequenz Repository Configuration Release Notes</h1> <h2>Summary</h2> <p>This release focuses on finishing the automation of dependabot updates, adding more automated upgrade workflows and fixing some problems with the previous release.</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> <h2>New Features</h2> <h3>Cookiecutter template</h3> <ul> <li>The cookiecutter now asks whether a repository is private, defaults that answer from the selected license, and uses it to toggle private-repository workflow behavior, public publishing jobs, and the link to GitHub Discussions in the issue template chooser.</li> <li>All dependencies have been updated in the templates.</li> <li>API projects now ship a dedicated <code>grpc-migration.yaml</code> workflow that runs after Dependabot bumps <code>grpcio</code>/<code>grpcio-tools</code>/<code>protobuf</code> and rewrites the matching runtime <code>&gt;=</code> floors in <code>pyproject.toml</code>.</li> <li>API projects now have a better grpcio/protobuf updates grouping in Dependabot, which should make upgrading easier, and plays nicer with the new <code>grpc-migration.yaml</code> workflow.</li> <li>API projects should now use the new API-specific <em>Protect version branches</em> ruleset variant, which includes the required <code>Fix gRPC/protobuf runtime floors</code> check without affecting non-API Python projects.</li> <li>Workflows using the <code>gh-action-dependabot-migrate</code> are upgraded to the latest version, which avoids unnecessary version iterations.</li> <li>Add an <code>isort-migration.yaml</code> workflow that automatically reorders imports when Dependabot upgrades <code>isort</code>.</li> </ul> <h2>Bug Fixes</h2> <h3>Cookiecutter template</h3> <ul> <li>The unused cross-arch QEMU-based testing infrastructure has been removed. The <code>.github/containers/nox-cross-arch/</code> and <code>.github/containers/test-installation/</code> directories, as well as the &quot;Cross-Arch Testing&quot; section in <code>CONTRIBUTING.md</code>.</li> <li>Private repositories now are generated with credentials uncommented and the publishing workflows disabled.</li> <li>The issue template chooser (<code>config.yml</code>) no longer includes the <code>contact_links</code> section for private repositories, since GitHub Discussions are typically disabled for them.</li> <li>Normalized the GitHub Action hashes for <code>gh-action-setup-git</code> and <code>gh-action-setup-python-with-deps</code> to point to the actual commit object, which is what Dependabot expects.</li> <li>API projects now configure black with <code>extend-exclude = '^/submodules/'</code> so the formatting check doesn't descend into external git submodules that don't follow our formatting rules.</li> <li>API projects now configure isort with <code>skip_glob = [&quot;submodules/*&quot;]</code> so the import-sorting check doesn't descend into external git submodules that don't follow our rules.</li> <li><code>CONTRIBUTING.md</code> <ul> <li>Fixed the nox example commands in to use the correct <code>tests/</code> directory instead of the non-existent <code>test/</code> directory.</li> <li>Fixed the wrong mention to PyPI publishing when releasing for private repositories.</li> </ul> </li> </ul> <h2>What's Changed</h2> <ul> <li>Add how to re-trigger a migration to the docs by <a href="https://github.com/llucax"><code>@​llucax</code></a> in <a href="https://redirect.github.com/frequenz-floss/frequenz-repo-config-python/pull/559">frequenz-floss/frequenz-repo-config-python#559</a></li> <li>Remove unused cross-arch files and docs by <a href="https://github.com/llucax"><code>@​llucax</code></a> in <a href="https://redirect.github.com/frequenz-floss/frequenz-repo-config-python/pull/547">frequenz-floss/frequenz-repo-config-python#547</a></li> <li>build(deps): bump frequenz-floss/gh-action-setup-python-with-deps from 0d0d77eac3b54799f31f25a1060ef2c6ebdf9299 to e4d0b2ef8f5a1612d7827f3abaef17c931d2b946 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot] in <a href="https://redirect.github.com/frequenz-floss/frequenz-repo-config-python/pull/561">frequenz-floss/frequenz-repo-config-python#561</a></li> <li>build(deps): bump frequenz-floss/gh-action-nox from 1.1.0 to 1.1.1 in the compatible group by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot] in <a href="https://redirect.github.com/frequenz-floss/frequenz-repo-config-python/pull/560">frequenz-floss/frequenz-repo-config-python#560</a></li> <li>build(deps): bump frequenz-floss/gh-action-setup-git from 16952aac3ccc01d27412fe0dea3ea946530dcace to f9d86a01228ee1cadaac5224d4d7626f1eb23f90 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot] in <a href="https://redirect.github.com/frequenz-floss/frequenz-repo-config-python/pull/562">frequenz-floss/frequenz-repo-config-python#562</a></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/953600229a68741824999432b9b49d9a0bc56bec"><code>9536002</code></a> Update template versions and prepare the v0.18.0 release (<a href="https://redirect.github.com/frequenz-floss/frequenz-repo-config-python/issues/590">#590</a>)</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/085121516fb788293325e56808edecbd31f564f4"><code>0851215</code></a> Prepare release notes for v0.18.0</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/bee542d201b4b66ce71df2f17044dcf76869356a"><code>bee542d</code></a> template: Bump dependencies</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/80402d2a3969e3d19d2671eb98b6ac47ca422e2b"><code>80402d2</code></a> build(deps): bump the compatible group with 2 updates (<a href="https://redirect.github.com/frequenz-floss/frequenz-repo-config-python/issues/589">#589</a>)</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/df8ba243393801fd97e2b46cddfb68bef00848c7"><code>df8ba24</code></a> build(deps): bump the compatible group with 2 updates</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/e5f4e3968e5bc86758c46c41bdca5999dd80746c"><code>e5f4e39</code></a> Add <code>isort</code> dependabot auto-migration workflow (<a href="https://redirect.github.com/frequenz-floss/frequenz-repo-config-python/issues/585">#585</a>)</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/3afcb70310b690cc8eef4e631423af8d221b9f21"><code>3afcb70</code></a> Update release notes</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/e86009be83504bd3751139775388b0cb078f0c2e"><code>e86009b</code></a> Add isort submodules migration step</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/22be0eed5d3b5866dd348b0161de314eca66d5a5"><code>22be0ee</code></a> template: Make isort exclude submodules from API projects</li> <li><a href="https://github.com/frequenz-floss/frequenz-repo-config-python/commit/a45950072bfd4e287dffafb8096c0d42ddff7e47"><code>a459500</code></a> isort: Exclude golden tests</li> <li>Additional commits viewable in <a href="https://github.com/frequenz-floss/frequenz-repo-config-python/compare/v0.16.0...v0.18.0">compare view</a></li> </ul> </details> <br /> > **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
2 parents 753b55d + 647d2ef commit d58cd5e

15 files changed

Lines changed: 202 additions & 137 deletions

.cookiecutter-replay.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"keywords": "client-assets, client, assets, api",
99
"github_org": "frequenz-floss",
1010
"license": "MIT",
11+
"private_repo": "no",
1112
"author_name": "Frequenz Energy-as-a-Service GmbH",
1213
"author_email": "floss@frequenz.com",
1314
"python_package": "frequenz.client.assets",
@@ -34,6 +35,10 @@
3435
"MIT",
3536
"Proprietary"
3637
],
38+
"private_repo": [
39+
"{{ 'yes' if cookiecutter.license == 'Proprietary' else 'no' }}",
40+
"{{ 'no' if cookiecutter.license == 'Proprietary' else 'yes' }}"
41+
],
3742
"author_name": "Frequenz Energy-as-a-Service GmbH",
3843
"author_email": "floss@frequenz.com",
3944
"python_package": "{{cookiecutter | python_package}}",

.github/containers/nox-cross-arch/arm64-ubuntu-20.04-python-3.11.Dockerfile

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

.github/containers/nox-cross-arch/entrypoint.bash

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

.github/containers/test-installation/Dockerfile

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

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ updates:
2929
exclude-patterns:
3030
# pydoclint has shipped breaking changes in patch updates often
3131
- "pydoclint"
32+
- "isort"
3233
minor:
3334
update-types:
3435
- "minor"
@@ -46,6 +47,7 @@ updates:
4647
- "mkdocstrings[python]"
4748
- "pydoclint"
4849
- "pytest-asyncio"
50+
- "isort"
4951
# We group repo-config updates as it uses optional dependencies that are
5052
# considered different dependencies otherwise, and will create one PR for
5153
# each if we don't group them.

.github/workflows/auto-dependabot.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,19 @@ on:
1212
pull_request_target:
1313

1414
permissions:
15+
# Read repository contents and Dependabot metadata used by the nested action.
1516
contents: read
17+
# The nested action also uses `github.token` internally for PR operations.
1618
pull-requests: write
1719

1820
jobs:
1921
auto-merge:
2022
name: Auto-merge Dependabot PR
2123
if: >
2224
github.actor == 'dependabot[bot]' &&
23-
!contains(github.event.pull_request.title, 'the repo-config group')
25+
!contains(github.event.pull_request.title, 'the repo-config group') &&
26+
!contains(github.event.pull_request.title, 'Bump black from ') &&
27+
!contains(github.event.pull_request.title, 'Bump isort from ')
2428
runs-on: ubuntu-slim
2529
steps:
2630
- name: Generate GitHub App token
@@ -29,6 +33,12 @@ jobs:
2933
with:
3034
app-id: ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
3135
private-key: ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
36+
# Merge Dependabot PRs.
37+
permission-contents: write
38+
# Create the auto-merged label if it does not exist.
39+
permission-issues: write
40+
# Approve PRs, add labels, and enable auto-merge.
41+
permission-pull-requests: write
3242

3343
- name: Auto-merge Dependabot PR
3444
uses: frequenz-floss/dependabot-auto-approve@e943399cc9d76fbb6d7faae446cd57301d110165 # v1.5.0
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Automatic black formatting migration for Dependabot PRs
2+
#
3+
# When Dependabot upgrades black, this workflow installs the new version
4+
# and runs `black .` so the PR already contains any formatting changes
5+
# introduced by the upgrade, while leaving the PR open for review.
6+
#
7+
# Black uses calendar versioning. Only the first release of a new calendar
8+
# year may introduce formatting changes (major bump in Dependabot's terms).
9+
# Minor and patch updates within a year keep formatting stable, so they stay
10+
# in the regular Dependabot groups and are auto-merged normally.
11+
#
12+
# The companion auto-dependabot workflow skips major black PRs so they're
13+
# handled exclusively by this migration workflow.
14+
#
15+
# XXX: !!! SECURITY WARNING !!!
16+
# pull_request_target has write access to the repo, and can read secrets.
17+
# This is required because Dependabot PRs are treated as fork PRs: the
18+
# GITHUB_TOKEN is read-only and secrets are unavailable with a plain
19+
# pull_request trigger. The action mitigates the risk by:
20+
# - Never executing code from the PR (the migration script is embedded
21+
# in this workflow file on the base branch, not taken from the PR).
22+
# - Gating migration steps on github.actor == 'dependabot[bot]'.
23+
# - Running checkout with persist-credentials: false and isolating
24+
# push credentials from the migration script environment.
25+
# For more details read:
26+
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
27+
28+
name: Black Migration
29+
30+
on:
31+
merge_group: # To allow using this as a required check for merging
32+
pull_request_target:
33+
types: [opened, synchronize, reopened, labeled, unlabeled]
34+
35+
permissions:
36+
# Commit reformatted files back to the PR branch.
37+
contents: write
38+
# Create and normalize migration state labels.
39+
issues: write
40+
# Read/update pull request metadata and comments.
41+
pull-requests: write
42+
43+
jobs:
44+
black-migration:
45+
name: Migrate Black
46+
# Skip if it was triggered by the merge queue. We only need the workflow to
47+
# be executed to meet the "Required check" condition for merging, but we
48+
# don't need to actually run the job, having the job present as Skipped is
49+
# enough.
50+
if: |
51+
github.event_name == 'pull_request_target' &&
52+
github.actor == 'dependabot[bot]' &&
53+
contains(github.event.pull_request.title, 'Bump black from ')
54+
runs-on: ubuntu-24.04
55+
steps:
56+
- name: Generate token
57+
id: create-app-token
58+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
59+
with:
60+
app-id: ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
61+
private-key: ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
62+
# Push reformatted files to the PR branch.
63+
permission-contents: write
64+
# Create and normalize migration state labels.
65+
permission-issues: write
66+
# Read/update pull request metadata and labels.
67+
permission-pull-requests: write
68+
- name: Migrate
69+
uses: frequenz-floss/gh-action-dependabot-migrate@27763fb5eb56476d91abe00132e8a0614171f92f # v1.2.0
70+
with:
71+
migration-script: |
72+
import os
73+
import subprocess
74+
import sys
75+
76+
version = os.environ["MIGRATION_VERSION"].lstrip("v")
77+
subprocess.run(
78+
[sys.executable, "-Im", "pip", "install", f"black=={version}"],
79+
check=True,
80+
)
81+
subprocess.run([sys.executable, "-Im", "black", "."], check=True)
82+
token: ${{ steps.create-app-token.outputs.token }}
83+
auto-merge-on-changes: "false"
84+
version-iteration: "false"
85+
sign-commits: "true"
86+
auto-merged-label: "tool:auto-merged"
87+
migrated-label: "tool:black:migration:executed"
88+
intervention-pending-label: "tool:black:migration:intervention-pending"
89+
intervention-done-label: "tool:black:migration:intervention-done"

.github/workflows/ci-pr.yaml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Test PR
33
on:
44
pull_request:
55

6+
permissions:
7+
# Read repository contents for checkout and dependency resolution only.
8+
contents: read
9+
610
env:
711
# Please make sure this version is included in the `matrix`, as the
812
# `matrix` section can't use `env`, so it must be entered manually
@@ -17,7 +21,7 @@ jobs:
1721

1822
steps:
1923
- name: Run nox
20-
uses: frequenz-floss/gh-action-nox@v1.1.2
24+
uses: frequenz-floss/gh-action-nox@e1351cf45e05e85afc1c79ab883e06322892d34c # v1.1.0
2125
with:
2226
python-version: "3.11"
2327
nox-session: ci_checks_max
@@ -27,15 +31,15 @@ jobs:
2731
runs-on: ubuntu-24.04
2832
steps:
2933
- name: Setup Git
30-
uses: frequenz-floss/gh-action-setup-git@v1.0.0
34+
uses: frequenz-floss/gh-action-setup-git@f9d86a01228ee1cadaac5224d4d7626f1eb23f90 # v1.0.0
3135

3236
- name: Fetch sources
33-
uses: actions/checkout@v7
37+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3438
with:
3539
submodules: true
3640

3741
- name: Setup Python
38-
uses: frequenz-floss/gh-action-setup-python-with-deps@v1.0.6
42+
uses: frequenz-floss/gh-action-setup-python-with-deps@e4d0b2ef8f5a1612d7827f3abaef17c931d2b946 # v1.0.2
3943
with:
4044
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
4145
dependencies: .[dev-mkdocs]
@@ -44,11 +48,14 @@ jobs:
4448
env:
4549
MIKE_VERSION: gh-${{ github.job }}
4650
run: |
47-
mike deploy $MIKE_VERSION
48-
mike set-default $MIKE_VERSION
51+
# mike is installed as a console script, not a runnable module.
52+
# Run the installed script under isolated mode to avoid importing from
53+
# the workspace when building docs from checked-out code.
54+
python -I "$(command -v mike)" deploy "$MIKE_VERSION"
55+
python -I "$(command -v mike)" set-default "$MIKE_VERSION"
4956
5057
- name: Upload site
51-
uses: actions/upload-artifact@v7
58+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
5259
with:
5360
name: docs-site
5461
path: site/

0 commit comments

Comments
 (0)