-
Notifications
You must be signed in to change notification settings - Fork 8
Unify cluster_id and model_id types to u32 (fixes #677) #680
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
base: main
Are you sure you want to change the base?
Conversation
11 files changed, 74 insertions(+), 60 deletions(-) Automated changes made by octoaide bot.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #680 +/- ##
==========================================
- Coverage 80.90% 80.59% -0.31%
==========================================
Files 83 83
Lines 23358 23310 -48
==========================================
- Hits 18897 18786 -111
- Misses 4461 4524 +63 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Octoaide!
|
|
Octoaide! |
syncpark
left a comment
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.
Data migration is required for the tables and events.
|
Thanks for the catch — I analyzed the feedback and implemented the required data migrations. I’ve committed and pushed the changes; here’s what I changed and how it addresses the tables/events you called out. What I changed
Why this fixes the issue
Verification
Thanks again for the pointer — the migrations for Cluster, TimeSeries, and the listed events (HttpThreat, NetworkThreat, WindowsThreat, ExtraThreat) are implemented and included in the release migration. Let me know if you want me to add extra unit tests that simulate specific legacy data cases (e.g., particular negative cluster_id values). |
|
So, we just need to migrate the HttpThreat event data? |
|
Thanks — I reviewed the feedback and made the changes accordingly. Summary of what I analyzed and implemented:
Everything has been committed and pushed. Thanks for the pointers — this reduces unnecessary migration work and keeps the migration code focused on what actually runs in production. |
Summary
This PR unifies the types used for cluster IDs and model IDs across the codebase by converting all occurrences to u32. Multiple files used i32, usize, String, or usize for cluster_id/model_id; this change standardizes those fields and related function signatures to use u32. This reduces type conversions and potential bugs related to mixed integer types.
What changed and why
Files modified (high level)
Verification
Related references
u32#677Closes
Closes #677