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
Adding support for a layer-7 (HTTP(S)) status endpoint #365
Adding support for a layer-7 (HTTP(S)) status endpoint #365
Conversation
status_test.go
Outdated
|
||
response := httptest.NewRecorder() | ||
handler := newStatusHandler(func() (net.Conn, error) { | ||
u, _ := url.Parse(statusTarget.URL) // NOTE: I tried using statusTarget.Config.Addr instead, but it wasn't set. |
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.
Just wanted to call this out because I really don't like this level of complexity in the test.
Need to address ☝️ So actually we will address this by updating these tests to be "TCP-specific" as to test the exist functionality of the status handler today I.e., 200 response code from a listening TCP backend. These tests will be renamed to We will add a new test In other words, updating the checks to ensure that layer-7 checks only pass if the path they are checking returns a 200 status code. |
Signed-off-by: Colton J. McCurdy <mccurdyc22@gmail.com>
Signed-off-by: Colton J. McCurdy <mccurdyc22@gmail.com>
Signed-off-by: Colton J. McCurdy <mccurdyc22@gmail.com>
…unction Signed-off-by: Colton J. McCurdy <mccurdyc22@gmail.com>
2876b76
to
a5feb34
Compare
Let me know if you want me to squash commits. |
@csstaub Thanks for your help! ❤️ Let me know what you think about this implementation! |
@csstaub I've also manually tested via the following steps:
|
Just to check existing behavior i.e., a TCP healthcheck by not providing an http status target behaves the same as before:
|
What about explicitly providing a TCP target?
It serves fine, but when you hit the ghostunnel
This got me thinking, do we name the flag |
Signed-off-by: Colton J. McCurdy <mccurdyc22@gmail.com>
I've also pushed the built container image to dockerhub |
@mccurdyc Sorry, I will try to get to this this week |
@csstaub No worries ❤️ ! Let me know if there is anything that I can do to make it easier to review! Thanks again for your help! |
Codecov Report
@@ Coverage Diff @@
## master #365 +/- ##
==========================================
+ Coverage 79.53% 79.63% +0.09%
==========================================
Files 25 25
Lines 1124 1139 +15
==========================================
+ Hits 894 907 +13
- Misses 181 182 +1
- Partials 49 50 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Left some comments. Overall looks good to me, thank you for this pull request!
… moving to server flags Signed-off-by: Colton J. McCurdy <mccurdyc22@gmail.com>
Thanks again @mccurdyc! |
@csstaub Hey Friend! When you get the chance, can you cut a release that includes this change! Thanks a ton! ❤️ Let me know if I can prepare release notes or some way to help! |
@mcpherrinm Hey Friend! Could you possibly help by cutting a release with this change, we'd like to start using this new functionality? Thanks! |
@csstaub @mcpherrinm I'm really sorry to keep bothering you, but could I please trouble you to cut a release? ❤️ |
@csstaub I'm sorry to keep bugging, but is there any way I could make it less work for you to cut a release (e.g., draft release notes, etc.)? Thanks! ❤️ |
Signed-off-by: Colton J. McCurdy mccurdyc22@gmail.com
Addresses #364
Testing