Skip to content

Add retries to kibana client #1563

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

Merged
merged 5 commits into from
Nov 24, 2023
Merged

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Nov 22, 2023

Adding it by now only to kibana client because for elasticsearch client we rely on the Go SDK, that has its own retry mechanisms.

As it is implemented, we can later consider using it in more places where an http client is used now.

@jsoriano jsoriano self-assigned this Nov 22, 2023
@jsoriano jsoriano marked this pull request as ready for review November 23, 2023 15:12
@jsoriano jsoriano requested a review from a team November 23, 2023 15:12
Copy link
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!
Did you test these changes creating a serverless project?

@jsoriano
Copy link
Member Author

Nice! Did you test these changes creating a serverless project?

No... let me try...

@jsoriano
Copy link
Member Author

Did you test these changes creating a serverless project?

Tested to start and stop serverless four times, and all of them were successful, except one where elastic-agent failed to start due to some authentication error, that seemed unrelated to this change. Running up again in this case started the agent.

I saw some retries querying status endpoints, and the debug logging was different. I have configured it to use the default slog logger that fulfils the requirements for retryablehttp and uses log under the hood as we do everywhere else.

@jsoriano jsoriano requested a review from mrodm November 24, 2023 10:25
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @jsoriano

Copy link
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Tested to start and stop serverless four times, and all of them were successful, except one where elastic-agent failed to start due to some authentication error, that seemed unrelated to this change. Running up again in this case started the agent.

Thanks for checking this out !

I saw some retries querying status endpoints, and the debug logging was different. I have configured it to use the default slog logger that fulfils the requirements for retryablehttp and uses log under the hood as we do everywhere else.

First usage of slog 💪 At some point I would like to start using more that package

@jsoriano jsoriano merged commit ce3d632 into elastic:main Nov 24, 2023
@jsoriano jsoriano deleted the kibana-client-retries branch November 24, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants