Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions bin/setup_monorepo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,34 +68,12 @@ ensure_ldap_build_deps() {
}

sync_workspace() {
local -a uv_sync_all=(
env
-u UV_NO_SOURCES
-u UV_NO_SOURCES_PACKAGE
uv
sync
--all-packages
--all-extras
--no-cache
--active
)
local -a uv_sync_basic=(
env
-u UV_NO_SOURCES
-u UV_NO_SOURCES_PACKAGE
uv
sync
--all-packages
--no-cache
--active
)

if "${uv_sync_all[@]}"; then
if uv sync --all-packages --all-extras --no-cache --active; then
return
fi

warn "'uv sync --all-packages --all-extras --no-cache --active' failed; retrying without --all-extras"
"${uv_sync_basic[@]}"
uv sync --all-packages --no-cache --active
Comment on lines +71 to +76
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.

🟡 Removal of env -u UV_NO_SOURCES causes uv sync to skip workspace sources when env var is set

The old sync_workspace() explicitly unset UV_NO_SOURCES and UV_NO_SOURCES_PACKAGE via env -u before calling uv sync. This was important because the monorepo setup requires workspace source resolution to link member packages together. The new code calls uv sync directly, so if either env var is set, uv sync will skip source-based resolution and likely fail or produce an incomplete environment.

This repo's own CI workflow sets UV_NO_SOURCES: "1" globally (.github/workflows/test-parallel.yml:14). While the CI doesn't invoke setup_monorepo.sh directly, a developer who has UV_NO_SOURCES=1 in their shell (e.g., copied from CI env for debugging) and then runs this setup script will get a broken workspace sync.

Suggested change
if uv sync --all-packages --all-extras --no-cache --active; then
return
fi
warn "'uv sync --all-packages --all-extras --no-cache --active' failed; retrying without --all-extras"
"${uv_sync_basic[@]}"
uv sync --all-packages --no-cache --active
if env -u UV_NO_SOURCES -u UV_NO_SOURCES_PACKAGE uv sync --all-packages --all-extras --no-cache --active; then
return
fi
warn "'uv sync --all-packages --all-extras --no-cache --active' failed; retrying without --all-extras"
env -u UV_NO_SOURCES -u UV_NO_SOURCES_PACKAGE uv sync --all-packages --no-cache --active
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

}

ensure_setup_link() {
Expand Down
Loading