Bug 1071063 - golang: tests fail to build on random packages intermittently with errors about missing stdlib
golang: tests fail to build on random packages intermittently with errors abo...
Status: RESOLVED INVALID
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Containers
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: Aleksa Sarai
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-04 14:12 UTC by Aleksa Sarai
Modified: 2018-06-04 09:06 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksa Sarai 2017-12-04 14:12:50 UTC
This one is quite odd (and I'm 95% sure it's a compiler bug). We've been seeing this a lot in the Docker %check script (where we run a subset of the upstream unit tests). Effectively this looks something like this:

% go test $some_pkg # works
% go test $other_pkgs... $some_pkg # $some_pkg fails to build
% go test $other_pkgs... $more_pkgs... $some_pkg # works

For a recent SR[1] we hit this quite weirdly. The example is:

% go test github.com/docker/docker/daemon/cluster/executor/container $other_pkgs
# github.com/docker/docker/vendor/github.com/Graylog2/go-gelf/gelf
home/abuild/go/src/github.com/docker/docker/vendor/github.com/Graylog2/go-gelf/gelf/reader.go:10: can't find import: "compress/zlib"
FAIL    github.com/docker/docker/daemon/cluster/executor/container [build failed]
% go test github.com/docker/docker/daemon/cluster/executor/container github.com/docker/docker/daemon/logger/... $other_pkgs
ok      github.com/docker/docker/daemon/cluster/executor/container      3.026s  coverage: 7.9% of statements

This matters because we want to drop github.com/docker/docker/daemon/logger/..., but dropping it starts to break unrelated tests. Ideally we should be able to create a reproducer that isn't related to Docker.

[1]: https://build.opensuse.org/request/show/548067
Comment 1 Aleksa Sarai 2017-12-04 15:26:22 UTC
Weirdly it looks like this happens whenever you combine _any_ package with github.com/docker/docker/daemon/cluster/executor/container. So this also fails:

% go test github.com/docker/docker/builder github.com/docker/docker/daemon/cluster/executor/container

Even though github.com/docker/docker/builder has no test files.
Comment 2 Aleksa Sarai 2017-12-04 15:40:14 UTC
Alright, so this works:

% go test github.com/docker/docker/builder github.com/docker/docker/daemon/cluster/executor/container github.com/docker/docker/daemon/logger/gelf

But if we replace github.com/docker/docker/daemon/logger/gelf with anything else, it breaks. Now to come up with a non-Docker reproducer...
Comment 3 Aleksa Sarai 2018-06-04 09:06:46 UTC
I wasn't able to find a reproducer for this, and we're going to be dropping the %check scripts anyway. Closing as invalid.