Helm-operator: `go get github.com/fluxcd/helm-operator` fails

Created on 21 Mar 2020  路  3Comments  路  Source: fluxcd/helm-operator

Describe the bug
go get fails with go 1.13

To Reproduce

go get github.com/fluxcd/helm-operator
go: github.com/fluxcd/helm-operator upgrade => v1.0.0-rc9
go get: github.com/fluxcd/[email protected] requires
    github.com/fluxcd/helm-operator/pkg/[email protected]: invalid version: unknown revision 000000000000

Expected behavior

Module is installed

wontfix

Most helpful comment

I got below replace in my go.mod, you can give it a try

replace (
    github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d
    github.com/docker/docker => github.com/moby/moby v1.4.2-0.20200203170920-46ec8731fbce
    github.com/fluxcd/flux => github.com/fluxcd/flux v1.19.0
    github.com/fluxcd/flux/pkg/install => github.com/fluxcd/flux/pkg/install v0.0.0-20200402061723-01a239a69319
    github.com/fluxcd/helm-operator/pkg/install => github.com/fluxcd/helm-operator/pkg/install v0.0.0-20200407140510-8d71b0072a3e
)

All 3 comments

This is due to a circular dependency with github.com/fluxcd/flux due to re-using the git and resource packages from there, while Flux also depends on a version of fluxcd/helm-operator (all of this mostly due to the Helm operator originating from a monolith).

The solution (for now) is to force overwrite the version using a replace:

# go.mod
replace github.com/fluxcd/helm-operator => github.com/fluxcd/helm-operator v1.0.0-rc9

This doesn't seem to fix it for me - I still get the same error with the replace line in my go.mod file.

I got below replace in my go.mod, you can give it a try

replace (
    github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d
    github.com/docker/docker => github.com/moby/moby v1.4.2-0.20200203170920-46ec8731fbce
    github.com/fluxcd/flux => github.com/fluxcd/flux v1.19.0
    github.com/fluxcd/flux/pkg/install => github.com/fluxcd/flux/pkg/install v0.0.0-20200402061723-01a239a69319
    github.com/fluxcd/helm-operator/pkg/install => github.com/fluxcd/helm-operator/pkg/install v0.0.0-20200407140510-8d71b0072a3e
)
Was this page helpful?
0 / 5 - 0 ratings