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

[ML] Add retry logic for 500 and 503 errors for OpenAI #103819

Merged

Conversation

jonathan-buttner
Copy link
Contributor

This PR adds retrying for 500 and 503 status codes received from OpenAI. In my testing on the cloud I've seen intermittent 500 and 503 failures that cause ingest via a reindex to fail.

The errors are described here: https://platform.openai.com/docs/guides/error-codes/api-errors

@jonathan-buttner jonathan-buttner added >bug :ml Machine learning Team:ML Meta label for the ML team cloud-deploy Publish cloud docker image for Cloud-First-Testing v8.13.0 labels Jan 2, 2024
@elasticsearchmachine
Copy link
Collaborator

Hi @jonathan-buttner, I've created a changelog YAML for you.

@jonathan-buttner jonathan-buttner marked this pull request as ready for review January 2, 2024 20:22
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

Copy link
Contributor

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

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

LGTM, but should this fix also be backported to 8.12.1?

@jonathan-buttner
Copy link
Contributor Author

LGTM, but should this fix also be backported to 8.12.1?

Thanks Dave, yeah you're right it should be backported.

@jonathan-buttner jonathan-buttner added v8.12.1 auto-backport-and-merge Automatically create backport pull requests and merge when ready labels Jan 8, 2024
Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

LGTM

@jonathan-buttner jonathan-buttner merged commit 3abff12 into elastic:main Jan 18, 2024
16 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.12

jonathan-buttner added a commit to jonathan-buttner/elasticsearch that referenced this pull request Jan 18, 2024
* Retry on 500 and 503

* Update docs/changelog/103819.yaml
elasticsearchmachine pushed a commit that referenced this pull request Jan 18, 2024
…4535)

* Retry on 500 and 503

* Update docs/changelog/103819.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport-and-merge Automatically create backport pull requests and merge when ready >bug cloud-deploy Publish cloud docker image for Cloud-First-Testing :ml Machine learning Team:ML Meta label for the ML team v8.12.1 v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants