Skip to content

dda: run uv from a temporary directory#264

Open
Yumasi wants to merge 1 commit intomainfrom
yumasi/uv-path-fix
Open

dda: run uv from a temporary directory#264
Yumasi wants to merge 1 commit intomainfrom
yumasi/uv-path-fix

Conversation

@Yumasi
Copy link
Copy Markdown
Member

@Yumasi Yumasi commented Apr 13, 2026

UV.execution_context() currently copies the bundled uv executable next to the installed binary before running it. That only works if the install directory is writable, which is not guaranteed for system-managed or otherwise protected prefixes.

Copy the executable into a fresh temporary directory instead and execute it from there. This keeps the existing "run a copy of uv" behavior, which avoids modifying the in-use binary on Windows, while removing the dependency on write access to uv's install location.

@Yumasi Yumasi requested a review from a team as a code owner April 13, 2026 16:31
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1e0611c933

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/dda/tools/uv.py Outdated
@Yumasi Yumasi force-pushed the yumasi/uv-path-fix branch from 1e0611c to 07e4217 Compare April 13, 2026 16:35
@Yumasi Yumasi marked this pull request as draft April 13, 2026 16:37
@Yumasi Yumasi force-pushed the yumasi/uv-path-fix branch from 07e4217 to da52509 Compare April 13, 2026 16:44
`UV.execution_context()` currently copies the bundled `uv` executable next to
the installed binary before running it. That only works if the install
directory is writable, which is not guaranteed for system-managed or otherwise
protected prefixes.

Copy the executable into a fresh temporary directory instead and execute it
from there. This keeps the existing "run a copy of uv" behavior, which avoids
modifying the in-use binary on Windows, while removing the dependency on write
access to uv's install location.
@Yumasi Yumasi force-pushed the yumasi/uv-path-fix branch from da52509 to 27868b9 Compare April 13, 2026 16:56
@datadog-prod-us1-6

This comment has been minimized.

@Yumasi Yumasi marked this pull request as ready for review April 13, 2026 17:03
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27868b9a44

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/dda/tools/uv.py

try:
safe_name = path.with_stem(f"{path.stem}-{path.id}").name
with temp_directory() as temp_dir:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid executing uv from default temp mount

execution_context now always runs uv from a file copied into temp_directory(), which uses the system temp location by default. In hardened Linux environments where that temp filesystem is mounted noexec, launching this copied binary fails with EACCES/permission denied, so all uv-backed commands break even though the installed uv is valid. The previous implementation executed from the original install filesystem, so this is a regression for those hosts; pick an exec-capable writable directory (or fallback strategy) instead of unconditionally using the default temp dir.

Useful? React with 👍 / 👎.

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.

1 participant