-
Notifications
You must be signed in to change notification settings - Fork 14
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
refactor(agent): various refactors #126
Conversation
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.
Very nice! I think one function call is removed by mistake but LGTM apart from that.
c93bcf5
to
a8ccdab
Compare
pub fn default_bind_address() -> SocketAddr { | ||
"127.0.0.1:9001" | ||
.parse() | ||
.expect("INTERNAL: Could not build default remote keypair loader bind address") |
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.
I know you probably just copied this. IMO it's better to just do .unwrap
for the statics that we know exactly what it is and it will never fail.
/// NOTE(2023-03-22): Lifetime bounds are currently necessary | ||
/// because of https://github.com/rust-lang/rust/issues/63033 |
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.
I think this issue is now resolved, we might need to update rust tho. Maybe we can fix this in a future refactor PR.
The StateApi is left over from the initial Adapter, but all functionality is for pricing/product accounts. This refactors that module and fixes the cyclic dependency between it and GlobalStore. The new logic performs updates within the Prices API (Which is where the state relevant to subscriptions already was, so is the better place for it). File rename left for a future commit to keep the diffs clean.
This PR contains several refactors, each commit is self-contained and should be reviewed individually. You can leave comments directly on the commits. See the commit messages which might contain more information about a specific refactor.
Follow-up to: