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

hermetic: retry on failed network requests #1512

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

ralphbean
Copy link
Contributor

@ralphbean ralphbean commented Nov 26, 2024

No release note required for this one, I think. Pretty small change.

mock/py/mock-hermetic-repo.py Fixed Show fixed Hide fixed
mock/py/mock-hermetic-repo.py Fixed Show fixed Hide fixed
@praiskup
Copy link
Member

Thank you for working on this early feature!

return wrapper


@retry(retry_on=requests.exceptions.ConnectionError)
Copy link
Member

Choose a reason for hiding this comment

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

Have you considered python-backoff? Mock already depends on it so it is not a new dep:

@backoff.on_exception(backoff.expo, requests.exceptions.RequestException,
max_tries=3, max_time=100)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, no! I was not aware of it. We should use that.

@praiskup
Copy link
Member

No release note required for this one, I think. Pretty small change.

I'd prefer to have a short message, nothing more than "the mock-hermetic-repo implements retry-mechanism for downloading files" is needed.

Copy link
Member

@praiskup praiskup left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@praiskup praiskup merged commit cb2834b into rpm-software-management:main Nov 27, 2024
23 checks passed
@ralphbean ralphbean deleted the retry-downloads branch December 2, 2024 15: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.

2 participants