-
Notifications
You must be signed in to change notification settings - Fork 4
chore: fix charter subsciber #339
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
Conversation
Caution Review failedThe pull request is closed. WalkthroughThe GroupService update path switches to read-modify-save with existence checks. The subscriber’s update handling is reworked to capture entity ID in beforeUpdate, rely on it in afterUpdate, switch certain updates to save-based flows, remove heuristic ID discovery, add a delayed post-update reload, and reduce logging. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant GroupService
participant Repo as GroupRepository (ORM)
Client->>GroupService: updateGroup(id, partial)
GroupService->>Repo: findOne(id)
alt group exists
GroupService->>GroupService: merge(existing, partial)
GroupService->>Repo: save(merged)
Repo-->>GroupService: savedGroup
GroupService-->>Client: savedGroup
else group missing
GroupService-->>Client: throw "Group not found"
end
sequenceDiagram
autonumber
participant ORM
participant Sub as Subscriber
participant Repo as Repository
participant EV as eVault Service
participant Down as Downstream Handler
ORM-->>Sub: beforeUpdate(entity)
Sub->>Sub: lastUpdateEntityId = entity.id (if present)
ORM-->>Sub: afterUpdate(event)
alt lastUpdateEntityId available
Sub->>Repo: reload(entity by id with relations)
alt Group with charter and no ename
Sub->>EV: create eVault
EV-->>Sub: ename assigned
Sub->>Repo: findOne(id)
Sub->>Repo: save(updated ename) %% use save to trigger ORM
Note over Sub: Delay ~20s
Sub->>Repo: reload(id with relations)
Sub->>Down: handleChange(updated group)
else
Sub->>Down: handleChange(reloaded entity)
end
else
Sub-->>ORM: return (skip processing)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (2)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Description of change
Issue Number
Type of change
How the change has been tested
Change checklist
Summary by CodeRabbit
Bug Fixes
Refactor
Chores