-
Notifications
You must be signed in to change notification settings - Fork 71
Integrate exponential backoff to registration #1052
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
Integrate exponential backoff to registration #1052
Conversation
c4a5f7d to
a2dd8ed
Compare
|
/packit retest-failed |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
a2dd8ed to
425b74e
Compare
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
425b74e to
64a9244
Compare
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.
LGTM! I added some minor comments.
Just to register an idea: in future, I think we could improve this by making the RegistrarBuilder to return an impl and return different concrete structures depending on the Buider initialization instead of having the RegistrarClient to carry a ResilientClient inside it.
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
64a9244 to
e6711a0
Compare
This commit integrates the
ResilientClientinto the registrar client, enabling automatic retries for agent registration. This enhances the agent's ability to handle transient network issues or temporary registrar unavailability.Configuration Propagation: A new
RetryConfigstruct is introduced and passed down from the agent's main configuration through agent_registration to theRegistrarClientBuilder.Resilient Registrar Client: The
RegistrarClientis now equipped with an optionalResilientClient. If a retry configuration is provided, this client is used for both the initial version check and the final agent registration POST request.Enhanced
ResilientClient: A new get_request method was added to the ResilientClient to handle requests that do not send a JSON body, such as the version check GET request.