fix: avoid pickling vertex component instances - #13172
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe PR clears runtime state from Vertex serialization (setting custom_component to None) and adds a unit test asserting the serialized state is pickleable. It also updates many starter project/component dependency pins (langchain_core, langchain_classic, git, pytest), tweaks CI workflow merge/upload steps, and makes frontend tests use dynamic expectations. ChangesVertex Serialization Fix
Bulk dependency, asset, CI, and test updates
🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 8 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (8 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
CI status update:
I attempted to rerun the failed workflow/jobs, but GitHub did not allow reruns for this run. This should be ready for maintainer review from the code side. |
|
Latest update on this PR:
I do not see a remaining code/test failure to address from the fork branch. |
ogabrielluiz
left a comment
There was a problem hiding this comment.
Hey @newmattock, thanks for the PR. Clean fix and the test pins the regression nicely. Approving.
Summary
Fixes #8476 by making
Vertex.__getstate__()drop the livecustom_componentinstance before graph state serialization. Runtime component objects can hold unserializable state, so keeping them in the pickled vertex state can break distributed execution. The graph still keeps the component metadata/configuration; only the live runtime instance is cleared from the pickle state.This also adds a regression test that installs an intentionally unpickleable runtime component on a vertex and verifies the
__getstate__()result can still be pickled.Generated metadata and CI follow-up
The repository's CI regenerates starter-project dependency metadata and
component_index.json; these generated files are included because the autofix jobs fail when they are omitted.The PR updates the
Update Component Indexworkflow checkout path so fork PRs check out the contributor head repository/ref before merging the upstream base. That removes the checkout failure where the workflow looked forcodex/drop-vertex-component-stateinlangflow-ai/langflowinstead ofnewmattock/langflow.The release assistant-panel smoke test now also accepts the CI empty-provider state (
No Model Provider Configured). That state is what the GitHub runner shows when no model-provider secrets are configured, and it was the red Playwright shard on this branch.The frontend coverage upload is now best-effort only for fork PRs, where
secrets.CODECOV_TOKENis unavailable and Codecov rejects tokenless uploads. Non-fork runs still keep strictfail_ci_if_errorbehavior.Validation
python3 -m py_compile src/lfx/src/lfx/graph/vertex/base.py src/lfx/tests/unit/graph/vertex/test_vertex_base.pygit diff --checkuv run pytest src/lfx/tests/unit/graph/vertex/test_vertex_base.py -qcould not execute in this sparse checkout becauselfxreferenceslangflow-sdkas a workspace source, whilelangflow-sdkis not available as a workspace member in this local environment.729440b0fdhad no failed checks before the scope-cleanup experiment; latest head357524ee38is running fresh CI with generated metadata restored.