-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
connect: persist intermediate CAs on leader change #4379
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1d3f4b5
connect: persist intermediate CAs on leader change
kyhavlov 462ace4
connect: update leader initializeCA comment
kyhavlov 4e5fb6b
connect: add provider state to snapshots
kyhavlov f95c680
connect: use reflect.DeepEqual instead for test
kyhavlov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
(Bikeshed alert) Why not
require
? The error message is much better. Does it not with Retry?@mkeeler I agree testify is our current preference. I've never worked out if
verify
does something that makes it compatible withretry
as I tend to see them used together but if not I agree with require in general and prefer it to DeepEqual in pretty much every case.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.
require.Equal doesn't take retry.R, so it doesn't work here. I agree that'd be nicer than DeepEqual if it worked.
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.
Gotcha. no need to change this again for now but I was assuming this was the case and that
verify
was something we'd written to work withretry
.When Matt pointed out it's thirdparty I wondered if I'd just been wrong about testify not working in
retry
funcs. I guess it works withretry
because it has an interface that mimics*testing.T
whichretry.R
implements whereastestify
actually requires a real*testing.T
.IMO,
verify
is still fine to use inretry
funcs given that it produces nicer output and actually works. I think long-term it would be nice to come up with a wrapper inretry
that allows it to work withtestify
and then remove all use ofverify
in the code base but that's not a thing for this PR so my $0.02 is thatverify
is still fair game only insideretry
loops until we fixretry
to be compatible withtestify
.But land this as it is and we can take this discussion elsewhere if people feel it's important to clean that up.
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.
https://github.com/stretchr/testify/blob/f35b8ab0b5a2cef36673838d662e249dd9c94686/require/requirements.go#L4-L7
Ah so testify uses an interface too so it should actually be trivial to make
retry.R
compatible. I propose we make a task to do that and clean up all uses ofverify
separate from this PR.It's always bugged me I can't use
assert/require
inretry
loops but I assumed it was going to be a non-trivial fix.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.
Hmm, wait:
goe/testing.TB (used by
verify.Values
:require.TestingT
:The second is a strict subset of the first as far as I can see. Anything that works with
verify.Values
should work withrequire
....
Ah mystery solved. We are using an old version of verify that takes:
retry.R
implements that, but notErrorf
. So just making anErrorf
would be all that's needed to makerequire
work in retry loops.There are lots of old places using
verify
though so it's a big clean up...