apollo_infra: refactor client struct to be an enum#13570
apollo_infra: refactor client struct to be an enum#13570ArniStarkware wants to merge 1 commit intomainfrom
Conversation
|
This is a typo from before this PR. Suggestion: /// let batcher_client: Client<BatcherRequest, BatcherResponse> = create_client!( |
7d39183 to
8868d60
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
8868d60 to
00e3f97
Compare
nadin-Starkware
left a comment
There was a problem hiding this comment.
@nadin-Starkware reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ArniStarkware and Itay-Tsabary-Starkware).
crates/apollo_infra/src/component_client/definitions.rs line 32 at r2 (raw file):
Local(LocalComponentClient<Request, Response>), Remote(RemoteComponentClient<Request, Response>), None,
Please rename Disabled for clarity and to avoid Option::None shadowing
Code quote:
None00e3f97 to
dceb597
Compare
|
Previously, nadin-Starkware (Nadin Jbara) wrote…
Done. Removed this option. Looks like it is never used. If it is needed, we will add it. |
3be4b39 to
5046eba
Compare
ArniStarkware
left a comment
There was a problem hiding this comment.
@ArniStarkware made 1 comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on Itay-Tsabary-Starkware and nadin-Starkware).
crates/apollo_infra/src/component_client/definitions.rs line 32 at r2 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
Done. Removed this option. Looks like it is never used. If it is needed, we will add it.
Returned the Disabled option (it is very much used).
nadin-Starkware
left a comment
There was a problem hiding this comment.
@nadin-Starkware reviewed 2 files and all commit messages, and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on Itay-Tsabary-Starkware).
5046eba to
2b86e25
Compare


Note
Medium Risk
Medium risk because this changes the core
Clienttype and construction/retrieval logic used across node components, which could break wiring or disable clients if match arms are missed.Overview
Refactors the component
Client<Request, Response>from a struct holding optional local/remote clients into an enum with explicitLocal,Remote, andDisabledvariants, removing theClient::newconstructor and the “both set” panic.Updates client creation and access helpers in
apollo_nodeto pattern-match on the new enum:create_client!now returns a concreteClientvariant (includingClient::Disabled), andget_shared_client!builds anArcfrom the active variant or returnsNonewhen disabled.Written by Cursor Bugbot for commit 2b86e25. This will update automatically on new commits. Configure here.