-
Notifications
You must be signed in to change notification settings - Fork 808
fix: group ids #1682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: group ids #1682
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug where group IDs are lost when documents are republished. The fix changes the condition for setting group IDs and tags from checking if the slice length is greater than zero to checking if the slice is not nil, allowing empty slices to be properly stored as metadata (important for representing closed access). A data migration is included to fix existing documents that lost their group IDs.
Key Changes
- Modified group ID and tag metadata checks to use nil comparison instead of length checks
- Added migration to restore missing group IDs for all existing node releases based on current node permissions
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| backend/store/rag/ct.go | Changed group ID and tag checks from length-based to nil-based to allow empty slices in metadata |
| backend/migration/fns/0003_fix_group_ids.go | New migration that reconstructs group IDs for existing node releases based on node permissions |
| backend/migration/func.go | Registered the new fix group IDs migration function |
| backend/migration/fns/provider.go | Added new migration to dependency injection provider set |
| backend/cmd/migrate/wire_gen.go | Wire-generated code updated to include new migration dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PR 标题
修复文档重新发布导致 group ids 丢失的问题
变更类型
请勾选适用的变更类型:
变更内容
详细描述本次 PR 的具体变更内容:
1.
2.
3.
测试情况
描述本次变更的测试情况:
其他说明
任何其他需要说明的事项: