fix: avoid pickling vertex component runtime state#13239
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough
ChangesVertex Serialization Fix
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 7 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (7 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 |
|
Thanks CodeRabbit, I see the latest review has no actionable comments. The PR is currently blocked by an unrelated CI failure in
Local verification for the affected backend path still passes: I do not have permission to rerun failed jobs on this repo from the fork. Could a maintainer rerun the failed frontend shard if CI is still required? |
Summary
mainby removing livecustom_componentruntime instances fromVertex.__getstate__()output.Root cause
Distributed/Celery execution can pickle vertex state. A live component instance may contain runtime-only objects that cannot be pickled, so keeping
custom_componentin the serialized vertex state can fail with errors likecannot pickle ... object.Verification
uv run --package lfx pytest src/lfx/tests/unit/graph/vertex/test_vertex_base.py -k getstate -quv run --package lfx pytest src/lfx/tests/unit/graph/vertex/test_vertex_base.py -quv run ruff check src/lfx/src/lfx/graph/vertex/base.py src/lfx/tests/unit/graph/vertex/test_vertex_base.pygit diff --checkResult: targeted test passed, full vertex test file passed (23 passed), ruff passed, and git diff --check passed.
Summary by CodeRabbit
Bug Fixes
Tests