feat: allow global retry_transient_errors by javatarz · Pull Request #1565 · python-gitlab/python-gitlab
Repository navigation
feat: allow global retry_transient_errors - #1565
Merged
nejch merged 1 commit into python-gitlab:master from javatarz:master Aug 30, 2021
Merged
feat: allow global retry_transient_errors #1565 nejch merged 1 commit into python-gitlab:master from javatarz:master
Conversation
javatarz commented Aug 3, 2021
Copy link Copy Markdown
Contributor
Value set on the Gitlab object will be used as a default in case every
subsequent API call does not provide a retry_transient_errors
parameter.
This allows code to be succinct and the retry policy to be set for all
calls to the Gitlab instance.
javatarz commented Aug 3, 2021 · edited Loading
Copy link Copy Markdown
Contributor
Author
|
Noticed another MR that has had a failed pipeline for a while. It also did not have documentation. It made sense to make the small change from scratch and update documentation. I have run the test locally (for my python version). I have not generated the documentation and run a visual check on the page itself yet. Does anyone know what it would take for the pipelines to run and provide feedback? Do the tests and linters not run on the PR? |
codecov-commenter commented Aug 3, 2021 · edited Loading
Copy link Copy Markdown
Codecov Report
@@ Coverage Diff @@ ## master #1565 +/- ## ========================================== + Coverage 91.16% 91.18% +0.02% ========================================== Files 74 74 Lines 4177 4188 +11 ========================================== + Hits 3808 3819 +11 Misses 369 369
Flags with carried forward coverage won't be shown. Click here to find out more.
|
nejch commented Aug 3, 2021
Copy link Copy Markdown
Member
Thanks for the contribution @javatarz ! I've just triggered the workflow, it needs to be approved for first-time contributors. I'll take a look at this later tonight but yes adding a basic test would generally be good (if it makes sense here - maybe just to confirm the correct option is used depending on global/overrides) :) Thanks! |
javatarz commented Aug 3, 2021
Copy link Copy Markdown
Contributor
Author
|
I had looked for tests around this and there were none. I can see a test for
Please don't merge this MR, I'll be back in a few hours with tests! |
67ba416 to
1fd70be
Compare
August 3, 2021 17:34
javatarz commented Aug 3, 2021 · edited Loading
Copy link Copy Markdown
Contributor
Author
|
I have added the missing tests and update the documentation a bit. Here's what the documentation looks like now (after rendering) @nejch : This one's ready for review again. It needs a nudge for running the checks on the pipeline. Tests passed locally on py39. |
nejch commented Aug 5, 2021 · edited Loading
Copy link Copy Markdown
Member
|
Hey @javatarz finally had a chance to look at this properly, thanks again, looks great! This looks like a good candidate to be added to global (or per-server) config in the configuration file to keep it consistent with existing global options. You can take a look at the user agent (the last option added before yours) as inspiration if it helps: https://github.com/python-gitlab/python-gitlab/pull/1277/files (I realize |
javatarz commented Aug 10, 2021
Copy link Copy Markdown
Contributor
Author
|
Sorry for the late response. Just had a look at |
javatarz commented Aug 22, 2021
Copy link Copy Markdown
Contributor
Author
|
@nejch : I have added changes to allow config values to be set (both globally and per gitlab connection). Used mypy typing in test utlity functions which isn't a pattern on the file. I cannot run mypy locally (because your fix for mypy has not been merged yet 😞). Not sure if I have broken something. Do you mind approving the pipeline run for me once again so I can confirm if everything is ok? |
nejch commented Aug 22, 2021
Copy link Copy Markdown
Member
Thank you @javatarz ! I see mypy is not happy :) the hook fix should be ready soon. maybe you can check how it's done for the default scenario in |
javatarz commented Aug 23, 2021
Copy link Copy Markdown
Contributor
Author
|
Can confirm, The build has passed locally for Python 3.9. Should be fine on other versions too. Do you mind triggering the pipeline for me please? Just noticed that someone triggered it 😄 |
javatarz commented Aug 23, 2021
Copy link Copy Markdown
Contributor
Author
|
Seems like the test failure is unrelated. I'm trying to run functional tests locally to confirm. |
nejch commented Aug 23, 2021
Copy link Copy Markdown
Member
The functional tests can be a little flaky sometimes, although I thought this was mostly fixed. I'm re-running now. |
javatarz commented Aug 23, 2021
Copy link Copy Markdown
Contributor
Author
|
Dang, they passed now. Should we merge this one now or should we disable that flaky test first? |
javatarz commented Aug 24, 2021
Copy link Copy Markdown
Contributor
Author
|
Are there any other steps before this change can be accepted @nejch , @JohnVillalovos ? Picked names off of the recent people to merge/commit things |
JohnVillalovos commented Aug 25, 2021
Copy link Copy Markdown
Member
|
@javatarz Can the git commits be cleaned up? In particular the "merge" commits. It would be nicer to have a cleaner git history, IMHO. |
View reviewed changes
JohnVillalovos left a comment
Copy link Copy Markdown
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
Please clean-up the commits to make it a cleaner git history. In particular removing the "merge" commits.
javatarz force-pushed the master branch fromefdd50f to
bd1dafb
Compare
August 28, 2021 06:13
javatarz commented Aug 28, 2021
Copy link Copy Markdown
Contributor
Author
|
@JohnVillalovos : can you have another look? I have squashed the commits into a single commit now. |
View reviewed changes
JohnVillalovos left a comment
Copy link Copy Markdown
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
Please fix the error in the docs build.
max-wittig assigned javatarz Aug 28, 2021
feat: allow global retry_transient_errors setup
3b1d3a4
`retry_transient_errors` can now be set through the Gitlab instance and global configuration Documentation for API usage has been updated and missing tests have been added.javatarz force-pushed the master branch from
bd1dafb to
3b1d3a4
Compare
August 29, 2021 09:31
javatarz commented Aug 29, 2021
Copy link Copy Markdown
Contributor
Author
|
Thought that's a bug with my local setup. Wish the pipeline automatically ran after commits so I could get this feedback quicker. @JohnVillalovos , @max-wittig , @nejch : Do you mind re-triggering the pipeline for me? Please let me know if there's any other review comments. |
View reviewed changes
JohnVillalovos approved these changes Aug 29, 2021
View reviewed changes
JohnVillalovos left a comment
Copy link Copy Markdown
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
Looks good to me. Would like at least one other person to review.
nejch approved these changes Aug 30, 2021View reviewed changes
nejch left a comment
Copy link Copy Markdown
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
Thanks a lot @javatarz for adding all the tests, let's finally get this merged ;) We can follow up with a tiny docs update in https://github.com/python-gitlab/python-gitlab/blob/master/docs/cli-usage.rst#content .
nejch merged commitd98d948
into
python-gitlab : master
Aug 30, 2021
nejch
mentioned this pull request
Aug 30, 2021
feat: add retry_transient_errors global option
#1258
Closed
javatarz commented Dec 4, 2021
Copy link Copy Markdown
Contributor
Author
|
@nejch : is it possible to publish a new version of this artifact to pypi? I'd like to use this feature in multiple projects where I use this library. 😄 |
nejch commented Dec 4, 2021
Copy link Copy Markdown
Member
|
Thanks for the ping @javatarz ! I would like to and usually we have a release every 28th but I've disabled it because we have #1520 next, and we're dropping support for 3.6 so we thought we'd release it with 3.6 EOL, along with other breaking changes in the library. I could maybe try cherry-picking non-breaking changes into a 2.11.0 or a pre-release branch though. |
Sineaggi commented Dec 9, 2021
Copy link Copy Markdown
|
@nejch We're in a similar boat, would love to see a release cut with this particular change. |