fix(entity_file): emit clear error when schema header field has no type#66
fix(entity_file): emit clear error when schema header field has no type#66gkorland wants to merge 2 commits into
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ 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. Review rate limit: 0/1 reviews remaining, refill in 47 minutes and 22 seconds.Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #66 +/- ##
==========================================
+ Coverage 89.50% 89.54% +0.03%
==========================================
Files 9 9
Lines 610 612 +2
==========================================
+ Hits 546 548 +2
Misses 64 64 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Copilot Code Review✅ No significant issues found. |
If a schema-mode CSV header contained a field without a colon (e.g. just `name` instead of `name:STRING`), `convert_header_with_schema` raised an unhelpful `IndexError: list index out of range` from `pair[1]`. Detect the missing-colon case explicitly and raise a descriptive `CSVError` instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add test_schema_header_field_missing_type_raises to TestBulkLoader to exercise the new CSVError raised when a schema header field has no colon (e.g. 'name' instead of 'name:STRING'), closing the Codecov patch gap. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
97c4bd5 to
213b890
Compare
Agent Review SummaryPR:
|
Summary
In schema mode,
convert_header_with_schemasplit each header field on:and immediately indexedpair[1]. If a field contained no colon (e.g.nameinstead ofname:STRING), this raised an opaqueIndexError: list index out of rangeinstead of a helpful schema validation error.Changes
falkordb_bulk_loader/entity_file.py: detectlen(pair) < 2after the existinglen(pair) > 2check and raise a descriptiveCSVError("Schema header field '' is missing a type (expected 'name:TYPE')").Testing
uv run flake8 falkordb_bulk_loaderclean.Memory / Performance Impact
N/A.
Related Issues
From the comprehensive code-review report (BUG-4).