You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Kenneth Knowles (Jira)" <ji...@apache.org> on 2021/05/15 17:56:02 UTC

[jira] [Updated] (BEAM-5465) Have the sdks/go gradle tasks clean up the vendor directories on clean

     [ https://issues.apache.org/jira/browse/BEAM-5465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kenneth Knowles updated BEAM-5465:
----------------------------------
    Resolution: Fixed
        Status: Resolved  (was: Resolved)

Hello! Due to a bug in our Jira configuration, this issue had status:Resolved but resolution:Unresolved.

I am bulk editing these issues to have resolution:Fixed

If a different resolution is appropriate, please change it. To do this, click the "Resolve" button (you can do this even for closed issues) and set the Resolution field to the right value.

> Have the sdks/go gradle tasks clean up the vendor directories on clean
> ----------------------------------------------------------------------
>
>                 Key: BEAM-5465
>                 URL: https://issues.apache.org/jira/browse/BEAM-5465
>             Project: Beam
>          Issue Type: Bug
>          Components: build-system, sdk-go
>            Reporter: Robert Burke
>            Assignee: Kamil Wasilewski
>            Priority: P3
>             Fix For: Not applicable
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> The sdks/go/\{test,examples,container} directories depend on the main beam package, which cause gogradle to vendor the beam package in those directories.
>  
> The gogradle plugin doesn't clean up the [vendor directories|https://golang.org/cmd/go/#hdr-Vendor_Directories] that it sets up on builds, when clean is invoked.
>  
> This leads to stale copies of the Go SDK's beam package vendored in local directories, which can lead to build failures of other tasks that invoke the tests or similar, when the code in those directories uses a more recent version of beam than what is cached.
>  
> This doesn't happen for users directly using the go tool, with their git repo nested under Go PATH, since the go tool will correctly use the local repo copy of beam.
>  
> A workaround on a Unix machine or similar, invoked from the beam repo root, is to delete the vendor and gogradle directories, and retry the task.
>  
> rm -rf sdks/go/\{vendor,.gogradle} sdks/go/\{test,examples,container}/\{vendor,.gogradle}
>  
> This cause gogradle to fetch a more recent copy of beam for vendoring.
>  
> Ideally we fix the clean tasks for the go directories to delete the vendor directories as well, which will resolve the issue more reliably for those using gradle to test their changes against the go sdk.
> Related: BEAM-5379 is for avoiding the vendoring & cleaning cycle all together and migrating to gomodules.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)