-
Notifications
You must be signed in to change notification settings - Fork 30
Suggestion: Add max_tries to transaction() #240
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
base: main
Are you sure you want to change the base?
Conversation
|
Hey, Thanks for your contribution! Could you please sign off your commit? You can find how to do it here, in the failed check report. |
|
Also I would really appreciate if you could provide a test for your changes |
d34fb5e to
40a7094
Compare
|
@mkmkme Thanks, I've amended and force pushed the commit to include documentation and tests. Edit: Also rebased. Edit 2: And fixed |
6b9b7e2 to
a2c31d3
Compare
This new `max_tries` argument in the `transaction` helper allows one to more easily prevent (accidental) infinite loops. Commit includes documentation and tests. Signed-off-by: Hauke Daempfling <haukex@zero-g.net>
a2c31d3 to
baffe45
Compare
mkmkme
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @haukex !
This is a very well written PR that I am happy to approve!
@bogdanp05 @amirreza8002 could you also have a look from your side and raise your concerns if you have any? For me it looks good to be merged.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #240 +/- ##
===========================================
- Coverage 76.28% 59.39% -16.89%
===========================================
Files 129 129
Lines 33906 33955 +49
===========================================
- Hits 25864 20167 -5697
- Misses 8042 13788 +5746 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
i haven't worked with this method, but it looks ok, tho added a comment |
Signed-off-by: Hauke Daempfling <haukex@zero-g.net>
|
After thinking about this a bit more, I think I actually prefer the updated version |
Hi, I would like to propose that the
transaction()helper gets an additional argumentmax_tries(perhaps even with a default value) to prevent infinite loops, as can happen fairly easily by accident:If you like this change, I can also suggest some documentation updates etc. if you like.