chore(docker): Migrate to statement that supports Dependabot uv upgrades - #2405
Open
eugengi wants to merge 1 commit into
Open
chore(docker): Migrate to statement that supports Dependabot uv upgrades#2405eugengi wants to merge 1 commit into
uv upgrades#2405eugengi wants to merge 1 commit into
Conversation
Move UV into FROM statement to trigger Dependabot Docker image tag upgrades for UV. [Note] - (style) Add headers to clearly distinct multi-stage sections. - (tag) Upgrade to latest available UV patch version: v0.12.2 Signed-off-by: Eugene Mwangi <mwangi.em37@gmail.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.
Description
I noticed upgrades to the
uvimage tags in theDockerfileare manual. See:Problem
🔴 This results in a version drift for the
uvbinaries used in GitHub Actions (v0.11.18) and Docker (v0.9.26). There's an existing Dependabot config for thedockerecosystem, but Dependabot currently doesn't support upgrading version tags embedded inCOPY --from=...statements (see issue).Solution
🟢 This PR includes a minor patch to provision the
uvbinary with aFROMdirective. This will enable Dependabot to parse and suggest PR upgrades touvimage version tags. This additionally avoids manual upgrades and prevents version drift.Decisions
uvpatch release version was used:v0.12.2DockerfileNote
A solid fix moving forward would be to leverage the UV setting,
required-version, to constrainuvto a single version repo-wide (locally, in-container, gha, etc.).uvrespects and reads this on each invoke and fails fast if the detected binary (or PYPI) does not match that exact version. This change requires a team member to add the setting topyproject.tomlaccording to this repo's CONTRIBUTING.mdCaution
A known caveat is that Dependabot currently does not support upgrading
required-version. A temporary hack would be to have Dependabot infer auvupgrade via a PR, and a maintainer can update therequired-versionsetting to the corresponding version.Additional
backend-build)Setup uv: This step is currently duplicated across 5 workflow files, some with different names (Install uv,Setup uv), each defining auvversion (v0.11.18). Have one composite action and reference it everywhere:I can follow up with PRs for the above or a Discussion to further discuss the changes if the maintainers deem fit!
AI Disclaimer
AI wasn't used given the trivial change. It was, however, used for an extra review to ensure things look normal.
Checklist