mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 06:10:49 +08:00
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.
This commit is contained in:
18
.github/workflows/cross-platform-test.yml
vendored
18
.github/workflows/cross-platform-test.yml
vendored
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user