-
Notifications
You must be signed in to change notification settings - Fork 160
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
Integration Testing Framework: Add retries for artifacts API call #4348
Integration Testing Framework: Add retries for artifacts API call #4348
Conversation
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
This pull request does not have a backport label. Could you fix it @ycombinator? 🙏
NOTE: |
e12ace2
to
e7af558
Compare
e7af558
to
0805f66
Compare
Moving PR into draft to a) update unit test assertions and b) refactor logging logic so logger doesn't need to be passed down in several places. |
adf118f
to
6306b23
Compare
|
) * Add retries for artifacts API call * Add newline * Adding logging * Pass logger in constructor * Add missing arg * Fix logic for happy path * Adding comment * Do not keep retrying if request context was cancelled or timed out (cherry picked from commit 94c7d88)
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.
@ycombinator Unfortunately, I didn't look at this PR in time. Sorry about that.
I don't think this is how we should approach it, we should:
- Implement the
httpDoer
interface with retries and use this implementation as an option - Continue using the existing option pattern and remove the logger parameter.
- The logger interface is not implemented by any logger, only by
testing.T
and this client is used beyond testing.
I addressed 2 and 3 in my PR #4331 (had to resolve some conflicts)
) * Add retries for artifacts API call * Add newline * Adding logging * Pass logger in constructor * Add missing arg * Fix logic for happy path * Adding comment * Do not keep retrying if request context was cancelled or timed out (cherry picked from commit 94c7d88)
) (#4353) * Add retries for artifacts API call * Add newline * Adding logging * Pass logger in constructor * Add missing arg * Fix logic for happy path * Adding comment * Do not keep retrying if request context was cancelled or timed out (cherry picked from commit 94c7d88) Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
What does this PR do?
This PR adds retries to the Artifacts API call in the integration testing framework, as recommended by @DaveSys911.
Why is it important?
The Artifacts API can sometimes be flaky.
Related issues