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

Retry on database error to reduce number of test failures #984

Merged
merged 2 commits into from
Oct 30, 2020

Conversation

mfeurer
Copy link
Collaborator

@mfeurer mfeurer commented Oct 29, 2020

What does this PR implement/fix? Explain your changes.

This PR adds a retry mechanism to api calls in case it detects a database error.

How should this PR be tested?

New unit test. Also, an overloaded test server.

Copy link
Collaborator

@PGijsbers PGijsbers left a comment

Choose a reason for hiding this comment

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

I think it makes sense to treat a connection error the same as a server is busy is error. I have a minor suggestion for making sure the code reflects that. Other than that I agree with the PR.

openml/_api_calls.py Outdated Show resolved Hide resolved
openml/_api_calls.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@PGijsbers PGijsbers left a comment

Choose a reason for hiding this comment

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

(let's see some green from CI first, but otherwise 👍 )

@mfeurer mfeurer merged commit 5b6de8a into develop Oct 30, 2020
@mfeurer mfeurer deleted the retry_on_database_error branch October 30, 2020 09:40
@joaquinvanschoren
Copy link
Contributor

@all-contributors please add @mfeurer for code

@allcontributors
Copy link
Contributor

@joaquinvanschoren

I've put up a pull request to add @mfeurer! 🎉

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