Skip to content

chore: migrate to uv with supply-chain guardrails#91

Merged
mpkrass7 merged 3 commits into
mainfrom
marshall/uv-update
Apr 1, 2026
Merged

chore: migrate to uv with supply-chain guardrails#91
mpkrass7 merged 3 commits into
mainfrom
marshall/uv-update

Conversation

@mpkrass7
Copy link
Copy Markdown
Collaborator

@mpkrass7 mpkrass7 commented Mar 30, 2026

In my own words: pyproject didn't match requirements.txt in some of the packages. Relevant to litellm stuff was a dependency on mlflow[genai] that we didn't actually need or use. I added the uv.lock to .gitignore for now because of the proxy server.

Dependabot now generates the requirements.lock file for us based on packages being at least 7 days old. Hopefully this is an alright pattern.

AI Summary below is pretty good.

Summary

  • pyproject.toml — added missing deps (flask-socketio, simple-websocket, requests, cryptography); swapped mlflow[genai] for mlflow-tracing (app only uses tracing hooks, confirmed by codebase search); added [tool.uv] with exclude-newer = "7 days" to block packages uploaded less than a week ago; added [tool.uv.sources] git overrides for requests and cryptography (Databricks PyPI proxy workaround)
  • .gitignore — ignore uv.lock since package hashes from the internal proxy aren't portable for customers
  • dependency-audit.yml — added compile step that warns if requirements.txt has drifted from pyproject.toml
  • update-lockfile.yml — new workflow that auto-regenerates requirements.lock whenever Dependabot merges a requirements.txt bump

Test plan

  • CI (dependency-audit.yml) passes on this PR — validates the new compile step works
  • Check the compile step warning output looks reasonable
  • Confirm update-lockfile.yml triggers correctly on a future Dependabot merge

This pull request was AI-assisted by Marshall.

- Add missing deps to pyproject.toml (flask-socketio, simple-websocket,
  requests, cryptography); swap mlflow[genai] for mlflow-tracing
- Add [tool.uv] exclude-newer = "7 days" to block packages less than a
  week old (supply-chain protection)
- Add [tool.uv.sources] git overrides for requests + cryptography
  (Databricks PyPI proxy workaround)
- Gitignore uv.lock — hashes are proxy-specific, not portable for customers
- Add compile step to dependency-audit.yml to warn when requirements.txt
  drifts from pyproject.toml
- Add update-lockfile.yml to auto-regenerate requirements.lock whenever
  Dependabot merges a requirements.txt bump

Co-authored-by: Marshall Krassenstein <marshall.krassenstein@databricks.com>
uv==0.7.12 predates relative duration support in exclude-newer ("7 days").
Switching to the official action ensures we always get a current uv version.

Co-authored-by: Marshall Krassenstein <marshall.krassenstein@databricks.com>
@datasciencemonkey
Copy link
Copy Markdown
Owner

Pyproject.toml isn't used currently. Only requirements.txt and the lock file from there. But this is important. Did you run it on a workspace to see everything runs ok? I'm out at the moment, if things check out fine, please merge right in.

Co-authored-by: Marshall Krassenstein
@mpkrass7 mpkrass7 merged commit 5f36794 into main Apr 1, 2026
1 check failed
@mpkrass7
Copy link
Copy Markdown
Collaborator Author

mpkrass7 commented Apr 1, 2026

FYI @datasciencemonkey it failed the dependabot check because I added a check against the lock file after everything else runs. Confirmed the app runs successfully on dogfood just deploying from git

image

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.

2 participants