Skip to content

fix(ai-agents): honor uv.lock during local run - #9237

Merged
trangevi merged 1 commit into
mainfrom
glharper/9226-honor-uv-lock
Jul 23, 2026
Merged

fix(ai-agents): honor uv.lock during local run#9237
trangevi merged 1 commit into
mainfrom
glharper/9226-honor-uv-lock

Conversation

@glharper

Copy link
Copy Markdown
Member

Summary

  • use uv sync --locked when a Python agent project contains both pyproject.toml and uv.lock
  • treat the lock file as authoritative instead of applying additional requirements.txt installs afterward
  • require uv for locked projects while preserving the existing pip fallback for unlocked projects

Testing

  • go test ./internal/cmd -count=1
  • go build ./...
  • golangci-lint run ./internal/cmd/...
  • exercised uv sync --locked --python <venv-python> --quiet against a temporary uv project and confirmed the lock file was unchanged

Fixes #9226

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fed9e97b-e79b-4889-ac76-0d9a428599cd
Copilot AI review requested due to automatic review settings July 21, 2026 20:54
@github-actions

Copy link
Copy Markdown

📋 Prioritization Note

Thanks for the contribution! The linked issue isn't in the current milestone yet.
Thank you for logging this issue; our team is reviewing it. If you need urgent prioritization, tag @RickWinter and @kristenwomack to let us know.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
21 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI 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.

Pull request overview

Updates local Python agent runs to honor uv.lock.

Changes:

  • Uses uv sync --locked for locked projects.
  • Preserves pip fallback for unlocked projects.
  • Adds coverage for command selection and missing uv.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
internal/cmd/run.go Implements lock-aware dependency installation.
internal/cmd/run_test.go Tests locked and fallback behavior.

@github-actions github-actions Bot added the ext-agents azure.ai.agents extension label Jul 21, 2026

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Honoring uv.lock via uv sync --locked is the right call, and requiring uv only for locked projects while keeping the pip fallback for unlocked ones is a clean split. Tests cover the lock-authoritative, pyproject-only, requirements-only, and missing-uv paths. CI is green.

@trangevi
trangevi merged commit e6f0357 into main Jul 23, 2026
30 checks passed
trangevi added a commit that referenced this pull request Jul 30, 2026
…leases (#9371)

* chore: prepare azure.ai.agents 1.0.0-beta.8 release

Bump version and add changelog for 10 PRs since beta.7:
- Features: max_stalls early-stopping (#9314), invocations protocol 2.0.0 default (#9327)
- Bug fixes: #9365, #9328, #9291, #9290, #9212, #9211, #9280, #9237

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* chore: prepare azure.ai.projects 1.0.0-beta.4 release

Bump version and add changelog for 1 PR since beta.3:
- Bug fix: cap Foundry ARM deployment names to 64 chars (#9292)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* chore: add imatiach to cspell contributor aliases

Fix cspell-ext CI gate failure for the azure.ai.agents CHANGELOG entry
referencing @imatiach-msft (PR #9314).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.agents extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[azure.ai.agents] Honor uv.lock in azd ai agent run

4 participants