-
Notifications
You must be signed in to change notification settings - Fork 189
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(torii): use correct query_type #2476
Conversation
WalkthroughOhayo, sensei! This pull request introduces a modification in the Changes
Possibly related PRs
Suggested reviewers
🪧 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
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
crates/torii/core/src/sql.rs (1)
315-315
: Ohayo, sensei! This change looks good to me!The modification to use
QueryType::EventMessage(entity.clone())
instead ofQueryType::Other
is a nice improvement. It provides more specific typing for event message queries, which could enhance query handling and tracking.As a small suggestion, consider adding a brief comment explaining why this specific query type is used for event messages. It might help future maintainers understand the reasoning behind this choice.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2476 +/- ##
==========================================
+ Coverage 68.45% 68.50% +0.04%
==========================================
Files 368 368
Lines 48139 48186 +47
==========================================
+ Hits 32955 33010 +55
+ Misses 15184 15176 -8 ☔ View full report in Codecov by Sentry. |
commit-id:8493d130
8b51500
to
1084e35
Compare
added a (hacky) test to avoid future regressions |
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (2)
crates/torii/libp2p/src/tests.rs (2)
693-695
: Handle potential initialization errors fromtracing_subscriber
Ohayo sensei! The possible error from
try_init()
is currently being ignored. While this might be acceptable in a test environment, explicitly handling or logging the error can aid in debugging if the initialization fails.
719-720
: Address the FIXME regarding entity name handlingOhayo sensei! I noticed a
FIXME
indicating thatregister_model
andset_event_message
handle the name and namespace of the entity type differently. This inconsistency could lead to potential bugs or unexpected behavior. It would be beneficial to standardize how entity names and namespaces are managed in both methods to ensure consistency across the codebase.Would you like me to help refactor the code to address this issue or open a GitHub issue to track this task?
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- crates/torii/core/src/sql.rs (1 hunks)
- crates/torii/libp2p/src/tests.rs (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- crates/torii/core/src/sql.rs
Summary by CodeRabbit
New Features
Bug Fixes