Daniel Oliveira created BEAM-11918:
--------------------------------------
Summary: :sdks:go:goTest gradle target flakes when run in parallel
with other build targets
Key: BEAM-11918
URL: https://issues.apache.org/jira/browse/BEAM-11918
Project: Beam
Issue Type: Bug
Components: sdk-go
Reporter: Daniel Oliveira
Running the gradle command :sdks:go:goTest simultaneously with some other
commands causes it to sometimes fail with the following error. This appears to
be some race condition, most likely related to vendoring, and probably due to
building some of the Go SDK gradle submodules (like :sdks:go:test and
:sdks:go:examples).
{noformat}
15:09:36 Result of package
github.com/apache/beam/sdks/go/test/integration/xlang:
15:09:36
15:09:36 unexpected directory layout:
15:09:36 import path:
github.com/apache/beam/sdks/go/pkg/beam/runners/dataflow
15:09:36 root:
/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Go_Phrase/src/sdks/go/.gogradle/project_gopath/src
15:09:36 dir:
/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Go_Phrase/src/sdks/go/.gogradle/project_gopath/src/github.com/apache/beam/sdks/go/test/vendor/github.com/apache/beam/sdks/go/pkg/beam/runners/dataflow
15:09:36 expand root:
/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Go_Phrase/src/sdks/go/.gogradle/project_gopath/src
15:09:36 expand dir:
/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Go_Phrase/src/sdks/go/test/vendor/github.com/apache/beam/sdks/go/pkg/beam/runners/dataflow
15:09:36 separator: /
{noformat}
For further reference, the Go Precommit gradle task that causes this looks as
follows:
{code}
task("goPreCommit") {
dependsOn(":sdks:go:goBuild")
dependsOn(":sdks:go:goTest")
dependsOn(":sdks:go:examples:goBuild")
dependsOn(":sdks:go:test:goBuild")
// Ensure all container Go boot code builds as well.
dependsOn(":sdks:java:container:goBuild")
dependsOn(":sdks:python:container:goBuild")
dependsOn(":sdks:go:container:goBuild")
}
{code}
This can be circumvented by executing the goTest command separately from the
building so they don't get executed in parallel, but since the root cause
wasn't diagnosed, similar issues might continue to pop up.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)