Skip to content
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

[8.16] Test retry behavior of elasticsearch wrapper client (backport #14433) #14468

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 29, 2024

Motivation/summary

Test retry behaviour on our Elasticsearch client wrapper.

#13523 introduced a change in retry behavior, where only 429 status code responses are retried. This is in line with expectations from Elasticsearch, as 429 is the only status code that guarantees a document to not have been indexed.

This PR provides additional tests to cover for this change.

Checklist

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

Go tests for internal/elasticsearch package shold pass.

Related issues

Rel: #13523


This is an automatic backport of pull request #14433 done by [Mergify](https://mergify.com).

* add es client retry test

Test retry behaviour on our Elasticsearch client wrapper.

We only want to retry on 429 status code, the test
accounts for this specific behaviour and also verifies that
other response code are not retried.

* fix lint

* remove unnecessary handlers

* remove esMock struct

Due to previous refactoring this is not needed anymore

(cherry picked from commit 24d2222)
@mergify mergify bot requested a review from a team as a code owner October 29, 2024 10:52
@mergify mergify bot added the backport label Oct 29, 2024
@mergify mergify bot merged commit 81e1010 into 8.16 Oct 29, 2024
13 checks passed
@mergify mergify bot deleted the mergify/bp/8.16/pr-14433 branch October 29, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants