Commit b41291c
fix: automatic migration for legacy indexing_progress.json files (v8.1.0)
Problem:
- Users upgrading from pre-v8.0 had indexing_progress.json files with old field name 'qdrant_point_ids'
- Field was renamed to 'vector_point_ids' during Qdrant removal in v8.0
- Attempting to load legacy progress files caused: "__init__() got an unexpected keyword argument 'qdrant_point_ids'"
- Blocked users from resuming interrupted indexing operations
Solution:
- Implemented automatic detection and migration in IndexingProgressLog._load_progress()
- Detects legacy 'qdrant_point_ids' field and renames to 'vector_point_ids' transparently
- Saves migrated format immediately to prevent re-migration on subsequent loads
- Graceful fallback: corrupted files are automatically deleted (doesn't block indexing)
- Zero user intervention required - completely transparent upgrade experience
Changes:
- src/code_indexer/services/indexing_progress_log.py:
* FileIndexingRecord.from_dict(): Handle legacy field name during deserialization
* _load_progress(): Detect legacy format, log warning, auto-save after migration
* Enhanced error handling: Delete corrupted files instead of blocking indexing
- src/code_indexer/services/rpyc_daemon.py:
* Fixed SmartIndexer instantiation with correct parameters (4 required args)
- tests/unit/services/test_indexing_progress_legacy_migration.py:
* 9 comprehensive tests covering all migration scenarios
* Tests: legacy detection, field renaming, data integrity, corrupted files, E2E upgrade
- src/code_indexer/__init__.py:
* Bumped version to 8.1.0 (minor version for backward-compatible feature addition)
Testing:
- 9/9 unit tests passed (migration scenarios)
- 5/5 manual E2E tests passed (real-world upgrade simulation)
- 3157 regression tests passed (no regressions introduced)
- Code review: APPROVED (production-ready with recommendations)
User Experience:
- Before: Manual deletion of progress file required, data loss possible
- After: Seamless automatic migration, zero manual steps, no data loss
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent a025c75 commit b41291c
File tree
4 files changed
+485
-3
lines changed- src/code_indexer
- services
- tests/unit/services
4 files changed
+485
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
294 | 298 | | |
295 | 299 | | |
296 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
297 | 315 | | |
298 | 316 | | |
299 | 317 | | |
| |||
305 | 323 | | |
306 | 324 | | |
307 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
308 | 331 | | |
309 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
310 | 345 | | |
311 | 346 | | |
312 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1019 | 1019 | | |
1020 | 1020 | | |
1021 | 1021 | | |
| 1022 | + | |
| 1023 | + | |
1022 | 1024 | | |
1023 | 1025 | | |
1024 | | - | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
1025 | 1037 | | |
1026 | 1038 | | |
1027 | 1039 | | |
| |||
0 commit comments