Repository navigation
chore: Remove RuntimeConfig dependency from client.New - #273
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Refactor client creation to use client ID directly
chore: Remove RuntimeConfig dependency from client.New
Nov 15, 2025
meling
marked this pull request as ready for review
November 15, 2025 16:09
meling
approved these changes
Nov 15, 2025
Co-authored-by: meling <810999+meling@users.noreply.github.com>
These simplifies usage in the orchestration worker.
This will simplify usage in the orchestration worker (next commit).
This selectively enables metrics only for client and replica based on the type of ID passed to the Enable function; thus, we do not enable client metrics logging on replicas and vice versa. This also updates the Worker to use appropriate ID types depending on whether it is a client or replica we are creating/starting/stopping. This also updates the documation for the various metrics types.
meling
force-pushed
the
copilot/refactor-client-id-usage
branch
from
November 15, 2025 23:21
ada2901 to
93bfbaf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
client.New()required aRuntimeConfigparameter solely to extract the client ID. Additionally, clients reusedhotstuff.IDdespite being distinct from replica IDs.Changes
client.IDtype; replacedconfig *core.RuntimeConfigfield withid ID; updatedNew()signatureClientID()helper to convertClientOpts.IDtoclient.IDmap[hotstuff.ID]tomap[client.ID]; removedRuntimeConfiginstantiation; passopts.ClientID()directly toclient.New()Before
After
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.