tests: retry k8s ops related to env vars#15486
Conversation
There was a problem hiding this comment.
Hey @porridge - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Images are ready for the commit at 05977d7. To use with deploy scripts, first |
janisz
left a comment
There was a problem hiding this comment.
How about using https://github.com/hashicorp/go-retryablehttp in k8s client? Then retry will be transparent.
We need to set restCfg.Transport with retyrable http transport in getConfig like we did in:
Lines 315 to 323 in 4f9e180
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #15486 +/- ##
==========================================
+ Coverage 48.68% 48.69% +0.01%
==========================================
Files 2604 2605 +1
Lines 191663 191675 +12
==========================================
+ Hits 93304 93330 +26
+ Misses 91026 91012 -14
Partials 7333 7333
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Such generic approach seems tempting, but from its docs it seems it will retry even POST (which is non-idempotent) requests when they fail with a transport-level error. This seems unsafe to do blindly for all requests using this client. 🤔 Not saying using |
|
Oh, and I broke the logic, turns out ignoring the error was intentional in some cases 🤦🏻 |
2c71f55 to
b64b3a5
Compare
|
Caution There are some errors in your PipelineRun template.
|
|
/test all |
|
/test all |
|
/test gke-nongroovy-e2e-tests |
janisz
left a comment
There was a problem hiding this comment.
LGTM comments could be solved as follow up
Description
First stab at adding retries lost in #12292
If we deem this approach sensible, we can work on adding retries around more k8s client calls.
User-facing documentation
Testing and quality
Automated testing
How I validated my change
CI