chore: pin uv version and drop --verbose from deploy logs - #14
Draft
gkrimer wants to merge 1 commit into
Draft
Conversation
setup-uv's working-directory defaults to the *consumer's* checkout, so every deploy probed e.g. filing-service's Rails root for a uv version pin, found nothing, and installed uv latest: Trying to find version for uv in: /home/runner/work/filing-service/filing-service/pyproject.toml Could not find file: /home/runner/work/filing-service/filing-service/pyproject.toml Could not determine uv version from uv.toml or pyproject.toml. Falling back to latest. uv.lock + --frozen pin the 17 dependencies, but the tool installing them floated to whatever shipped that morning -- across all 11 repos consuming this action at @main, with no PR to review. Nothing was broken (setup-uv puts the binary on PATH globally; the sync/run steps already set working-directory), but the version pin and the cache key both came from the wrong project. - action.yml: working-directory -> github.action_path, so setup-uv reads our pyproject.toml. Also drops the consumer's Python version from the cache key (filing-service keyed on "unknown", instrumentl on "3.12.3", both irrelevant -- the action always runs on its own 3.11) - pyproject.toml: required-version = "==0.11.32", the version CI and both production runs have been passing with - .tool-versions: uv 0.10.9 -> 0.11.32; local was two minors behind the runner - action.yml, smoke-test.sh: drop --verbose. It set the *root* logger to DEBUG, so GitPython logged every subprocess and urllib3 every API call into the deploy log alongside our own three lines ci.yml needs no change: its workspace is this repo, so setup-uv now picks up required-version automatically. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
setup-uv'sworking-directorydefaults to the consumer's checkout, not the action's. So on every deploy it probed e.g. filing-service's Rails root for a uv version pin, found nothing, and installed uv latest (real log, filing-service run 30319696325):uv.lock+--frozenpin the 17 dependencies and #12 added--lockedto gate lockfile drift — then the tool doing the installing floated to whatever shipped that morning, across all 11 repos consuming this action at@main, with no PR to review.Nothing was broken: setup-uv puts the binary on
PATHglobally (/opt/hostedtoolcache/uv/0.11.32/x86_64/uv), and the sync/run steps already setworking-directory. But the version pin and the cache key both came from the wrong project.Second,
--verbosewas hardcoded intoaction.yml. It hitslogging.basicConfig, which configures the root logger — so GitPython and urllib3 inherit DEBUG and log every subprocess and API call into the deploy output, around 3 useful lines of our own.Changes
action.ymlworking-directory: ${{ github.action_path }}on the setup-uv steppyproject.tomlrequired-version = "==0.11.32".tool-versionsuv 0.10.9→0.11.32— local was two minors behind the runneraction.yml,smoke-test.sh--verbose0.11.32 is what CI and both production runs have already been passing with.
ci.ymlneeds no change: its workspace is this repo, so setup-uv now picks uprequired-versionautomatically — meaning this PR's own CI run validates the mechanism.Pointing setup-uv at the action also drops the consumer's Python version from the cache key. It was keyed on an irrelevant dimension — filing-service
unknown, instrumentl3.12.3— while the action always runs on its own 3.11:How to test this
Before — the deploy log for every consumer:
After:
Full local suite against the pinned uv:
Notes for the reviewer
action.ymlhalf is not verified by CI. CI never runs the composite action, soworking-directoryfindingrequired-versionis only proven on a real consumer deploy. ExpectTrying to find version for uv in: /home/runner/work/_actions/.../pyproject.tomland an exact 0.11.32 install instead of the manifest fetch.required-versionis enforced by uv itself on every invocation, which is why.tool-versionsmoves in lockstep. Upgrades now need both files edited together, and Dependabot won't propose them — deliberate review over silent drift.🤖 Generated with Claude Code