From b0b5849fa4b9aeee9c19e069da7ef0666d5a8875 Mon Sep 17 00:00:00 2001 From: Eric Hare Date: Fri, 22 May 2026 20:29:51 -0700 Subject: [PATCH] =?UTF-8?q?fix(ci):=20narrow=20--prerelease=3Dallow=20to?= =?UTF-8?q?=20wheels=20in=20cross-platform=20instal=E2=80=A6=20(#13303)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(ci): narrow --prerelease=allow to wheels in cross-platform install tests Nightly cross-platform install tests were failing on Python 3.12/3.13 with a pydantic ValidationError at langchain_core import time: File ".../langchain_core/runnables/passthrough.py", line 349, in _graph_passthrough: RunnablePassthrough = RunnablePassthrough() pydantic_core._pydantic_core.ValidationError: 1 validation error for RunnablePassthrough name Field required ... Cause: --prerelease=allow was pulling pydantic 2.14.0a1 as a transitive dep, which is incompatible with langchain-core 1.4.0's top-level RunnablePassthrough() initialization. We need pre-releases enabled for the nightly langflow* .dev wheels we pass on the command line, but not for transitive deps. Switch to --prerelease=if-necessary-or-explicit, which keeps the explicit .dev wheel installs working while resolving stable pydantic for everything else. --- .github/workflows/cross-platform-test.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cross-platform-test.yml b/.github/workflows/cross-platform-test.yml index efdc2b2e98..1a6c3456f4 100644 --- a/.github/workflows/cross-platform-test.yml +++ b/.github/workflows/cross-platform-test.yml @@ -293,7 +293,12 @@ jobs: printf 'Installing %s wheel(s):\n' "$label" printf '%s\n' "$@" refresh_find_links - uv pip install --prerelease=allow --python "$PYTHON" "${FIND_LINKS[@]}" "$@" + # Use `if-necessary-or-explicit` (not `allow`): nightly langflow* wheels + # are .dev pre-releases so we need to allow them explicitly, but `allow` + # leaks to transitive deps and resolves pre-release pydantic alphas + # (e.g. 2.14.0a1) which break langchain-core's module-level + # `RunnablePassthrough()` call at import time. + uv pip install --prerelease=if-necessary-or-explicit --python "$PYTHON" "${FIND_LINKS[@]}" "$@" } SDK_WHEELS=(./sdk-dist/*.whl) @@ -581,7 +586,8 @@ jobs: printf 'Installing %s wheel(s):\n' "$label" printf '%s\n' "$@" refresh_find_links - uv pip install --prerelease=allow --python "$PYTHON" "${FIND_LINKS[@]}" "$@" + # See stable job above for rationale on --prerelease=if-necessary-or-explicit. + uv pip install --prerelease=if-necessary-or-explicit --python "$PYTHON" "${FIND_LINKS[@]}" "$@" } SDK_WHEELS=(./sdk-dist/*.whl) @@ -631,7 +637,7 @@ jobs: if [ "${{ inputs.pre_release }}" = "true" ]; then NO_DEPS="" fi - uv pip install --force-reinstall $NO_DEPS --prerelease=allow --python ./test-env/Scripts/python.exe "${INSTALL_WHEELS[@]}" + uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit --python ./test-env/Scripts/python.exe "${INSTALL_WHEELS[@]}" fi fi @@ -643,7 +649,7 @@ jobs: if [ "${{ inputs.pre_release }}" = "true" ]; then NO_DEPS="" fi - uv pip install --force-reinstall $NO_DEPS --prerelease=allow --python ./test-env/Scripts/python.exe "$BASE_WHEEL" + uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit --python ./test-env/Scripts/python.exe "$BASE_WHEEL" fi shell: bash @@ -668,7 +674,7 @@ jobs: if [ "${{ inputs.pre_release }}" = "true" ]; then NO_DEPS="" fi - uv pip install --force-reinstall $NO_DEPS --prerelease=allow --python ./test-env/bin/python "${INSTALL_WHEELS[@]}" + uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit --python ./test-env/bin/python "${INSTALL_WHEELS[@]}" fi fi @@ -680,7 +686,7 @@ jobs: if [ "${{ inputs.pre_release }}" = "true" ]; then NO_DEPS="" fi - uv pip install --force-reinstall $NO_DEPS --prerelease=allow --python ./test-env/bin/python "$BASE_WHEEL" + uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit --python ./test-env/bin/python "$BASE_WHEEL" fi shell: bash