Skip to content

build: group Dependabot updates and lift the PR ceiling - #134

Closed
Cat5Dog2 wants to merge 1 commit into
mainfrom
chore/dependabot-grouping
Closed

build: group Dependabot updates and lift the PR ceiling#134
Cat5Dog2 wants to merge 1 commit into
mainfrom
chore/dependabot-grouping

Conversation

@Cat5Dog2

@Cat5Dog2 Cat5Dog2 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

#133 で解消したバージョンずれの再発防止です。設定ファイル 1 本のみの変更で、ビルド成果物には影響しません。

何が問題だったか

nuget の open-pull-requests-limit: 5 にグループ設定がなく、1 パッケージ 1 PR で枠を使い切っていました。

上限に張り付くと、更新は「待たされる」のではなく「作られない」 のが厄介な点です。実際、以下は 10.0.10 が出ていたのに PR が存在しませんでした。

  • Microsoft.EntityFrameworkCore.SqlServer
  • Microsoft.AspNetCore.Mvc.Testing
  • Microsoft.EntityFrameworkCore.InMemory
  • Microsoft.EntityFrameworkCore.Sqlite

しかも通知は出ないので、気づく手段がありません。

さらに #123(Web.Tests の Test SDK 18.7.0)は「Superseded by #129」として閉じられましたが、#129 は E2ETests しか触っていません。ディレクトリを跨いでパッケージ名だけで重複判定された結果、Web.Tests の更新が落ちて 18.6.0 に取り残されていました。

変更内容

項目 変更
nuget open-pull-requests-limit 5 → 10
nuget groups aspnetcore-efcore / test-tooling / azure を追加
github-actions open-pull-requests-limit 2 → 5
github-actions groups 全 action を 1 グループに
先頭コメント dotnet-tools.json が監視対象外である旨を明記

設計判断

ASP.NET Core と EF Core を同一グループに
両者は同じトレイン(10.0.x)で同時リリースされます。PR が分かれていたことが、Design/Tools だけ先行して SqlServer が取り残される原因そのものでした。

メジャー更新はグループに入れない
nuget の各グループは update-typesminor / patch に限定しています。SixLabors.ImageSharp 3.x → 4.0 のような破壊的変更は、単独 PR で個別にレビューしたいためです。

github-actions は update-types で絞らない
action のバージョンタグ更新(v5v6)はすべて major 判定になります。ここを minor/patch に絞ると、グループが何にもマッチしません。実際 #115(checkout v6→v7)も #130(setup-dotnet v5→v6)も major でした。

dotnet-tools.json はコメントで補う
Dependabot はローカルツールマニフェストを読みません。dotnet-ef は EF Core と同トレインなので、手動で揃える必要がある旨をファイル先頭に記載しました。

検証

.github/dependabot.yml が YAML として妥当で、意図した構造にパースされることを確認済みです。

nuget            limit=10
    aspnetcore-efcore: ['Microsoft.AspNetCore.*', 'Microsoft.EntityFrameworkCore.*'] types=['minor', 'patch']
    test-tooling: ['Microsoft.NET.Test.Sdk', 'Microsoft.Playwright.*', 'xunit*', 'coverlet.*'] types=['minor', 'patch']
    azure: ['Azure.*'] types=['minor', 'patch']
github-actions   limit= 5
    github-actions: ['*'] types=ALL
dotnet-sdk       limit= 1

実際のグループ化挙動は、マージ後の初回スケジュール実行(月曜 09:00 JST)で確認できます。

🤖 Generated with Claude Code

The nuget ecosystem ran with open-pull-requests-limit: 5 and no grouping,
which let updates go missing rather than merely queue up.

Six Dependabot PRs sat open against main, all five nuget slots taken by
single-package bumps. Microsoft.EntityFrameworkCore.SqlServer,
Mvc.Testing, EFCore.InMemory and EFCore.Sqlite all had 10.0.10 available
and never got a PR, because there was no slot left to open one in. The
starvation is silent: nothing reports that an update was skipped.

Worse, #123 (Web.Tests to Test SDK 18.7.0) was closed as "superseded by
#129" even though #129 only touches E2ETests. Dependabot matched on
package name across directories, so the Web.Tests update was dropped and
would not have come back.

Grouping ASP.NET Core and EF Core together is the substantive fix: they
ship as one train, and splitting them into separate PRs is what let
Design/Tools drift ahead of SqlServer in the first place. Major bumps
stay ungrouped so things like ImageSharp 3.x to 4.0 still land alone.

The github-actions group deliberately does not filter update-types.
Action tag bumps (v5 to v6) all register as major, so filtering to
minor/patch would leave the group matching nothing.

Dependabot does not read dotnet-tools.json at all, so dotnet-ef has to be
bumped by hand alongside EF Core. Noted at the top of the file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Cat5Dog2

Cat5Dog2 commented Aug 5, 2026

Copy link
Copy Markdown
Owner Author

レビュー指摘を受けて #135 に統合したためクローズします。

統合の理由は積み上げ PR の base 問題の解消と、本番デプロイ回数の削減(3回→2回)です。

あわせて本 PR にあった以下の誤りを #135 で訂正しています。

  1. 「Dependabot は dotnet-tools.json を監視しない」は誤り。2024年から対応済み(#8889 / #10269)。真因は探索対象にリポジトリ直下が含まれていなかったこと
  2. GitHub Actions の全件グループ化を削除。Dependabot は元から action 単位で1 PR にまとめるため(deps(deps): bump actions/setup-dotnet from 5 to 6 #130 の実績)、グループは不要かつ major 更新の切り分けを困難にする
  3. 「上限に達した更新は取りこぼされる」→「作成が先送りされ、通知されない」に訂正

@Cat5Dog2 Cat5Dog2 closed this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant