Skip to content

Dependabot: add the uv ecosystem once the private wheelhouse has an index it can resolve #169

Closed

Description

@gregoryfoster

From: #76, whose github-actions half shipped 2026-10-29 (b520e7f..3f8a90d, then Dependabot PRs #166–#168). This is the remaining half, re-filed so #76 could close (operator, 2026-10-30). Filed by epic #154's coordinator and parked there on CannObserv/cannobserv#554.

What

Add the uv ecosystem to .github/dependabot.yml, so Dependabot proposes the bumps this repo's caps make invisible to uv lock. That's #76's original motivation; its body has the notifier precedent and the config shape (versioning-strategy: increase-if-necessary, a dev-tools group).

Blocked on

CannObserv/cannobserv#554: an index Dependabot's uv updater can resolve. Today co-core, co-core-aio and cannobserv resolve only from ./.wheelhouse, which is mirrored from a private bucket. Dependabot's updater can't reach that, and fails with 404 pypi.org/simple/co-core*/. The GitHub security-update runs failed that way from 2026-10-26 until the advisories cleared (#160). #76's review suggested Artifact Registry with Dependabot's OIDC as the cleaner route; that's cannobserv's call.

Settled by #76 [measured 2026-10-29]

Blocker 1 isn't real here. On Dependabot-triggered runs, vars.GCP_WIF_PROVIDER resolves and OIDC is minted: every auth step in all four jobs was green (the verdict table's row 3).

Notes from #76's implementer (build report, "For the uv half")

Done when

uv is in .github/dependabot.yml and its guard test, Dependabot's first uv run resolves, and its first PR is green by job.

Activity

  1. gregoryfoster commented on Nov 2, 2026

    @gregoryfoster
    MemberAuthor

    From CannObserv/cannobserv#554: your blocker has a fix. Every co-core release from v0.32.0 on is in an Artifact Registry index, and Dependabot's uv updater can read it over OIDC. A spike repo proved this end to end: the run logged authenticating request with OIDC token (host: us-west1-python.pkg.dev) → 200 and opened a 0.40.0 → 0.40.1 PR. New releases publish there automatically (cannobserv 8c41d029), and the backfill was checked byte for byte against GCS.

    This stanza locks on today's main pins, extras included, resolving 0.40.1. I checked it with uv 0.11.8:

    [project]
    dependencies = [
        "co-core>=0.40.0,<0.41",
        "co-core-aio[bus,gcs]>=0.40.0,<0.41",
        "co-core-sync[gcs]>=0.40.0,<0.41",
        # …
    ]
    
    [[tool.uv.index]]
    name = "co-pypi"
    url = "https://us-west1-python.pkg.dev/co-gcs/co-pypi/simple/"
    explicit = true
    
    [tool.uv.sources]
    co-core      = { index = "co-pypi" }
    co-core-aio  = { index = "co-pypi" }
    co-core-sync = { index = "co-pypi" }

    It replaces find-links = ["./.wheelhouse"]. The rules are in cannobserv's docs/RELEASING.md → Path C. The ones that bite:

    • explicit = true plus a sources entry per name. That way co-core never comes from PyPI.
    • Every co-core package gets declared directly, including ones you only get transitively. uv binds sources to direct dependencies only. All three of yours are direct already.
    • The URL must match the org registry's byte for byte. Then dependabot.yml needs no registries: key.
    • Local and CI credentials: UV_INDEX_CO_PYPI_USERNAME=oauth2accesstoken and UV_INDEX_CO_PYPI_PASSWORD=$(gcloud auth print-access-token), with artifactregistry.reader on the repo.
    • One operator step on cannobserv's side: the org registry admits selected repositories only, and Replicator isn't on the list yet (RELEASING.md → Dependabot read access).

    For your notes:

    • The lock shape changes. Index locks record each file's URL and sha256, the sdist line included. So test_every_wheelhouse_package_is_locked_to_a_wheel, and prune-cache's premise, need re-reading against an index lock rather than a find-links one.
    • Dependency confusion is still live. Dependabot's version lookup asks PyPI before the index (seen in the spike's log). explicit = true keeps uv lock itself off PyPI for these names, but a squatter's higher version could still show up as a proposal. Registering the names stays cannobserv's operator's decision, so it isn't done yet.
  2. gregoryfoster commented on Nov 8, 2026

    @gregoryfoster
    MemberAuthor

    Split (coordinator, epic #154, 2026-11-08, operator-approved). The index move is now its own child, #183. This issue keeps the Dependabot uv updater. It stays parked until #183 ships, an org owner admits the repository (cannobserv's docs/DEPENDABOT.md), and the PyPI-first limit is accepted or CannObserv/cannobserv#615 decides the defensive registration.

  3. added a commit that references this issue on Nov 10, 2026
  4. gregoryfoster commented on Nov 22, 2026

    @gregoryfoster
    MemberAuthor

    Decided 2026-11-22 (operator): accept the PyPI-first limit, with co-core* ignored

    Coordinator, epic #154. This settles the second of this issue's three un-park conditions.

    Why it is safe to accept [measured 2026-11-22 unless marked]:

    • CannObserv/cannobserv#615 is still open. Its owner runbook has been paused since 2026-11-14. cannobserv, co-core-sync and co-core-aio all return 404 on PyPI. co-core can't be registered, by us or by anyone else, while the unrelated cocore project exists, because PyPI rejects it as too similar.
    • A lock can't take a squatted copy. pyproject.toml:557-565 declares the co-pypi index as explicit = true, with a [tool.uv.sources] entry for each of co-core, co-core-aio and co-core-sync [traced]. So uv asks only co-pypi for those names.
    • The remaining exposure is a Dependabot proposal that names a squatted PyPI version. An ignore: for co-core* in the uv entry stops Dependabot looking those names up at all. That is the shape Watcher uses (per CannObserv/cannobserv#615). Resolution still goes to the index, so the registry admission is still needed.
    • Nothing is lost. co-core moves through the epic's pin-move children, which the weekday idle check finds by reading the index unbounded.

    Still open: the third condition. An org owner must admit this repository (ID 1317371249) in both of the lists in cannobserv's docs/DEPENDABOT.md, step 3. The PATs here get a 403 on the registry API, which needs admin:org, so the operator runs the read-back. Admission has to land before the dependabot.yml change merges, or the first run fails.

    When #615 registers the names, the ignore can stay. It costs nothing, because co-core bumps don't come from Dependabot here.

  5. gregoryfoster commented on Nov 22, 2026

    @gregoryfoster
    MemberAuthor

    Un-parked: pre-flight brief (coordinator, epic #154, 2026-11-22)

    All three conditions are met. This comment is the brief; the issue body's history still holds, except where corrected below.

    • The index move: Resolve co-core from the co-pypi Artifact Registry index, retiring the GCS wheelhouse (#169 part 1) #183 (bc4c5ec, 2026-11-10).
    • The PyPI-first limit: accepted by the operator 2026-11-22, with co-core* ignored (issuecomment-7082206613).
    • Admission: the operator's read-back today, run with an admin:org token, says admitted for repository ID 1317371249, in both the WIF provider condition and the org registry's selected_repository_ids. The two lists agree. Seven repositories are admitted: cli, watcher, observo, replicator, broker, provisioner and processor [measured by the operator].

    Measured against origin/main at 64a2c7a unless marked.

    What changes

    1. .github/dependabot.yml: add a uv block next to the github-actions one.

    Watcher's live entry is the closest precedent. Provisioner's is in a different shape, grouped by pattern.

      - package-ecosystem: "uv"
        directory: "/"            # pyproject.toml + uv.lock
        schedule:
          interval: "weekly"
        versioning-strategy: increase-if-necessary
        open-pull-requests-limit: 10
        groups:
          dev-tools:
            dependency-type: "development"
        ignore:
          - dependency-name: "co-core*"   # the PyPI-first limit (2026-11-22); co-core moves by pin-move children
          - dependency-name: "playwright" # pinned exact with its headless shell; a bump is a host runbook step
          - dependency-name: "*"
            update-types: ["version-update:semver-major"]
        commit-message:
          prefix: "chore"
    • No registries: key. The org registry serves an admitted repository's jobs when the index URL in pyproject.toml matches the registry's byte for byte (cannobserv docs/DEPENDABOT.md, step 2). tests/test_co_pypi.py:106 (test_one_explicit_co_pypi_index_at_the_org_registrys_url) already holds that URL.
    • co-core* ignored. The pattern covers co-core, co-core-aio and co-core-sync; Watcher lists two by name, and Provisioner uses the glob. The updater still resolves them from the index when it re-locks, so admission is still needed.
    • playwright ignored. pyproject.toml:515-522 pins it exactly, because each release pins one Chromium revision. A bump is a lock change plus the viewport-capture runbook's playwright install on every host. Merged by itself, it would leave production launching a headless shell that isn't installed.
    • Majors ignored for every package. That keeps the repo's <N caps as deliberate decisions; increase-if-necessary would otherwise widen one. This is my recommendation, not a decision: if you'd rather see majors as PRs, say so on this issue and drop that entry.
    • Rewrite the header comment (:7-10), which says uv is parked under Dependabot: add the uv ecosystem once the private wheelhouse has an index it can resolve #169.

    2. tests/ci/test_dependabot.py.

    • test_only_github_actions_is_configured (:77) is meant to go red here (Adopt Dependabot: nothing proposes crossing this repo's dependency caps #76's note). Replace it with a test that the ecosystems are exactly ["github-actions", "uv"].
    • Add guards for the uv block. A mistyped config stops producing PRs without erroring anywhere a person looks (the module docstring):
      • directory is /, and the schedule is weekly;
      • there is no registries: key anywhere;
      • co-core* and playwright are ignored;
      • the commit prefix is chore;
      • the open-PR limit, if you derive it the way the actions test does.
    • Rewrite the module docstring (:8).

    3. Docs.

    • docs/DEPLOYMENT.md:292-296 ("Dependabot proposes the action bumps (Adopt Dependabot: nothing proposes crossing this repo's dependency caps #76)") says bot PRs touch only .github/ and need no deploy. That stops being true:

      • a uv PR that moves a runtime dependency changes what production runs, so merge it, then deploy the merge commit (scripts/deploy.sh), which restarts the worker;
      • a dev-tools group PR needs no deploy.

      Say how to tell the two apart: the PR's uv.lock diff, and whether a [project].dependencies package moved.

    • docs/DEPENDENCIES.md:132-133 is about CI's own uv version (with.version): "Dependabot's github-actions updater rewrites the SHA only, and uv is parked (Dependabot: add the uv ecosystem once the private wheelhouse has an index it can resolve #169)". The conclusion still holds once uv is on, because the uv ecosystem reads pyproject.toml and uv.lock, not ci.yml [stated, from Dependabot's ecosystem scope]. Reword the reason, not the claim: nothing moves with.version.

    Leave alone

    Hazards

    • Lock shape: a Dependabot lock is made from the index. tests/ci/test_workflow_pins.py:245 (test_every_index_package_is_locked_to_a_wheel) must still hold, because it's the premise prune-cache: true relies on to keep private wheels out of a public repo's cache. The first uv PR's CI checks it.
    • Security updates: with uv configured, Dependabot's security-update runs re-lock against the index too. Those runs failed with 404 pypi.org/simple/co-core*/ from 2026-10-26 until the advisories cleared (Bump the dev chain's virtualenv (21.7.1 → 21.14.x) and filelock (3.32.2 → 4.2.x) past 26 advisories #160). There are 0 open alerts today [measured].
    • The first run is the proof. Don't trigger it by hand from a branch. It runs from the default branch's config after the merge: Insights → Dependency graph → Dependabot → uv → "Check for updates", or wait for the weekly run.

    How it ships (since #208)

    • A branch and a PR with Refs #169, merged on GitHub with a merge commit. It changes .github/, tests and docs only, so no deploy and no restart.
    • Close this issue after the first Dependabot uv run has resolved, not at the merge.

    Done when

    • dependabot.yml has the uv block, and its guards pass. The suite matches the baseline (2062 passed, 1 skipped on 753ecb9), tests/ci is green (44 at 753ecb9, plus the new guards), ruff is clean, and CI is green by job.
    • The first uv run resolves. Its log authenticates to us-west1-python.pkg.dev with an OIDC token and gets a 200, with no 404 pypi.org/simple/co-core*. Either it opens a PR or it reports nothing to update.
    • If it opens a PR, that PR is green by job. Record whether it moved a runtime package, and so owes a deploy, or only dev-tools.
    • If the first run doesn't arrive before you finish, record it as verification debt, with the date of the next weekly run.
  6. gregoryfoster commented on Nov 22, 2026

    @gregoryfoster
    MemberAuthor

    Brief review against origin/main (64a2c7a), before building

    Every line reference in the brief checks out (pyproject.toml:557-565, :515-522, tests/test_co_pypi.py:106, tests/ci/test_workflow_pins.py:245, docs/DEPLOYMENT.md:292-296, docs/DEPENDENCIES.md:132-133, context-cadence.yml:174,190). There are two corrections and one challenge.

    Challenge: drop "ignore every major"

    • It hides a major that's already out. python-ulid is capped <4, and 4.2.0 is current on PyPI [measured 2026-11-22]. Watcher's first uv run proposed python-ulid 3.1.0 → 4.1.0 (chore: bump python-ulid from 3.1.0 to 4.1.0 watcher#432), and it merged. With the blanket entry, Replicator would never hear about it.
    • The cap decision belongs in the PR, one package at a time. A major PR is where someone decides whether the cap holds. Closing it with @dependabot ignore this major version records that decision for that package. The blanket entry makes the same decision once for every package, and nobody sees it.
    • The precedent narrows instead. Watcher ignores majors for redis alone, with a named exit (watcher#441), and its test allow-lists narrowed entries. Provisioner narrows only co-core*.

    I'm building without it. The PR waits for the operator before merging, so it can go back in then if you want it.

    Correction 1: a dev-tools group PR can owe a deploy

    scripts/deploy.sh:505 builds a release with uv sync --locked --no-dev. Four packages from the non-default groups are also in that install set (uv export --frozen --no-dev, measured): anyio, httpx and pyyaml from dev, and google-auth from co-pypi. Two of them have pending bumps, anyio 4.14.2 → 4.16.0 and pyyaml 6.0.3 → 6.0.4. So the first dev-tools PR will most likely change what production runs. A security-update PR can also be lock-only and still move a runtime transitive (the shape of watcher#417, pyasn1).

    The reliable test: diff uv export --frozen --no-dev between the PR and its base. If the output differs, deploy. Neither "which group" nor "did a [project].dependencies package move" gives the right answer. DEPLOYMENT.md will give the command.

    Correction 2: each runtime bump also raises its floor

    Under uv, increase-if-necessary raises the floor along with the lock. Watcher#453 shows it: sqlalchemy went from >=2.1.8,<3 to >=2.1.9,<3 (and see notifier#103). So a runtime PR edits pyproject.toml, not only uv.lock. That's harmless, but the docs should say it.

    Confirmed / added

    • dev-tools grouped by dependency-type: development works under uv: watcher#421 and #442 are group PRs.
    • The open-PR limit: I'll derive it as Watcher does. Six runtime packages aren't ignored, plus one group, makes 7. The limit stays at 10.
    • The ignore guard is derived too. co-core* has to match every [tool.uv.sources] name, and every == runtime pin (playwright) has to be ignored by name. A new index package or exact pin then fails CI until someone looks at it.
    • The first run is readable here. Dependabot jobs run as Actions runs in the Dependabot Updates dynamic workflow, so gh run view --log shows the OIDC/200 line. No UI or operator read-back is needed. The weekly runs land on Mondays around 19:26Z, and the next is 2026-11-23. A change to the config on main should also start a run right after the merge.
  7. gregoryfoster commented on Nov 22, 2026

    @gregoryfoster
    MemberAuthor

    First uv run: resolves against co-pypi; the dev-tools group was dropped

    PR #217 was merged as 4812239. Main's CI passed on every job. Merging the config started run 45060714590 (2026-11-22 19:26Z), which concluded success.

    Resolution: done-when met

    • The proxy registered gcp OIDC credentials for python index: https://us-west1-python.pkg.dev/co-gcs/co-pypi/. Every request for simple/co-core* and for the 0.50.0 wheels went through authenticating request with OIDC token (host: us-west1-python.pkg.dev) and got a 200.
    • There were 0 lookups for pypi.org/simple/co-core*. The log says All versions of co-core / co-core-aio[bus,gcs] / co-core-sync[gcs] / playwright ignored. So the name-only ignore keeps co-core off PyPI, as intended.
    • The 404s in the log are Dependabot asking co-pypi about public names (simple/anyio/), then going on to PyPI. They're expected and harmless.

    PRs opened, all green on every job

    PR Moves Deploy owed? (release_set diff)
    #218 astral-sh/setup-uv 10.3.3 → 10.4.0 no (.github/ only)
    #219 uvicorn[standard] floor → 0.54.0 yes, uvicorn 0.52.0 → 0.54.0 [measured]
    #220 fastapi 0.141.1 → 0.165.0 yes
    #221 pydantic 2.13.4 → 2.14.4 yes
    #222 python-json-logger 4.1.0 → 4.2.0 yes
    #223 pydantic-settings 2.14.2 → 2.16.3 yes
    #224 python-ulid 3.2.1 → 4.2.0 (a major; majors are not ignored, as decided) yes, python-ulid [measured]

    Defect: no dev-tools PR

    Skipping change to group dev-tools in directory /: Previous version was not provided for: 'google-auth[requests], uv-build' No requirements change for: 'ty'
    Nothing to update for Dependency Group: 'dev-tools'
    

    The updates to anyio, fakeredis, pre-commit, pytest, pytest-asyncio and ruff were all computed, then dropped without any error.

    Why: dependabot-core's DependencyChange#all_have_previous_version? (updater/lib/dependabot/dependency_change.rb:163) accepts a group change only if every updated dependency changed its requirement, or every one has a previous version. Two entries have no previous version:

    • uv-build: it's a [build-system] requirement, and those aren't in the lock.
    • google-auth[requests]: Dependabot doesn't map an extras-bearing requirement to its lock entry. That's why chore: update uvicorn[standard] requirement from <1,>=0.34.0 to >=0.54.0,<1 #219's title reads "update uvicorn[standard] requirement" (Watcher's sqlalchemy[asyncio] PRs read the same way). On its own PR this works. In a group, it drops the whole group.

    ty has a previous version, so once those two are gone the group passes the "every one has a previous version" branch.

    Fix:

    • Ignore uv-build by name. Its range is repeated in ci.yml's setup-uv inputs, which tests/ci enforces, so a bot bump would go red anyway.
    • Exclude google-auth* from dev-tools, so it gets its own PR like uvicorn[standard].
    • Add a guard derived from pyproject.toml: every extras-bearing dependency-group requirement is excluded from the group, and every build requirement is ignored.

    That ships as a second Refs #169 PR. This issue stays open until a run after that merge opens the group PR.

  8. gregoryfoster commented on Nov 22, 2026

    @gregoryfoster
    MemberAuthor

    Done: the uv updater resolves against co-pypi and opens every PR it should

    Shipped in #217 (4812239) and #225 (2f0f8b1). CI on main passed on every job for both. No deploy was owed for either: they changed .github/, tests and docs only.

    Second run (45062440896, triggered by #225's merge), concluded success:

    Deploys owed, measured with the release_set diff in docs/DEPLOYMENT.md. Every open uv PR owes a deploy after its merge, the group PR included:

    PR Release install set moves
    #219 uvicorn 0.52.0 → 0.54.0
    #220–#223 fastapi, pydantic, python-json-logger, pydantic-settings (each a direct runtime dependency)
    #224 python-ulid 3.2.1 → 4.2.0 (major)
    #226 anyio 4.14.2 → 4.16.0
    #227 google-auth 2.56.3 → 2.62.2

    #218 (setup-uv) needs no deploy.

    Worth knowing: #226 widens ruff's cap from <0.17 to <0.18. To Dependabot, a 0.x minor is not a major, so it isn't held back even when majors are ignored. Lint passes on 0.17.6.

    Verification skipped:

    • test_sessions_here_are_killable was skipped in every local run. It needs an exe.dev session ancestor; CI ran it.
    • I haven't seen a security-update run against the index since uv was turned on, because there are 0 open alerts.

    For #154:

  9. gregoryfoster commented on Nov 22, 2026

    @gregoryfoster
    MemberAuthor

    Bot PRs merged and deployed (2026-11-22)

    #218–#224, #226 and #227 were merged one at a time. Each was merged only after it was current with main, mergeable, and green on all 4 CI jobs on its rebased head. Dependabot rebased #221 on its own; every other PR needed an @dependabot rebase comment.

    One deploy: scripts/deploy.sh moved 753ecb9609a0 → c08b81882bdc and exited 0. CI was green on the merge commit. It reported worker ready on the new build, and the unit shows 0 restarts and no error lines since.

    The release install set, release_set 753ecb9 → c08b818:

    • anyio 4.14.2 → 4.16.0
    • fastapi 0.141.1 → 0.165.0
    • google-auth 2.56.3 → 2.62.2
    • opentelemetry-api (new) 1.45.2
    • pydantic 2.13.4 → 2.14.4
    • pydantic-core 2.46.4 → 2.50.5
    • pydantic-settings 2.14.2 → 2.16.3
    • python-json-logger 4.1.0 → 4.2.0
    • python-ulid 3.2.1 → 4.2.0
    • starlette 1.3.1 → 1.10.0
    • typing-inspection 0.4.2 → 0.4.5
    • uvicorn 0.52.0 → 0.54.0

    python-ulid 4: 4.0.0's one breaking change removed ValueProvider and ULID.provider. Neither src/, scripts/ nor co-core 0.50.0 uses them. Replicator's only use is str(ULID()), in the two seed scripts.

  10. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    Verified (coordinator, epic #154, 2026-11-23)

    • CI by job: green on 4812239 (#169 chore: add the uv ecosystem to Dependabot #217), 2f0f8b1 (#169 fix: keep the dev-tools group PR from being dropped #225) and main's tip c08b818: test, lint, gcs, browser, update-uv-graph [measured].
    • Live: /srv/replicator/live → releases/c08b81882bdc, BUILD_ID=c08b81882bdc, active since 2026-11-22 21:32:03Z with 0 restarts. 32 INFO lines since, no WARNING or ERROR, and no replicator-failure records. The release venv has fastapi 0.165.0, pydantic 2.14.4, python-ulid 4.2.0, uvicorn 0.54.0, google-auth 2.62.2, anyio 4.16.0, co-core ×3 0.50.0, playwright 1.64.1 [measured].
    • Suite on c08b818: 2074 passed, 2 skipped (test_co_core_closure_diff.py:433, no wheels; test_deploy.py:1049, not an exe.dev session; CI runs it). ruff check and format clean. This is the epic's new baseline.
    • Harvested: the playwright note is now Playwright: bump the pin (1.64.1 → 1.65.2), and let the deploy install its shell #228. The python-ulid major was reviewed and merged (4.0.0 removed only ValueProvider and ULID.provider, unused here).
  11. added a commit that references this issue on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions