-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Fix overlong junit filename prefixes #30894
Fix overlong junit filename prefixes #30894
Conversation
@@ -157,7 +157,10 @@ junitFilenamePrefix() { | |||
mkdir -p "${KUBE_JUNIT_REPORT_DIR}" | |||
local KUBE_TEST_API_NO_SLASH="${KUBE_TEST_API//\//-}" | |||
# This file name isn't parsed by anything, and tee needs a shorter file name. | |||
# Convert strings like junit_v1,apps-v1alpha1,authentication.k8s.io-v1beta1 | |||
# to junit_v1,apps.k-v1a1,authentication.k-v1b1 |
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 most important part of a comment is the why, not the what! Please tell future us why you're making this change. :)
Please fix comment and we'll get this in asap. |
79058a1
to
070aba6
Compare
hack/make-rules/test.sh, line 161 [r1] (raw file):
|
Fixed. Comments from Reviewable |
070aba6
to
98ea7b9
Compare
GCE e2e build/test passed for commit 98ea7b9. |
LGTM, thanks!! |
In fact, the queue is currently blocked presumably because it can't parse junit from a flaky test-go run. @krousey (build cop) how do you feel about manually merging this? |
@lavalamp I'm find with a manual merge, but I don't see how this is blocking the build. There's a data race detection, but I don't see the junit parsing error. |
Manual merge on faith that @lavalamp saw something that I couldn't find. |
I saw a failed individual test, but queue made it red instead of orange, On Thu, Aug 18, 2016 at 3:04 PM, krousey notifications@github.com wrote:
|
…d-attempt Automatic merge from submit-queue Fix overlong junit filename prefixes (2nd attempt) This is followup for #30894. Turned out that filename shortening I used isn't enough in some cases (scroll to the right): ``` vagrant@devbox:~/work/kubernetes/src/k8s.io/kubernetes (test %) $ mkdir -p /tmp/art && time KUBE_JUNIT_REPORT_DIR=/tmp/art KUBE_COVER=y make test WHAT=cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned Running tests for APIVersion: v1,apps/v1alpha1,authentication.k8s.io/v1beta1,authorization.k8s.io/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,federation/v1beta1,policy/v1alpha1,rbac.authorization.k8s.io/v1alpha1,imagepolicy.k8s.io/v1alpha1 +++ [0822 13:57:46] Saving coverage output in '/tmp/k8s_coverage/v1,apps/v1alpha1,authentication.k8s.io/v1beta1,authorization.k8s.io/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,federation/v1beta1,policy/v1alpha1,rbac.authorization.k8s.io/v1alpha1,imagepolicy.k8s.io/v1alpha1/20160822-135746' tee: /tmp/art/junit_v1,apps-v1a1,authentication.v1b1,authorization.v1b1,autoscaling-v1,batch-v1,batch-v2a1,certificates-v1a1,extensions-v1b1,federation-v1b1,policy-v1a1,rbac.authorization.v1a1,imagepolicy.v1a1_20160822-135746-cmd_libs_go2idl_client-gen_testoutput_clientset_generated_test_internalclientset_typed_testgroup.k8s.io_unversioned.stdout: File name too long ok k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned 0.038s ls: cannot access '/tmp/art/junit_v1,apps-v1a1,authentication.v1b1,authorization.v1b1,autoscaling-v1,batch-v1,batch-v2a1,certificates-v1a1,extensions-v1b1,federation-v1b1,policy-v1a1,rbac.authorization.v1a1,imagepolicy.v1a1_20160822-135746*.stdout': No such file or directory Makefile:118: recipe for target 'test' failed make: *** [test] Error 1 real 0m49.623s user 2m35.224s sys 0m9.200s ``` Looks like we're have no choice here besides just using a hash as filename prefix.
Build scripts construct filenames that are longer than 255 chars when producing JUnit output for tests and
KUBE_COVER=y
:Let's shorten filenames a bit more to make them fit in 255 chars. This is probably temporary solution too, the bulletproof one being (e.g.) using
sha1sum
ofKUBE_TEST_API
but that would produce files with meaningless filenames so for now maybe it may wait.(there was recent attempt to shorten the filenames by removing
k8s.io
s, but that was not enough forKUBE_COVER=y
)This change is