-
Notifications
You must be signed in to change notification settings - Fork 441
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
Resolve panic in gateway validation client #6260
Conversation
Issues linked to changelog: |
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.
seems reasonable to me
Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io>
Visit the preview URL for this PR (updated for commit 4db0b08): https://gloo-edge--pr6260-test-flakes-6237-ug3745ow.web.app (expires Thu, 14 Apr 2022 17:19:55 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
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.
Nice fix! The null guard makes sense to me, per the original issue hitting a nil
on robust_client.go:66
.
The patched line is the only place (I can see) where c.validationClient
is set
* add test * add fix for panicing test * unfocus test * add changelog * goimports -w * Update changelog/v1.12.0-beta2/robust-client-panic.yaml Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
* Reduce test flakes (#6211) * First pass of cleanup * more * Fixup gateway e2e tests * add changelog * fix route options tests? * cleanup comments in assertions * Just after each to match just before * re-add config Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> * Resolve panic in gateway validation client (#6260) * add test * add fix for panicing test * unfocus test * add changelog * goimports -w * Update changelog/v1.12.0-beta2/robust-client-panic.yaml Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> * Resolve consul plugin data race (#6271) * use dependency injectio to handle fallback resolution * add changelog * fixup dns resolvers and test * Resolve data race in setup syncer test (#6282) * add changelogs * delete duplicate changelogs Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io>
* Reduce test flakes (#6211) * First pass of cleanup * more * Fixup gateway e2e tests * add changelog * fix route options tests? * cleanup comments in assertions * Just after each to match just before * re-add config Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> * Resolve panic in gateway validation client (#6260) * add test * add fix for panicing test * unfocus test * add changelog * goimports -w * Update changelog/v1.12.0-beta2/robust-client-panic.yaml Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> * Resolve consul plugin data race (#6271) * use dependency injectio to handle fallback resolution * add changelog * fixup dns resolvers and test * Resolve data race in setup syncer test (#6282) * add changelogs * delete duplicate changelogs Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io>
* add test * add fix for panicing test * unfocus test * add changelog * goimports -w * Update changelog/v1.12.0-beta2/robust-client-panic.yaml Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
* Reduce test flakes (#6211) * First pass of cleanup * more * Fixup gateway e2e tests * add changelog * fix route options tests? * cleanup comments in assertions * Just after each to match just before * re-add config Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> * Resolve panic in gateway validation client (#6260) * add test * add fix for panicing test * unfocus test * add changelog * goimports -w * Update changelog/v1.12.0-beta2/robust-client-panic.yaml Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> * Resolve consul plugin data race (#6271) * use dependency injectio to handle fallback resolution * add changelog * fixup dns resolvers and test * Resolve data race in setup syncer test (#6282) * add changelogs * delete duplicate changelogs Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io>
* Reduce test flakes (#6211) * First pass of cleanup * more * Fixup gateway e2e tests * add changelog * fix route options tests? * cleanup comments in assertions * Just after each to match just before * re-add config Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> * Resolve panic in gateway validation client (#6260) * add test * add fix for panicing test * unfocus test * add changelog * goimports -w * Update changelog/v1.12.0-beta2/robust-client-panic.yaml Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io> Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> * Resolve consul plugin data race (#6271) * use dependency injectio to handle fallback resolution * add changelog * fixup dns resolvers and test * Resolve data race in setup syncer test (#6282) * move changelog * fixup registry * de duplicate changelogs * delete dynamic forward proxy test * delete hybrid test * undo kube2e changes, panic occurring with gomega * update changelog * undo delete Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Kevin Dorosh <kevin.dorosh@solo.io>
Description
Ensure that the gateway validation client is never set to nil
Context
We encountered this bug in tests that would occasionally panic, however the bug itself could impact customers
Verification
I wrote a test first, and add that as the first commit. If you checkout just that test (no other changes) it will panic in the way that we noticed in some e2e tests. If you then checkout my fix and re-run the same test, it will pass.
General Thoughts
I believe this issue arises because we have a local variable for clientReinstantiateError and a class variable for constructorClient. This means that we can ensure that on a clientReinstantiateError we do not retry, but we do set the client to nil which could be picked up on the subsequent request.
Checklist:
make -B install-go-tools generated-code
to ensure there will be no code diffBOT NOTES:
resolves #6237