Resuming a legacy breakpoint snapshot crashes with IndexError when the paused component has an empty input socket
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Đọc _consume_component_inputs trong haystack/core/pipeline/base.py quanh dòng 1357 và phần kiểm thử snapshot cũ trong test/core/pipeline/test_breakpoint.py, đặc biệt là TestResumeFromLegacyPipelineSnapshot. Tái hiện trường hợp socket tùy chọn bị bỏ sót, sau đó thêm một kiểm thử hồi quy cho thấy snapshot cũ tiếp tục chạy với giá trị mặc định của socket ({'greeter': {'result': 'hi'}}) và xác nhận các kiểm thử breakpoint chạy thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Resuming a breakpoint snapshot saved by an older Haystack (legacy inputs_format=None, flattened inputs) crashes with IndexError: list index out of range when the paused component has an input socket with no stored value. This happens for a component with all-optional inputs triggered with no input, or any optional socket omitted from the snapshot. Current-format snapshots resume correctly.
Error message
IndexError: list index out of range
at haystack/core/pipeline/base.py:1357 in _consume_component_inputs (is_resume branch)
is_resume indexes socket_inputs_values[0] without checking the list is non-empty.
Expected behavior
The component resumes with its socket default: {'greeter': {'result': 'hi'}}.
To Reproduce
A pipeline with a component whose only input is optional (greeting: str = "hi") is run with break_point=Breakpoint(component_name="greeter"); the snapshot is converted to the legacy format (inputs_format=None, flattened inputs via the same helpers the migration uses) and resumed:
Case A (all-optional component, no inputs) legacy snapshot inputs: {'greeter': {}}
Case A FAILED: IndexError : list index out of range
Case B (current-format snapshot) resume: {'greeter': {'result': 'hi'}}
A self-contained script (repro_legacy_variants.py, plus a second shape repro_legacy_optional.py) is available; happy to attach it.
Additional context
- Legacy snapshot resume is explicitly supported (
haystack/core/pipeline/breakpoint.py:60-70, thefix-pipeline-snapshot-resume-in-loopsrelease note, andTestResumeFromLegacyPipelineSnapshot), but no test covers a missing socket value. - Suggested fix: guard the index (
if socket_inputs_values:) and add a legacy-resume test with an omitted optional socket; verified locally that this fixes both repro shapes andtest/core/pipeline/test_breakpoint.pystays green (41 passed). - Searched open and closed issues/PRs for breakpoint/snapshot/legacy resume IndexError: no duplicate. Open PR #13415 touches
_consume_component_inputsbut only adds lazy-variadic sorting, not this branch.
System
- OS: Windows 11
- Haystack version:
4b5dd70(main, v3.5.0-rc0)
Reported with AI assistance (Claude); the reproduction was executed and verified locally.
- Ngôn ngữ chính
- Python
- Star
- 26.8k
- Fork
- 3.3k
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 235
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của deepset-ai/haystack
-
CSVToDocument accepts an unsupported conversion_mode and silently converts in row modeCó thể đã có người làm @Lesereingrape đã nhận 29 ngày trước. Đang mởP3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
deepset-ai/haystack#13070 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PPTXToDocument drops soft line breaks when link_format is markdown or plainCó thể đã có người làm @bogdankostic đã nhận 19 ngày trước. Đang mởP3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
deepset-ai/haystack#13043 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
InMemoryDocumentStore: count_unique_metadata_by_filter and get_metadata_field_unique_values disagree on int/float/bool valuesCó thể đã có người làm @julian-risch đã nhận 29 ngày trước. Đang mởP3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
deepset-ai/haystack#13040 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
AutoMergingRetriever raises ValueError when a matched document has no parent (for example the root document)Có thể đã có người làm @julian-risch đã nhận 31 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
deepset-ai/haystack#13029 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CSVToDocument row mode fails on CR-separated CSV inputCó thể đã có người làm @julian-risch đã nhận 30 ngày trước. Đang mởP3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
deepset-ai/haystack#13022 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của deepset-ai/haystack
Issue tương tự
-
_chunk_scan_fwd launches its Triton kernel without a device guard: NaN when a model is split across GPUsCó thể đã có người làm @toddwbucy đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
state-spaces/mamba#1072 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
loopj/aiovantage#414 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
power_mismatch_deline docstring: the rear-to-total RMAD conversion has an extra bifaciality factorĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
pvlib/pvlib-python#2929 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
data good first issue launch-day unverified
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
BradGroux/wow-forever-mission-control#8 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
check bilibili falsely reports read/subtitle as broken: live_test fixture BV1GJ411x7h7 is gone (404)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Panniantong/Agent-Reach#889 ·
Maintainer thường phản hồi trong vòng 2 ngày