Skip to content

feat(scratch): Add support for installing scratch repositories with uv.lock - #1679

Open
Relm-Arrowny wants to merge 3 commits into
mainfrom
add_uv_lock
Open

Relm-Arrowny wants to merge 3 commits into
mainfrom
add_uv_lock

Conversation

@Relm-Arrowny

@Relm-Arrowny Relm-Arrowny commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

fix #1678
Just notice you can do target version: so may be this is not needed.

Changes

  • Added use_uv_lock in ScratchRepository
  • Modified scratch_install to make use of use_uv_lock to allow uv sync
  • Updated Helm schema and tests to reflect these changes

@Relm-Arrowny Relm-Arrowny changed the title add uv lock Add support for installing scratch repositories with uv.lock Sep 18, 2026
@Relm-Arrowny Relm-Arrowny changed the title Add support for installing scratch repositories with uv.lock feat(scratch): Add support for installing scratch repositories with uv.lock Sep 18, 2026
@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.34%. Comparing base (a4dbc35) to head (971d74d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1679   +/-   ##
=======================================
  Coverage   96.34%   96.34%           
=======================================
  Files          46       46           
  Lines        3665     3670    +5     
=======================================
+ Hits         3531     3536    +5     
  Misses        134      134           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Relm-Arrowny
Relm-Arrowny marked this pull request as ready for review September 18, 2026 15:05
@Relm-Arrowny
Relm-Arrowny requested a review from a team as a code owner September 18, 2026 15:05

@ZohebShaikh ZohebShaikh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use_uv_lock as designed doesn't really deliver on its own premise. Because blueapi installs scratch repos into one shared environment, no single repo's uv.lock tells you what's actually installed in blueapi — it only reflects that repo's own resolution. If repo A opts into use_uv_lock and repo B doesn't (or B has its own lockfile with different pinned versions), B's install can silently override dependencies A's lock was relying on. Per-repo opt-in doesn't prevent this, and worse, it doesn't even reliably work per-repo: if two use_uv_lock repos pin different versions of the same transitive dependency, the outcome depends on install order — it'll work by accident in some configs and break in others.

Proposed fix: move use_uv_lock up to ScratchConfig (not per-repo), so it's an explicit, all-or-nothing decision about the whole scratch environment's install strategy, plus a configurable path to the lockfile to use (defaulting to uv.lock when there's only one scratch repo). For multiple repos, there's no sound way to combine independently-generated lockfiles at install time — a consolidated lockfile covering all scratch repos together needs to be generated in CI at release time instead.

This branch has not been deployed

No deployments
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.

Ensure reproducible beamline deployments by pinning dependencies from uv.lock

2 participants