Repository navigation
cmd test flake: 0-length response instead of expected timeout - #15885
Conversation
|
/assign @juanvallejo |
|
/retest |
1 similar comment
|
/retest |
| @@ -68,8 +68,8 @@ func dialToServer(clientConfig restclient.Config) error { | |||
|
|
|||
| // Do a HEAD request to serverPathToDial to make sure the server is alive. | |||
|
|
||
| // Do a HEAD request to serverPathToDial to make sure the server is alive. | ||
| // We don't care about the response, any err != nil is valid for the sake of reachability. | ||
| serverURLToDial := (&url.URL{Scheme: parsedURL.Scheme, Host: parsedURL.Host, Path: "/"}).String() |
There was a problem hiding this comment.
Why does / vs /healthz matter?
| serverURLToDial := (&url.URL{Scheme: parsedURL.Scheme, Host: parsedURL.Host, Path: "/"}).String() | ||
| req, err := http.NewRequest("HEAD", serverURLToDial, nil) | ||
| serverURLToDial := (&url.URL{Scheme: parsedURL.Scheme, Host: parsedURL.Host, Path: "/healthz"}).String() | ||
| req, err := http.NewRequest("GET", serverURLToDial, nil) |
There was a problem hiding this comment.
I will defer to @openshift/cli-review to understand this.
|
@abstractj per our conversation, it looks like the most likely cause of the @fabianofranz I am not sure what the best solution would be here; one thing we could consider is looking for both outcomes in the test ( |
|
@juanvallejo the first alternative to me seems like a simple fix. The second suggestion of replacing the test, I'm not sure if I follow. If we are not going to depend on the connection timing out, it feels like timeout.sh will lose it's purpose. Am I wrong? If the idea is to increase the timeout to 500ms or 1s, like you mentioned on IRC, I tried that too, but at least locally here I get a crash at kube/config: Maybe is my setup, but it only happens if I change it. If that's not happening to you, feel free to ignore. Here's my testing script: |
We are still testing for connection timeout in at least one other test in timeout.sh. The only difference is that the linked case is not racing against the connection timing out before headers are received from the server in order to succeed, which is what
Seems like your kubeconfig file is getting corrupted; since you're putting each call to Here is a patch for |
|
@fabianofranz I was chatting with @juanvallejo on IRC on yesterday and we have some options to fix this issue:
IMO, option 2 is the best alternative. Because it seems like there's no other better (flake-free) alternative to keep Wdyt? |
|
@abstractj @juanvallejo option 2 works for me. |
|
@juanvallejo @fabianofranz cool, PR updated. |
|
/retest |
|
/retest |
|
@abstractj try redirecting stderr to stdout and expecting success_and_text: https://github.com/openshift/origin/blob/master/test/cmd/timeout.sh#L16 |
|
/retest |
|
@juanvallejo I'm a bit confused about the testsuite. The reason why it fails is due to a wrong output. So if we replace that line with: Line 19 will fail, even if we get the correct output. But if instead we switch to something like: All the tests will pass. |
|
@abstractj hm, I think all you should need to do is redirect stderr to stdout and then |
@juanvallejo I don't think that gonna work just redirecting stderr to stdout. Because as you can see below the error is there with more output. So if the testsuite look for With my latest changes using some
I noticed that too. But due to my ignorance on the testsuite, I felt like I was doing something wrong. |
Signed-off-by: Bruno Oliveira <[email protected]>
|
@fabianofranz thank God, all green :) |
|
/lgtm |
|
/approve #15453 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abstractj, fabianofranz, juanvallejo The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
Automatic merge from submit-queue (batch tested with PRs 15885, 15973, 16000) |
It looks like this issue is related with HEAD request that we do. By
changing it to send HTTP GET requests to our /healthz endpoint seems
to fix the issue.
Signed-off-by: Bruno Oliveira [email protected]
@juanvallejo @fabianofranz it seems to fix the issue #15453