-
Notifications
You must be signed in to change notification settings - Fork 7
fix(pool): only allow internal accounts to be added to pool #428
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
WalkthroughThe changes enhance the engine component by adding validation in both the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Engine
participant Storage
participant Workflow
Caller->>Engine: CreatePool(pool)
Engine->>Storage: GetAccount(accountID) [for each account concurrently]
alt Any account not found or not INTERNAL
Engine-->>Caller: Return validation error
else All accounts INTERNAL
Engine->>Storage: UpsertPool(pool)
Engine->>Workflow: SendEvent(pool)
Engine-->>Caller: Return success
end
sequenceDiagram
participant Caller
participant Engine
participant Storage
participant Workflow
Caller->>Engine: AddAccountToPool(poolID, accountID)
Engine->>Storage: GetAccount(accountID)
alt Account not found or not INTERNAL
Engine-->>Caller: Return validation error
else Account INTERNAL
Engine->>Storage: AddAccountToPool(poolID, accountID)
alt Add fails
Engine-->>Caller: Return add error
else Add succeeds
Engine->>Storage: GetPool(poolID)
Engine->>Workflow: SendEvent(account, pool)
Engine-->>Caller: Return success
end
end
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (1)
✨ Finishing Touches
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:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
6db7ba0
to
629d99a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #428 +/- ##
==========================================
+ Coverage 61.12% 61.34% +0.21%
==========================================
Files 579 579
Lines 29418 29443 +25
==========================================
+ Hits 17982 18061 +79
+ Misses 10470 10412 -58
- Partials 966 970 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Nice use of errgroup 👍
Fixes PMNT-96