Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-11918

:sdks:go:goTest gradle target flakes when run in parallel with other build targets

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Abandoned
    • None
    • Missing
    • sdk-go
    • None

    Description

      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).

      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: /
      

      For further reference, the Go Precommit gradle task that causes this looks as follows:

      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")
      }
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            danoliveira Daniel Oliveira
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: