Skip to content

Commit b0b5849

Browse files
committed
fix(ci): narrow --prerelease=allow to wheels in cross-platform instal… (#13303)
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 <module> _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.
1 parent 49de16c commit b0b5849

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/cross-platform-test.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,12 @@ jobs:
293293
printf 'Installing %s wheel(s):\n' "$label"
294294
printf '%s\n' "$@"
295295
refresh_find_links
296-
uv pip install --prerelease=allow --python "$PYTHON" "${FIND_LINKS[@]}" "$@"
296+
# Use `if-necessary-or-explicit` (not `allow`): nightly langflow* wheels
297+
# are .dev pre-releases so we need to allow them explicitly, but `allow`
298+
# leaks to transitive deps and resolves pre-release pydantic alphas
299+
# (e.g. 2.14.0a1) which break langchain-core's module-level
300+
# `RunnablePassthrough()` call at import time.
301+
uv pip install --prerelease=if-necessary-or-explicit --python "$PYTHON" "${FIND_LINKS[@]}" "$@"
297302
}
298303
299304
SDK_WHEELS=(./sdk-dist/*.whl)
@@ -581,7 +586,8 @@ jobs:
581586
printf 'Installing %s wheel(s):\n' "$label"
582587
printf '%s\n' "$@"
583588
refresh_find_links
584-
uv pip install --prerelease=allow --python "$PYTHON" "${FIND_LINKS[@]}" "$@"
589+
# See stable job above for rationale on --prerelease=if-necessary-or-explicit.
590+
uv pip install --prerelease=if-necessary-or-explicit --python "$PYTHON" "${FIND_LINKS[@]}" "$@"
585591
}
586592
587593
SDK_WHEELS=(./sdk-dist/*.whl)
@@ -631,7 +637,7 @@ jobs:
631637
if [ "${{ inputs.pre_release }}" = "true" ]; then
632638
NO_DEPS=""
633639
fi
634-
uv pip install --force-reinstall $NO_DEPS --prerelease=allow --python ./test-env/Scripts/python.exe "${INSTALL_WHEELS[@]}"
640+
uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit --python ./test-env/Scripts/python.exe "${INSTALL_WHEELS[@]}"
635641
fi
636642
fi
637643
@@ -643,7 +649,7 @@ jobs:
643649
if [ "${{ inputs.pre_release }}" = "true" ]; then
644650
NO_DEPS=""
645651
fi
646-
uv pip install --force-reinstall $NO_DEPS --prerelease=allow --python ./test-env/Scripts/python.exe "$BASE_WHEEL"
652+
uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit --python ./test-env/Scripts/python.exe "$BASE_WHEEL"
647653
fi
648654
shell: bash
649655

@@ -668,7 +674,7 @@ jobs:
668674
if [ "${{ inputs.pre_release }}" = "true" ]; then
669675
NO_DEPS=""
670676
fi
671-
uv pip install --force-reinstall $NO_DEPS --prerelease=allow --python ./test-env/bin/python "${INSTALL_WHEELS[@]}"
677+
uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit --python ./test-env/bin/python "${INSTALL_WHEELS[@]}"
672678
fi
673679
fi
674680
@@ -680,7 +686,7 @@ jobs:
680686
if [ "${{ inputs.pre_release }}" = "true" ]; then
681687
NO_DEPS=""
682688
fi
683-
uv pip install --force-reinstall $NO_DEPS --prerelease=allow --python ./test-env/bin/python "$BASE_WHEEL"
689+
uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit --python ./test-env/bin/python "$BASE_WHEEL"
684690
fi
685691
shell: bash
686692

0 commit comments

Comments
 (0)