-
Notifications
You must be signed in to change notification settings - Fork 114
refactor: telemetry, state, and settings handling #1757
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
Co-authored-by: Woolum <woolumc@amazon.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1757 +/- ##
=======================================
Coverage 16.75% 16.75%
=======================================
Files 213 213
Lines 20704 20704
Branches 871 871
=======================================
Hits 3468 3468
Misses 17236 17236 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
||
#[derive(Debug, Copy, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] | ||
pub enum OAuthFlow { | ||
DeviceCode, | ||
// This must remain backwards compatible | ||
#[serde(rename = "PKCE")] |
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.
Is this what was causing the different auth state while trying to login across the q
and qchat
binaries?
|
||
#[ignore = "not in ci"] | ||
#[tokio::test] | ||
async fn logout_test() { |
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.
Why remove these tests? Useful for debugging
ALTER TABLE state RENAME TO state_old; | ||
CREATE TABLE state ( | ||
key TEXT PRIMARY KEY, | ||
value BLOB |
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.
Why are we making the state table store BLOB's? Is this really required?
some discussion on this - https://sqlite-users.sqlite.narkive.com/sBgPvXrZ/using-text-vs-blob
Async Channel Architecture - Replaced global state and mutex locks with a dedicated worker thread and message passing for non-blocking telemetry operations
Dependency Injection - Eliminated global singletons in favor of explicit dependencies for better testability, lifetime, and lifecycle management
Error Handling Improvements - Significantly improved error types and reduced error type sizes dramatically. This reduces the size of Result returned from almost every function in the codebase.
Database type: Greatly simplify local DB interaction and improve consistency across the codebase.
I've tested the fuck out of this but it's not enough. Will bug bash with the team.