Skip to content

ci: gate langchain CD on uv resolvability, not just PyPI simple index#84

Merged
cosminacho merged 1 commit into
mainfrom
fix/langchain-cd-uv-cache-refresh
May 20, 2026
Merged

ci: gate langchain CD on uv resolvability, not just PyPI simple index#84
cosminacho merged 1 commit into
mainfrom
fix/langchain-cd-uv-cache-refresh

Conversation

@cosminacho
Copy link
Copy Markdown
Collaborator

Summary

When a single PR bumps both uipath-llm-client and uipath-langchain-client, the cd-langchain job can finish its wait step but still fail the smoke test with Because only uipath-llm-client<=PREV_VERSION is available — even though the new core was already published. See run 25555638070.

Root cause: The wait step polled pypi.org/simple/uipath-llm-client/ with Cache-Control: no-cache, which only confirms PyPI's CDN knows about the new version. It does not mean uv will see it. setup-uv@v7 with enable-cache: true restores uv's metadata cache across job runs, so uv's cached simple-index entry for uipath-llm-client can still show only the previous version. The downstream uv run --with "${WHEEL}[all]" then resolves against that stale cache and fails.

Timing from the failed run:

  • 12:31:58 — curl saw uipath-llm-client==1.11.0 on the simple index
  • 12:32:07uv reported only uipath-llm-client<=1.10.0 is available (9s later)

Fix:

  • Move setup-uv and setup-python ahead of the wait step.
  • Replace the curl probe with uv pip install --dry-run --refresh-package uipath-llm-client "uipath-llm-client==$CORE_VERSION". --refresh-package invalidates uv's local metadata cache for just that project and forces a fresh fetch on each attempt. Once it succeeds, uv's cache is warm with the new version and downstream smoke tests inherit it.
  • Pass --refresh-package uipath-llm-client on the smoke tests as well, as belt-and-suspenders.

This mirrors the approach used in the uipath-python repo's build-package.yml (uv lock --no-sources --no-cache with retries), adapted to our existing wait-then-poll structure.

Only cd-langchain.yml changes — no source changes, no version bump.

Test plan

  • Next combined core+langchain bump completes the langchain smoke test on the first attempt
  • Langchain-only bumps still skip the wait (no core diff in last commit)

🤖 Generated with Claude Code

The previous wait step polled pypi.org/simple/ with curl, which confirmed
PyPI knew about the new core version but did not guarantee uv would see it.
setup-uv@v7 with enable-cache: true restores uv's metadata cache across job
runs, so the cached simple-index page for uipath-llm-client could still show
only the previous version even after PyPI had published the new one — causing
the smoke test's `uv run --with "${WHEEL}[all]"` to fail to resolve
uipath-llm-client>=NEW_VERSION (see run 25555638070).

Switch the readiness probe to `uv pip install --dry-run --refresh-package
uipath-llm-client`, which invalidates uv's local cache for the package and
forces a fresh fetch each attempt. Once it succeeds, uv's cache is warm with
the new version and the downstream smoke tests inherit it. Also pass
--refresh-package on the smoke tests themselves as belt-and-suspenders.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cosminacho cosminacho force-pushed the fix/langchain-cd-uv-cache-refresh branch from eecbca9 to 86d4310 Compare May 20, 2026 15:56
@cosminacho cosminacho merged commit def5f9a into main May 20, 2026
9 checks passed
@cosminacho cosminacho deleted the fix/langchain-cd-uv-cache-refresh branch May 20, 2026 16:21
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