fix(ci): scope nightly migration-test pre-releases to the langflow stack (1.10.1) (#13605)

fix(ci): scope nightly migration-test pre-releases to the langflow stack

The previous fix (#13599) added a global --prerelease=allow, which let
UNRELATED dependencies resolve to alphas: on nightly run 27274206250
the stable->nightly upgrade pulled pydantic 2.14.0a1 + pydantic-yaml
1.6.1a1, and the pydantic alpha breaks langchain-core at import time
(RunnablePassthrough pydantic ValidationError), failing the nightly
boot right after a successful install. Clean installs were fine - only
this upgrade path resolved the alpha combo.

Scope pre-release eligibility to the langflow lockstep stack instead:
uv accepts a pre-release when the package's own requirement carries a
pre-release marker, but not via transitive pins, and the nightly chain
is langflow -> langflow-base -> lfx -> langflow-sdk with exact ==devN
pins. Request each directly; langflow-sdk versions independently
(0.2.0.devN), so an explicit .dev0 floor marks it eligible while lfx's
exact pin selects the version. The 'latest' branch gets the same
treatment via .dev0 floors on all four.

Verified by dry-run against PyPI: langflow/langflow-base/lfx at
1.11.0.dev2 + langflow-sdk 0.2.0.dev2 resolve with pydantic staying at
stable 2.13.4.
This commit is contained in:
Eric Hare
2026-06-10 07:19:46 -07:00
committed by GitHub
parent 481cdd3499
commit 1cf2bb4c16

View File

@ -178,20 +178,26 @@ jobs:
VERSION="${VERSION#v}"
echo "Version for PyPI: $VERSION"
# Scope pre-release resolution to the langflow stack only. uv accepts a
# pre-release for a package when its own requirement carries a pre-release
# marker, but NOT via transitive pins (langflow -> langflow-base -> lfx ->
# langflow-sdk are exact ==devN pins on nightlies), so each lockstep package
# must be requested directly. A global --prerelease=allow is NOT safe here:
# it lets unrelated dependencies resolve to alphas (pydantic 2.14.0a1 broke
# langchain-core imports on the first canonical-prerelease nightly).
# langflow-sdk has its own version line, so an explicit .dev0 floor marks it
# pre-release-eligible while the lfx pin selects the exact version.
if [[ "$VERSION" == "latest" ]]; then
# Install latest nightly (canonical pre-release) from PyPI
uv pip install --upgrade --prerelease=allow 'langflow[postgresql]'
uv pip install --upgrade 'langflow[postgresql]>=0.0.0.dev0' 'langflow-base>=0.0.0.dev0' 'lfx>=0.0.0.dev0' 'langflow-sdk>=0.0.0.dev0'
else
# Install specific version. --prerelease=allow is required even for an
# exact ==X.Y.Z.devN pin: uv only implicitly allows the pre-release for
# the directly requested package, while langflow's metadata pins
# langflow-base==X.Y.Z.devN transitively, which uv rejects without it.
uv pip install --upgrade --prerelease=allow "langflow[postgresql]==$VERSION"
# Install specific version
uv pip install --upgrade "langflow[postgresql]==$VERSION" "langflow-base==$VERSION" "lfx==$VERSION" 'langflow-sdk>=0.0.0.dev0'
fi
else
# Direct version string (strip 'v' prefix if present)
VERSION="${NIGHTLY_TAG#v}"
uv pip install --upgrade --prerelease=allow "langflow[postgresql]==$VERSION"
uv pip install --upgrade "langflow[postgresql]==$VERSION" "langflow-base==$VERSION" "lfx==$VERSION" 'langflow-sdk>=0.0.0.dev0'
fi
# Verify upgrade