Skip to content
Merged
29 changes: 19 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ version: 2

# Policy notes:
# 1. Cooldowns satisfy zizmor (`dependabot-cooldown` >= 7d).
# 2. The `uv` group scopes weekly PRs to `minor` + `patch` and suppresses routine
# `version-update:semver-major` PRs via `ignore` (so breaking major jumps that
# require code migrations are handled intentionally rather than turning the
# weekly PR red). Security/CVE updates bypass both `cooldown` and `ignore`,
# opening standalone PRs (including major bumps when required) outside the
# weekly group.
# 2. The `uv` workspace batches `minor` + `patch` into one weekly PR. Majors aren't
# ignored and aren't grouped: each gets its own PR, because each needs its own
# review (cap diff, changelog, contract or not) and one red major shouldn't
# block the others. Security/CVE updates bypass `cooldown` and open standalone PRs.
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
Expand All @@ -38,20 +36,31 @@ updates:
- "*"

# Maintain dependencies for Python (uv workspace)
# Majors open one PR per dep instead of being ignored: a green one widens the
# cap, a red one is the migration ticket. See docs/dependencies.md.
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
groups:
py-dependencies:
py-minor-and-patch:
patterns:
- "*"
update-types:
- "minor"
- "patch"
ignore:
- dependency-name: "*"
# Majors open one PR per dep, except families that release in lockstep:
# splitting those would leave each PR unresolvable (sdk 2 needs api 2).
opentelemetry-major:
patterns:
- "opentelemetry-*"
update-types:
- "major"
aws-major:
patterns:
- "boto3"
- "botocore"
update-types:
- "version-update:semver-major"
- "major"
5 changes: 5 additions & 0 deletions docs/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ Don't bump floors just because a newer version is out. Only bump on purpose when
Don't run `uv lock --upgrade` in feature PRs—it moves every uncapped dep at once and hides what broke.

- **Weekly minor/patch PR (`py-minor-and-patch`):** one grouped Dependabot PR after a 7-day cooldown. CI enforces that this PR only touches `uv.lock` (never `packages/*/pyproject.toml`), so if checks are green you can merge immediately. If red, fix our code rather than adding a cap.
- **Weekly major PRs:** one PR per dep so a broken major doesn't block the rest. Lockstep families (`opentelemetry-major`, `aws-major`) stay grouped so they can resolve.
- **Floor-only dep:** users already resolve the new major. Green: merge. Red: users are already broken—fix immediately.
- **Capped dep:** widens the cap (`<3` -> `<4`). Check `packages/*/pyproject.toml`, skim the changelog for behavior mocked tests miss (exceptions, transport, defaults), merge, and release so users get the wider range.
- **Contract dep (`pydantic`, `dotpromptz`):** widening affects user code. Merge deliberately with a release note.
- **Red capped PR:** leave it open as the migration ticket; the cap protects users meanwhile.
- **Security alerts:** Dependabot security PRs bypass cooldown and grouping. To clear a batch manually:

```bash
Expand Down
Loading