[apiview-stub-generator] Use uv for package install (revert timeout to 120s)#16429
Merged
Conversation
…o 120s Install the target package with 'uv pip install' when uv is available (falling back to pip otherwise). uv's resolver is far faster than pip's for large, beta-pinned dependency trees such as the Microsoft OpenTelemetry distro, where pip spent minutes backtracking (observed ~370s for azure-ai-agentserver-core). With uv this drops to seconds, so the elevated install timeout is no longer needed and is reverted from 300s back to 120s. Bumps version to 0.3.30.
|
Azure Pipelines: Successfully started running 1 pipeline(s). 64 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the apiview-stub-generator package installation step to prefer uv pip install (when available) to avoid pip’s slow dependency backtracking on large graphs, allowing the install timeout to be reverted to its original value.
Changes:
- Prefer
uv pip install --python <interp>overpip installwhenuvis available onPATH, with a clean fallback to pip. - Revert the package install timeout back to 120s.
- Bump package version to 0.3.30 and add a CHANGELOG entry describing the change.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/python-packages/apiview-stub-generator/apistub/_stub_generator.py | Prefer uv for package installs and revert install timeout to 120s. |
| packages/python-packages/apiview-stub-generator/apistub/_version.py | Version bump to 0.3.30. |
| packages/python-packages/apiview-stub-generator/CHANGELOG.md | Document the uv install change and timeout revert. |
danieljurek
approved these changes
Jul 21, 2026
Hameedkunkanoor
enabled auto-merge (squash)
July 21, 2026 09:13
danieljurek
disabled auto-merge
July 21, 2026 09:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Installs the target package with
uv pip install(whenuvis on PATH) instead ofpipbefore generating the API view, and reverts the package-install timeout from 300s back to the original 120s.Why
Follow-up to #16395. That PR raised the timeout to 300s to accommodate
azure-ai-agentserver-core, whose install pulls the full Microsoft OpenTelemetry instrumentation tree. Verbose diagnostics showed the slowness was pip's dependency resolver backtracking over the large, beta-pinned graph (42 packages, 52 downloads, 0 cached, no network retries, only a few MB transferred) — a CPU/resolver problem, not network. The install took ~370s under pip and even blew past 300s.uv's resolver handles the same tree in seconds (the repo's dev-requirement installs already use uv and resolve in ~1-2s). Switching apistub's own package install to uv removes the root cause, so the elevated timeout is no longer necessary.Changes
_install_package: preferuv pip install --python <interp>whenuvis available; fall back topip installotherwise.300s -> 120s.0.3.29 -> 0.3.30+ CHANGELOG entry.Notes
AZPYSDK_PIP_IMPL=uv), withUV_DEFAULT_INDEXwired to the authenticated feed — so this aligns apistub's last pip holdout with the established pattern.