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
OCPBUGS-18776: [sig-instrumentation] tests fail due to JSON parsing error. #28320
Conversation
@raptorsun: This pull request references Jira Issue OCPBUGS-18776, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/jira refresh |
@raptorsun: This pull request references Jira Issue OCPBUGS-18776, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
/lgtm |
07d2f93
to
d3336f3
Compare
/retest-required |
/retest |
|
||
const maxRetries = 2 | ||
var resp *http.Response = nil | ||
for retries := 0; retries < maxRetries; retries++ { |
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.
I'd recommend using wait.PollUntilContextTimeout()
from the k8s.io/apimachinery/pkg/util/wait
package.
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.
The retry loop is replaced by the functionwait.PollUntilContextTimeout()
. Meanwhile the timeout limit is increased to 60 seconds with retry interval of 10 seconds.
d3336f3
to
a19b9f2
Compare
/retest |
/retest-required |
/retest |
1 similar comment
/retest |
Thanks for the review :D @simonpasquier |
https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/28320/pull-ci-openshift-origin-master-e2e-aws-ovn-fips/1719974869644349440 fails with an error that looks to be triggered by this change:
|
I suspect that you'll have to create the http.Request in the condition function. |
69854d7
to
3f28d2f
Compare
Thanks for the quick review :D @simonpasquier |
|
||
// url.JoinPath but with no error checks | ||
func JoinUrl(base string, paths ...string) string { | ||
path, _ := url.JoinPath(base, paths...) |
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.
For safety, it would better to panic if an error is returned (which should never happen)
path, _ := url.JoinPath(base, paths...) | |
path, err := url.JoinPath(base, paths...) | |
if err != nil { | |
panic(err) | |
} |
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.
Right, like a throw()
:D
3f28d2f
to
a0a6b0d
Compare
/retest-required |
/retest |
1 similar comment
/retest |
/unhold |
… helper functions.
a0a6b0d
to
3b61545
Compare
Thank you for the timely review. @simonpasquier |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jan--f, raptorsun, simonpasquier The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@raptorsun: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
29ad128
into
openshift:master
@raptorsun: Jira Issue OCPBUGS-18776: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-18776 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
condition := func(ctx context.Context) (bool, error) { | ||
resp, err := client.Do(req) | ||
if err != nil { | ||
return false, err |
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.
we missed here that the error should be captured in lastErr
and the function should return false, nil
.
Replace shell call of curl with net/http implementation in Prometheus helper functions.
So that timeout requests will not get truncated and reassembled responses.