From 1cf2bb4c1642bd17afeffcc9c815e847a2f0fa1d Mon Sep 17 00:00:00 2001 From: Eric Hare Date: Wed, 10 Jun 2026 07:19:46 -0700 Subject: [PATCH] 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. --- .github/workflows/db-migration-validation.yml | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/db-migration-validation.yml b/.github/workflows/db-migration-validation.yml index c82589ca26..9a3c905c4c 100644 --- a/.github/workflows/db-migration-validation.yml +++ b/.github/workflows/db-migration-validation.yml @@ -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