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

Use forked gocheck #21017

Merged
merged 2 commits into from
Mar 12, 2016
Merged

Use forked gocheck #21017

merged 2 commits into from
Mar 12, 2016

Conversation

cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented Mar 8, 2016

  • added support for per-check timeouts (upstream is non-responsive)
  • set 5m per-check timeout

The original PR I made to go-check had a bad rebase (and difficult to recover from), so opened a new on here: go-check/check#80

Another PR for consideration is go-check/check#70 which adds parallel tests -- this is not included here as I have not merged it into my fork's master branch in consideration of the per-check timeout being a bit more pertinent to Docker's test suite right now.

The last merge to go-check/check was 3 months ago, and that merge also broke the test suite :(

@cpuguy83
Copy link
Member Author

cpuguy83 commented Mar 8, 2016

ping @tiborvass @icecrime @tianon

@jessfraz
Copy link
Contributor

jessfraz commented Mar 8, 2016

ah saddness that upstream :(

@thaJeztah
Copy link
Member

I see there's also an open PR from @brahmaroutu go-check/check#47 should we include that in our fork?

@tianon
Copy link
Member

tianon commented Mar 8, 2016

Oh Go ecosystem 😢

For posterity's sake, can we enumerate some of the issues we've seen with upstream here? (perhaps links to PRs that have gone stale?) That'll be helpful to point anyone asking why we use a fork (or who traces it back to a commit and thus PR), and could also be an OK way to check whether we could consider switching back sometime later.

@cpuguy83
Copy link
Member Author

cpuguy83 commented Mar 8, 2016

@tianon Yes, can definitely do that. Unfortunately I'll have to re-create the branch since I managed to push -f a change on it that really should have gone in another branch ( 😢 ). Luckily the changes required for this are rather small other than adding the tests.

@thaJeztah
Copy link
Member

Related PR upstream: go-check/check#70 (and the one I mentioned above possibly)

@tianon
Copy link
Member

tianon commented Mar 8, 2016

@cpuguy83 oh, I just meant here -- it's pretty easy IMO to trace a commit back to a PR (by going to https://github.com/.../commit/... and clicking the #xxx link), so @thaJeztah's comment is good enough for me 👍

@cpuguy83
Copy link
Member Author

cpuguy83 commented Mar 8, 2016

Updated the PR to list the PRs.

@tianon
Copy link
Member

tianon commented Mar 8, 2016

LGTM 😞

@icecrime
Copy link
Contributor

icecrime commented Mar 8, 2016

Not sure what's wrong here:

15:27:32 can't load package: package github.com/docker/docker: no buildable Go source files in /go/src/github.com/docker/docker

@icecrime icecrime added the status/failing-ci Indicates that the PR in its current state fails the test suite label Mar 8, 2016
@thaJeztah
Copy link
Member

ping @cpuguy83 any idea what those failures are? TL;DR got a lot of WindowsTP4 builds timing out, so wondering if we should up the timeout for those, or if we can get this PR merged soon

@cpuguy83
Copy link
Member Author

I have literally no idea.
Note that experimental also failed just like janky, even though it is marked as successful.

@thaJeztah
Copy link
Member

ping @mlaventure perhaps we should up the timeout for WindowsTP4 while we figure out what's wrong here?

@mlaventure
Copy link
Contributor

This one is not a timeout issue.

It looks like the copy of the sources into the container didn't happen for some reason.

But I can see it happening in the log:

04:26:34 Step 50 : COPY . /go/src/github.com/docker/docker
04:26:38  ---> ba1e4201c70f

Edit: adding missing not

@cpuguy83
Copy link
Member Author

Yeah, it's super strange and it's only happening on this PR.
Tried rebuilding multiple times... rebasing and pushing, etc.

@cpuguy83
Copy link
Member Author

And win2lin and userns run successfully.

@cpuguy83
Copy link
Member Author

Seems I found the issue. Had to move the check.timeout flag from make.sh to make/integration.
Tests seem to be making it past where they did before.

@cpuguy83
Copy link
Member Author

All 💚

@cpuguy83 cpuguy83 removed the status/failing-ci Indicates that the PR in its current state fails the test suite label Mar 10, 2016
@calavera
Copy link
Contributor

LGTM

@cyphar
Copy link
Contributor

cyphar commented Mar 11, 2016

If this works well, I think we should ditch using the suite timeout at all (it doesn't make sense, because we're always adding new tests, it's more important that if a test stalls we fail it after a timeout -- it doesn't matter how long the whole suite takes as long as it doesn't freeze).

@cpuguy83
Copy link
Member Author

@cyphar Really I believe the -timeout option would be per-test, but since we're hijacking a single testing.T in the integration tests it ends up being for the whole suite.

Instead of removing it, we can still set the timeout option so it also applies to unit tests and such.

Import it with:
The intention of this fork is not to change any of the original behavior, but add
some specific behaviors needed for some of my projects already using this test suite.
For documentation on the main behavior of go-check see the afformentioned repo.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aforementioned :)

@cpuguy83 cpuguy83 force-pushed the use_forked_gocheck branch 2 times, most recently from 15e9cea to b976da5 Compare March 11, 2016 16:48
@@ -45,7 +45,7 @@ DOCKER_ENVS := \
-e DOCKER_USERLANDPROXY \
-e TESTDIRS \
-e TESTFLAGS \
-e TIMEOUT
-e TIMEOUT \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not going to harm anything at the moment, but this line continuation isn't needed after removing the new variable

@cpuguy83 cpuguy83 force-pushed the use_forked_gocheck branch 3 times, most recently from 506703c to d8c5889 Compare March 11, 2016 19:07
@cpuguy83
Copy link
Member Author

all 💚 again
In order to remove the somewhat duplicated CHECKTIMEOUT (and use TIMEOUT instead), we had to set a super long -timeout for the integration tests.
This is because there is no way to disable go's built-in test timeout, which defaults to calling SIGQUIT after 10mins (when -timeout is not set)

@@ -250,6 +248,7 @@ test_env() {
DOCKER_REMAP_ROOT="$DOCKER_REMAP_ROOT" \
DOCKER_REMOTE_DAEMON="$DOCKER_REMOTE_DAEMON" \
GOPATH="$GOPATH" \
GOTRACEBACK=all \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added so that the panics that go-check produces give a full goroutine dump, otherwise the trace is useless since it's just a trace of the main go-check code, not the timed-out test code.

@tianon
Copy link
Member

tianon commented Mar 11, 2016

LGTM

1 similar comment
@tiborvass
Copy link
Contributor

LGTM

tiborvass added a commit that referenced this pull request Mar 12, 2016
@tiborvass tiborvass merged commit c73f2c9 into moby:master Mar 12, 2016
@cpuguy83 cpuguy83 deleted the use_forked_gocheck branch March 12, 2016 01:58
@thaJeztah
Copy link
Member

🎉 thanks @cpuguy83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.