fix: make v3 wiki migration resumable#620
Conversation
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ 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. WalkthroughThis PR refactors the wiki document migration system from a destructive insert-only pattern to an idempotent route-based upsert pattern. WikiPage._migrate_to_wiki_document now accepts optional parent and sort order parameters, checks for existing documents by route, and either updates them or creates new ones. WikiSpace migration delegates to this method for both groups and pages, including an early-return guard if the root group already exists. Migration patches now process all records instead of filtering for orphans, relying on the upsert logic to prevent duplicates. UI visibility logic changes to trigger migration based on sidebar entries rather than root group state. Comprehensive tests validate that migrations are idempotent, can repair partial state, and work correctly with the broader record scope. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
Summary
root_groupas a completion markerroot_groupalready existsTesting
bench --site wiki.localhost run-tests --module wiki.wiki.doctype.wiki_space.test_wiki_spaceSummary by CodeRabbit
New Features
Bug Fixes
Tests