Add blue/green conformance test#1460
Conversation
|
/assign @mattmoor |
|
Sample output. |
mattmoor
left a comment
There was a problem hiding this comment.
This is super cool, thanks for putting this together.
🎉
There was a problem hiding this comment.
If this is expected to implement a particular interface, I'd recommend using this pattern to assert that:
var _ Interface = (*SpoofingClient)(nil)There was a problem hiding this comment.
The closest I found is http.Roundtripper, but I'm not sure if implementing that would make this easier or harder to use. WDYT?
There was a problem hiding this comment.
Please use http.StatusNotFound and other http constants in place of hardcoding.
There was a problem hiding this comment.
I think this encapsulation (which is good) loses something by being in the same file as other stuff.
There was a problem hiding this comment.
see comment about using http constants throughout this file.
There was a problem hiding this comment.
_ is a context.Context
There was a problem hiding this comment.
_ is a context.Context
There was a problem hiding this comment.
Can we hoist 100 and 25% to constants to make them easier to vary?
bobcatfish
left a comment
There was a problem hiding this comment.
I think this is pretty cool - most of my confusion with this initially was about #1458 - generally i am excited about these changes :D
i really think we should start some docs on what each conformance test is for - and/or use an elaborate docstring for each test explaining the test case it is covering - if we don't start now this will be painful to add later
There was a problem hiding this comment.
i like this interface a lot, i think it's really slick and pretty easy to understand what's going on!
There was a problem hiding this comment.
plz add name to TODO or issue
There was a problem hiding this comment.
i am nervous about adding middleware - i think middleware tends to be hard to reason about and make debugging more difficult
There was a problem hiding this comment.
Acknowledged. I will leave this as a TODO for now, but I think it's possible to do this in an acceptable way by just function wrapping.
We'll need to do something like it for #1298
There was a problem hiding this comment.
there's a lot going on in this function, I think we could use some docs explaining what's going on at least
There was a problem hiding this comment.
can has more comments explaining the details here
|
/assign @tcnghia I TODO(you)'d you a few places, can you take a look? |
There was a problem hiding this comment.
oooo nice update, i like the percentage
There was a problem hiding this comment.
it's not quite clear to me why this is called "recording" checker?
There was a problem hiding this comment.
It was a bad abstraction, I have eradicated it. Thanks.
That is: * Create config pointing first image. * Get the revision name, this is the blue revision. * Update the config, pointing to second image. * Get the revision name, this is the green revision. * Create a Route that points 50/50 to blue and green revision. * Spin up goroutines to make 100 requests against: 1. blue revision 2. green revision 3. route * For 1/2, assert that each request is handled by the appropriate image. * For 3, assert that we get a reasonable distribution of responses (at worst 25/75 split).
|
@bobcatfish up for another round? 😀 I refactored some things such that I find them much more legible, LMK if you think it could be improved any further.
I've added a small comment to the blue/green test. Happy to change it if you had something else in mind. |
|
@mattmoor @bobcatfish this is now 100% free of greek alphabet and evil. RFAL 😅 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jonjohnsonjr, mattmoor The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…e-v1.18 [release-v1.18] Update OWNERS file
Fixes #1416
Based on #1458
The test:
This has exposed some less-than-perfect performance. Many requests return 404s :(