Skip to content
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

Consistent timeout of pull-kubernetetes-verify on a PR touching hack/ directory. #50319

Closed
bskiba opened this issue Aug 8, 2017 · 10 comments
Closed
Assignees
Labels
sig/testing Categorizes an issue or PR as relevant to SIG Testing.

Comments

@bskiba
Copy link
Member

bskiba commented Aug 8, 2017

/kind bug

I have a PR that I am trying to merge that ads a flag to hack/verify-flags/known-flags.txt (#49382). I can't get pull-kubernetes-verify to pass as it keeps timing out (https://k8s-gubernator.appspot.com/builds/kubernetes-jenkins/pr-logs/pull/49382/pull-kubernetes-verify/)
Comparing with logs other PRs that do pass the check I have an additional 15 minutes spent on fetching godeps due to change in hack/ directory. As it usually takes ~45mins to run a successfull pull-kubernetes-verify, my chances of merging are close to 0.

Example excerpt from https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/49382/pull-kubernetes-verify/43937/build-log.txt
Verifying hack/make-rules/../../hack/verify-godeps.sh
I0807 13:48:00.045] Checking for 'Godeps/' changes against 'bootstrap-upstream/master'
I0807 13:48:00.267] No 'Godeps/' changes detected.
I0807 13:48:00.271] Checking for 'vendor/' changes against 'bootstrap-upstream/master'
I0807 13:48:00.506] No 'vendor/' changes detected.
I0807 13:48:00.510] Checking for 'hack/' changes against 'bootstrap-upstream/master'
I0807 13:48:02.323] +++ [0807 13:48:02] Starting to download all kubernetes godeps. This takes a while
I0807 13:50:53.413] +++ [0807 13:50:53] Download finished
I0807 13:50:53.714] Running godep save. This will take around 15 minutes.
I0807 14:05:21.760]
I0807 14:05:21.761] Don't forget to run:
I0807 14:05:21.761] - hack/update-bazel.sh to recreate the BUILD files
I0807 14:05:21.761] - hack/update-godep-licenses.sh if you added or removed a dependency!
I0807 14:05:22.247] Godeps Verified.
I0807 14:05:22.248] Removing /tmp/gopath.jlBk34
I0807 14:05:24.930] �[0;32mSUCCESS�[0m hack/make-rules/../../hack/verify-godeps.sh 1044s

@k8s-github-robot
Copy link

@bskiba
There are no sig labels on this issue. Please add a sig label by:

  1. mentioning a sig: @kubernetes/sig-<group-name>-<group-suffix>
    e.g., @kubernetes/sig-contributor-experience-<group-suffix> to notify the contributor experience sig, OR

  2. specifying the label manually: /sig <label>
    e.g., /sig scalability to apply the sig/scalability label

Note: Method 1 will trigger an email to the group. You can find the group list here and label list here.
The <group-suffix> in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals

@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Aug 8, 2017
@bskiba
Copy link
Member Author

bskiba commented Aug 8, 2017

/sig testing

@k8s-ci-robot k8s-ci-robot added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Aug 8, 2017
@k8s-github-robot k8s-github-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Aug 8, 2017
@bskiba
Copy link
Member Author

bskiba commented Aug 8, 2017

Looks like I managed to merge the PR as another retest fit under the limit (2017-08-08 16:52 CEST took 56m43s) but raising the timeout for pull-kubernetes-verify might be worth considering for cases similar to mine.

@shashidharatd
Copy link

I am facing the same issue for my pr https://k8s-gubernator.appspot.com/pr/46090
pull-kubernetetes-verify is consistently timing out.
I feel we should raise the timeout for this job by few more minutes should work for now.
@fejta, any thoughts? its annoying that any pr touches hack/ directory just to add some flag in hack/verify-flags/known-flags.txt triggers this pattern.

23:53:37.505] Checking for 'hack/' changes against 'bootstrap-upstream/master'
I0808 23:53:39.115] +++ [0808 23:53:39] Starting to download all kubernetes godeps. This takes a while
I0808 23:56:14.088] +++ [0808 23:56:14] Download finished
I0808 23:56:14.378] Running godep save. This will take around 15 minutes.
I0809 00:10:27.162] 
I0809 00:10:27.163] Don't forget to run:
I0809 00:10:27.163] - hack/update-bazel.sh to recreate the BUILD files
I0809 00:10:27.163] - hack/update-godep-licenses.sh if you added or removed a dependency!
I0809 00:10:27.622] Godeps Verified.
I0809 00:10:27.622] Removing /tmp/gopath.7qHIar
I0809 00:10:30.247] �[0;32mSUCCESS�[0m  hack/make-rules/../../hack/verify-godeps.sh	1013s

@shashidharatd
Copy link

/assign @fejta

@shashidharatd
Copy link

here is a link to the issue on known-flags.txt #40329
shall we remove this hack/verify-flags-underscore.py check?

@liggitt
Copy link
Member

liggitt commented Aug 10, 2017

it's not that specific task, I don't think... the verify job just got slower in the past couple days (it's timing out at an hour every time on #49642 now)

these times are from a failed run today:

I0809 22:33:15.797] SUCCESS  hack/make-rules/../../hack/verify-api-groups.sh	0s
I0809 22:35:56.201] SUCCESS  hack/make-rules/../../hack/verify-api-reference-docs.sh	161s
I0809 22:36:02.768] SUCCESS  hack/make-rules/../../hack/verify-bazel.sh	6s
I0809 22:36:04.151] SUCCESS  hack/make-rules/../../hack/verify-boilerplate.sh	2s
I0809 22:37:30.432] SUCCESS  hack/make-rules/../../hack/verify-cli-conventions.sh	86s
I0809 22:41:06.652] SUCCESS  hack/make-rules/../../hack/verify-codecgen.sh	216s
I0809 22:43:11.531] SUCCESS  hack/make-rules/../../hack/verify-codegen.sh	125s
I0809 22:43:23.314] SUCCESS  hack/make-rules/../../hack/verify-description.sh	12s
I0809 22:43:42.813] SUCCESS  hack/make-rules/../../hack/verify-federation-api-reference-docs.sh	19s
I0809 22:43:54.967] SUCCESS  hack/make-rules/../../hack/verify-federation-generated-swagger-docs.sh	12s
I0809 22:46:24.256] SUCCESS  hack/make-rules/../../hack/verify-federation-openapi-spec.sh	150s
I0809 22:47:11.495] SUCCESS  hack/make-rules/../../hack/verify-federation-swagger-spec.sh	47s
I0809 22:47:58.212] SUCCESS  hack/make-rules/../../hack/verify-generated-docs.sh	47s
I0809 22:50:20.498] SUCCESS  hack/make-rules/../../hack/verify-generated-protobuf.sh	142s
I0809 22:51:04.986] SUCCESS  hack/make-rules/../../hack/verify-generated-runtime.sh	44s
I0809 22:51:40.231] SUCCESS  hack/make-rules/../../hack/verify-generated-swagger-docs.sh	36s
I0809 22:51:40.899] SUCCESS  hack/make-rules/../../hack/verify-godep-licenses.sh	0s
I0809 23:09:28.253] SUCCESS  hack/make-rules/../../hack/verify-godeps.sh	1068s
I0809 23:09:42.470] SUCCESS  hack/make-rules/../../hack/verify-gofmt.sh	14s
I0809 23:10:57.064] SUCCESS  hack/make-rules/../../hack/verify-golint.sh	75s
I0809 23:16:32.086] SUCCESS  hack/make-rules/../../hack/verify-govet.sh	335s
I0809 23:17:03.353] SUCCESS  hack/make-rules/../../hack/verify-import-boss.sh	31s
I0809 23:19:00.178] SUCCESS  hack/make-rules/../../hack/verify-no-vendor-cycles.sh	117s
I0809 23:21:27.489] SUCCESS  hack/make-rules/../../hack/verify-openapi-spec.sh	147s
I0809 23:21:27.768] SUCCESS  hack/make-rules/../../hack/verify-pkg-names.sh	0s
I0809 23:21:28.269] SUCCESS  hack/make-rules/../../hack/verify-readonly-packages.sh	1s
starts hack/verify-staging-godeps.sh and hits the 1 hour timeout and fails

before today the individual tasks were running faster, but were still close to the timeout. these times were from a successful run earlier:

I0809 03:27:16.349] SUCCESS  hack/make-rules/../../hack/verify-api-groups.sh	0s
I0809 03:29:15.092] SUCCESS  hack/make-rules/../../hack/verify-api-reference-docs.sh	119s
I0809 03:29:19.515] SUCCESS  hack/make-rules/../../hack/verify-bazel.sh	4s
I0809 03:29:20.662] SUCCESS  hack/make-rules/../../hack/verify-boilerplate.sh	1s
I0809 03:30:27.827] SUCCESS  hack/make-rules/../../hack/verify-cli-conventions.sh	67s
I0809 03:33:12.346] SUCCESS  hack/make-rules/../../hack/verify-codecgen.sh	165s
I0809 03:34:48.840] SUCCESS  hack/make-rules/../../hack/verify-codegen.sh	96s
I0809 03:34:57.848] SUCCESS  hack/make-rules/../../hack/verify-description.sh	9s
I0809 03:35:12.501] SUCCESS  hack/make-rules/../../hack/verify-federation-api-reference-docs.sh	15s
I0809 03:35:21.922] SUCCESS  hack/make-rules/../../hack/verify-federation-generated-swagger-docs.sh	9s
I0809 03:37:25.828] SUCCESS  hack/make-rules/../../hack/verify-federation-openapi-spec.sh	124s
I0809 03:38:00.843] SUCCESS  hack/make-rules/../../hack/verify-federation-swagger-spec.sh	35s
I0809 03:38:34.212] SUCCESS  hack/make-rules/../../hack/verify-generated-docs.sh	34s
I0809 03:41:11.203] SUCCESS  hack/make-rules/../../hack/verify-generated-protobuf.sh	157s
I0809 03:41:44.338] SUCCESS  hack/make-rules/../../hack/verify-generated-runtime.sh	33s
I0809 03:42:10.974] SUCCESS  hack/make-rules/../../hack/verify-generated-swagger-docs.sh	26s
I0809 03:42:11.472] SUCCESS  hack/make-rules/../../hack/verify-godep-licenses.sh	1s
I0809 03:57:37.381] SUCCESS  hack/make-rules/../../hack/verify-godeps.sh	 926s
I0809 03:57:48.425] SUCCESS  hack/make-rules/../../hack/verify-gofmt.sh	11s
I0809 03:58:41.371] SUCCESS  hack/make-rules/../../hack/verify-golint.sh	53s
I0809 04:02:47.267] SUCCESS  hack/make-rules/../../hack/verify-govet.sh	246s
I0809 04:03:10.146] SUCCESS  hack/make-rules/../../hack/verify-import-boss.sh	23s
I0809 04:04:27.405] SUCCESS  hack/make-rules/../../hack/verify-no-vendor-cycles.sh	77s
I0809 04:06:25.255] SUCCESS  hack/make-rules/../../hack/verify-openapi-spec.sh	118s
I0809 04:06:25.404] SUCCESS  hack/make-rules/../../hack/verify-pkg-names.sh	0s
I0809 04:06:25.674] SUCCESS  hack/make-rules/../../hack/verify-readonly-packages.sh	0s
I0809 04:13:27.543] SUCCESS  hack/make-rules/../../hack/verify-staging-godeps.sh	422s
I0809 04:13:37.813] SUCCESS  hack/make-rules/../../hack/verify-staging-imports.sh	10s
I0809 04:14:15.414] SUCCESS  hack/make-rules/../../hack/verify-swagger-spec.sh	38s
I0809 04:16:11.565] SUCCESS  hack/make-rules/../../hack/verify-symbols.sh	116s
I0809 04:16:11.575] SUCCESS  hack/make-rules/../../hack/verify-test-images.sh	0s
I0809 04:16:46.170] SUCCESS  hack/make-rules/../../hack/verify-flags-underscore.py	35s

the time spent in godeps is sort of ridiculous (we restore godeps three times during the verify run, each of which takes ~3 minutes)

@liggitt
Copy link
Member

liggitt commented Aug 10, 2017

this bit in verify-godeps.sh is likely to be the issue if you touch hack/:

readonly branch=${1:-${KUBE_VERIFY_GIT_BRANCH:-master}}
if ! [[ ${KUBE_FORCE_VERIFY_CHECKS:-} =~ ^[yY]$ ]] && \
  ! kube::util::has_changes_against_upstream_branch "${branch}" 'Godeps/' && \
  ! kube::util::has_changes_against_upstream_branch "${branch}" 'vendor/' && \
  ! kube::util::has_changes_against_upstream_branch "${branch}" 'hack/'; then
  exit 0
fi

skipping that script drops ~15 minutes from the run time of the job

@liggitt
Copy link
Member

liggitt commented Aug 10, 2017

opened #50418 to skip unrelated changes in hack/, though for PRs that actually do change something godep-related, the timeout issues will persist. kubernetes/test-infra#3999 supposedly bumped the timeout to 75 minutes, though I'm still seeing the job be terminated at 1 hour

k8s-github-robot pushed a commit that referenced this issue Aug 10, 2017
Automatic merge from submit-queue (batch tested with PRs 50418, 49830, 49206, 49061, 49912)

Target godep script change verifications

helps with #50319

`hack/verify-godeps.sh` takes ~15 minutes of the verify job time. We should not run it if not required, especially since the job is regularly timing out at 1 hour when this check is included.

#48653 added a check to run it if *anything* under `hack` was changed. This targetes just changes to the godep scripts
@liggitt
Copy link
Member

liggitt commented Aug 10, 2017

timeout was lengthened to 75 minutes, and fewer things should be subject to godep verification since #50418 merged

@liggitt liggitt closed this as completed Aug 10, 2017
k8s-github-robot pushed a commit that referenced this issue Aug 10, 2017
Automatic merge from submit-queue (batch tested with PRs 49615, 49321, 49982, 49788, 50355)

Simplify hack/verify-flags-underscore.py

**What this PR does / why we need it**:
This PR removes the need for `hack/verify-flags/known-flags.txt` and verify-flags-underscore.py will always parse the flags from go files to check if they have underscore.

It is much faster compared to earlier checks and it does its job to check for underscore in flags.
Now:
```
# time ./hack/verify-flags-underscore.py 
real	0m1.638s
user	0m1.560s
sys	0m0.076s
```
Before:
```
# time ./hack/verify-flags-underscore.py 
real	0m22.585s
user	0m22.464s
sys	0m0.112s
```

It has become a pain to keep adding new flag to `known-flags.txt` whenever a new flag is introduced. with this PR this is step is not required anymore.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #40329  #50319

**Special notes for your reviewer**:

**Release note**:
```
NONE
```
/cc @fejta @mtaufen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/testing Categorizes an issue or PR as relevant to SIG Testing.
Projects
None yet
Development

No branches or pull requests

6 participants