Skip to content

Creating a Docker image using a go_binary artifact causes a CycleException #21131

@agoblet

Description

@agoblet

Describe the bug
In the past there were cyclic dependency issues when packaging a go_binary (#17236). This issue has been resolved now. But a similar problem is shown when using a docker_image target.

When COPYing a go_binary artifact into a docker_image, and running pants package, it will detect a cyclic dependency in some cases. This is highlighted in a minimal example in this repository: https://github.com/agoblet/pants-go-cyclic-dependency

I think that the problem is that the issue linked above works around the cyclic dependency. On a Pants-level, this cyclic dependency is still there, and the packaging of a docker_image does not know how to work around it.

Pants version
2.21.0

OS
MacOS (M3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions