-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
KUBE_JUNIT_REPORT_DIR fixes #73581
KUBE_JUNIT_REPORT_DIR fixes #73581
Conversation
/hold |
0b64682
to
feec2c1
Compare
/priority important-soon |
hack/jenkins/benchmark-dockerized.sh
Outdated
@@ -34,6 +34,9 @@ retry() { | |||
export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH} | |||
|
|||
retry go get github.com/cespare/prettybench | |||
if [[ -n "${KUBE_JUNIT_REPORT_DIR:-}" ]]; then | |||
go get github.com/jstemmer/go-junit-report |
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.
Is this (and prettybench) vendored? If not they should be.
We should not be downloading code (flaky and/or disapper) during test execution.
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 agree with @fejta. Also not sure testing on this is right.. we either call go-junit-report or we don't.. I don't think that hinges on if we have the report dir set, does it? If it does, can you link to that?
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.
About vendoring prettybench, I agree with @fejta.
However, I would like to focus on fixing hack/jenkins/benchmark-dockerized.sh first.
I can file an issue about downloading golang modules instead of vendoring it. For example go-junit-report
is also downloaded in hack/jenkins/gotest.sh and hack/jenkins/test-dockerized.sh.
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.
If benchmark-dockerized.sh
needs go-junit-report
, it should go install
the vendored version like our other utilities do:
kubernetes/hack/update-bazel.sh
Line 28 in 27d4958
go install k8s.io/kubernetes/vendor/github.com/bazelbuild/bazel-gazelle/cmd/gazelle |
As long as we're fixing this, we should also fix prettybench to be a go install command rather than go get, but feel free to punt on that if you'd prefer.
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 created separate PR #73740 to add go-junit-report and prettybench to the vendor.
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.
Thanks! Gave that one a review.
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.
Thanks :)
hack/make-rules/test.sh
Outdated
@@ -120,10 +120,6 @@ KUBE_TEST_API_VERSIONS="${KUBE_TEST_API_VERSIONS:-${ALL_VERSIONS_CSV}}" | |||
# once we have multiple group supports | |||
# Create a junit-style XML test report in this directory if set. | |||
KUBE_JUNIT_REPORT_DIR=${KUBE_JUNIT_REPORT_DIR:-} | |||
# If KUBE_JUNIT_REPORT_DIR is unset, and ARTIFACTS is set, then have them match. |
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 don't understand why this is being removed.
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.
Took me some time, but I think I finally understood what's the issue.
The problem is cause by
kubernetes/hack/make-rules/test.sh
Line 185 in a3c14ec
if [[ -n "${KUBE_JUNIT_REPORT_DIR}" ]] ; then |
kubernetes/hack/make-rules/test.sh
Line 188 in a3c14ec
go_test_grep_pattern="^[^[:space:]]\+[[:space:]]\+[^[:space:]]\+/[^[[:space:]]\+" |
When junit reporter is enabled, it filters out most of the logs.
I see two possible fixes:
- remove setting KUBE_JUNIT_REPORT_DIR to ARTIFACTS as default
- remove this go_test_grep_pattern that filters out logs
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, we probably don't want to remove this, as this is an important system in our CI system.
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.
If ARTIFACTS is also unset, then this won't be set (the local use case).
This is important for CI and shouldn't be removed (agree with @fejta).
/lgtm cancel
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.
Ok, so lets proceed then with changing go_test_grep_pattern
.
I added flag that will force printing full log. hack/jenkins/benchmark-dockerized.sh
will set this flag, get full log and convert it into benchmark. At the same time, there should be no impact on your CI.
Wdyt?
hack/jenkins/benchmark-dockerized.sh
Outdated
@@ -34,6 +34,9 @@ retry() { | |||
export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH} | |||
|
|||
retry go get github.com/cespare/prettybench | |||
if [[ -n "${KUBE_JUNIT_REPORT_DIR:-}" ]]; then | |||
go get github.com/jstemmer/go-junit-report |
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 agree with @fejta. Also not sure testing on this is right.. we either call go-junit-report or we don't.. I don't think that hinges on if we have the report dir set, does it? If it does, can you link to that?
/assign |
/hold |
feec2c1
to
97654b1
Compare
/hold cancel |
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.
/lgtm
/approve
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.
/hold
hack/make-rules/test.sh
Outdated
@@ -120,10 +120,6 @@ KUBE_TEST_API_VERSIONS="${KUBE_TEST_API_VERSIONS:-${ALL_VERSIONS_CSV}}" | |||
# once we have multiple group supports | |||
# Create a junit-style XML test report in this directory if set. | |||
KUBE_JUNIT_REPORT_DIR=${KUBE_JUNIT_REPORT_DIR:-} | |||
# If KUBE_JUNIT_REPORT_DIR is unset, and ARTIFACTS is set, then have them match. |
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, we probably don't want to remove this, as this is an important system in our CI system.
97654b1
to
9256a59
Compare
9256a59
to
d138e08
Compare
d138e08
to
c20262e
Compare
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.
/lgtm
/approve
/hold cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fejta, krzysied 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 |
/retest |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR fixes k8s.io/kubernetes/hack/jenkins/benchmark-dockerized.sh script.
Which issue(s) this PR fixes:
ref #72363
Special notes for your reviewer:
reverting some changes from #72218
Does this PR introduce a user-facing change?: