Skip to content

Conversation

@anubhav756
Copy link
Contributor

@anubhav756 anubhav756 commented Jan 9, 2026

Overview

This PR migrates our integration test pipelines from pip to uv, reducing installation time by ~60% and significantly improving dependency resolution stability.

Changes

  • Updated integration.cloudbuild.yaml for all packages (toolbox-core, toolbox-adk, toolbox-langchain, toolbox-llamaindex) to use uv and persistent virtual environments.
  • Upgraded typing-extensions>=4.12.2 in toolbox-adk to resolve a conflict masked by pip but caught by uv's stricter resolver.

Note

This PR does not only speeds up CI but also provides the resolution capabilities needed for upcoming Python 3.14 support (#494).

Problem

There were 2 problems that occur with adding Python 3.14 without uv:

  1. The resolver hangs for 20+ minutes printing warnings like:
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints...
INFO: pip is looking at multiple versions of pydantic-core to determine which version is compatible...
  1. In its desperation to find any working combination, pip eventually backtracks to ancient versions of libraries. These older versions contain C-extensions that are fundamentally incompatible with the Python 3.14 C API, causing build failures:
error: implicit declaration of function ‘PyUnicode_New’
error: ‘PyUnicode_KIND’ undeclared

Solution

uv's resolver is significantly faster and correctly navigates the dependency graph without excessive backtracking, essentially forcing the resolver to pick newer, compatible source distributions instead of falling back to broken legacy versions. This prevents the build from hanging and ensures we install versions of pydantic-core (2.41+) that actually compile on Python 3.14.

@anubhav756 anubhav756 self-assigned this Jan 9, 2026
@anubhav756 anubhav756 force-pushed the anubhav-uv branch 2 times, most recently from 3d323e0 to b18d0d2 Compare January 9, 2026 21:08
Migrates all package integration tests to use uv for dependency installation.
Also resolves a typing-extensions conflict in toolbox-adk.

This provides a significant speedup for integration runs and improves dependency resolution stability.
@anubhav756 anubhav756 changed the title chore: Replace pip with uv for dependency and test requirement installation in Cloud Build feat: replace pip with uv for 60% faster integration tests Jan 9, 2026
@anubhav756 anubhav756 marked this pull request as ready for review January 9, 2026 21:39
@anubhav756 anubhav756 requested a review from a team as a code owner January 9, 2026 21:39
entrypoint: pip
- '-c'
- |
pip install uv
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to install uv again or just reactive the venv?

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.

2 participants