Skip to content

Improve Internal Logic for Network Retries #4880

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

Merged
merged 12 commits into from
Aug 2, 2025
Merged

Improve Internal Logic for Network Retries #4880

merged 12 commits into from
Aug 2, 2025

Conversation

Bibo-Joshi
Copy link
Member

My take on closing #4871 :) Maybe the diff explains my intentions better than my words :D

@Bibo-Joshi Bibo-Joshi requested a review from harshil21 July 26, 2025 15:30
@Bibo-Joshi Bibo-Joshi added the 🛠 refactor change type: refactor label Jul 26, 2025
Copy link
Member

@Poolitzer Poolitzer left a comment

Choose a reason for hiding this comment

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

I like the overall design, just three nitpicks

@Bibo-Joshi Bibo-Joshi requested a review from Poolitzer July 27, 2025 08:05
Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

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

I see what you meant now. However it still doesn't fix the core of the issue? If you have infinite_loop=True, and max_retries > 0, we're still incrementing retries even for successful calls.

That particular parameter combination does not happen in our library, but the function should still have correct behavior for all combinations of inputs imo.

Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

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

ohh nvm there is a guard against that combination of inputs. So it would work. Do tests need updating?

@Bibo-Joshi
Copy link
Member Author

Do tests need updating?

Except for coverage reasons, I don't see a need. this PR doesn't introduce any new functionality that would need testing. test for the existing network retry use cases are already in place :)

@Bibo-Joshi Bibo-Joshi requested a review from harshil21 July 30, 2025 19:24
@Bibo-Joshi
Copy link
Member Author

welp, that took a bit of a detour, but ready for re-review now :)

Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

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

looks good, just one question 👍🏽

@Bibo-Joshi Bibo-Joshi requested a review from harshil21 July 31, 2025 17:33
Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Bibo-Joshi Bibo-Joshi merged commit a76fa2c into master Aug 2, 2025
32 checks passed
@Bibo-Joshi Bibo-Joshi deleted the retry-loop branch August 2, 2025 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠 refactor change type: refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy