Argo: Package v2.5.2+incompatible and Kubernetes 1.18

Created on 6 May 2020  路  11Comments  路  Source: argoproj/argo

Summary

Compatibility with Kubernetes 1.18

Motivation

It seems that the package v2.5.2+incompatible is not compatible with new version of Kubernetes 1.18 and the new context.Context. Do you have plan to update your package for Kubernetes 1.18 ?

For example in this package: https://pkg.go.dev/github.com/argoproj/[email protected]+incompatible/pkg/apis/workflow/v1alpha1?tab=doc

help wanted question wontfix

All 11 comments

We do not support v2.5 anymore. Please try with the stable version - v2.7.

Are you talking about golang package? Seems that version 2.7 is not published, the latest version on godoc is 2.5.2 https://pkg.go.dev/github.com/argoproj/argo?tab=versions

link to https://github.com/argoproj/argo/issues/2602

If we force module with:

go get github.com/argoproj/argo@master

I've still have issue with kubernetes client 1.18 and the context

This is because argo-workflow after v2.5.2 moved to go module.
Go module with major version 2 or higher needs version suffix like /v2 in go.mod:

module github.com/argoproj/argo/v2

Following StackOverflow answer summarizes this topic well.
https://stackoverflow.com/a/57372286

Until argo-workflow supports this module version scheme, you can use matching commit hash in go get command. For example if you want to use argo-workflow v2.8.0 module, you can do it by following command. You can check matching commit hash in releases/tags page.

go get github.com/argoproj/argo@8f696174746ed01b9bf1941ad03da62d312df641

Thanks @yoichiwo7 but I don't know if argo has been updated in order to be compatible with Kubernetes 1.18 and the context.
And also don't understand why the go doc is not updated as well.

I think the answer is no.
argo-workflow v2.8.0 uses cleint-go: release-12.0 module which is based on Kubernetes v1.15. And it still uses golang.org/x/net/context.
By the way, I'm curious what kind of problem you are facing. I think putting use-cases and errors might be helpful to solve the issue.

As for go doc, it's not updated because the current argo-workflow doesn't follow valid go module version scheme; which I mentioned above. If argo-workflow fixes this, the go doc will also be updated again.

See #2611

We could do with some help on fixing this - @jsenon or @yoichiwo7 would you like to help with fixing the go.mod problem?

@alexec
Yes, I would like to help with it.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I've also meet an error with kubernetes client 1.18 and the context:

../go/pkg/mod/github.com/argoproj/[email protected]/pkg/client/clientset/versioned/typed/workflow/v1alpha1/cronworkflow.go:74:5: not enough arguments in call to c.client.Get().Namespace(c.ns).Resource("cronworkflows"
).VersionedParams(&opts, scheme.ParameterCodec).Timeout(timeout).Do
        have ()
        want (context.Context)

It seems argo depends on controller-tools v0.3.0, which depends client-go v0.18.2, which is conflicted with argo's dependency client-go v0.17.8.

The workaround I found is(put this in your go.mod):

replace sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.2.9

Hope it helps.

Hey folks, I'm getting the same error.

@iven I tried your workaround but it didn't work. I also tried the following without any luck. Any help would be appreciated.

go get github.com/argoproj/argo@8f696174746ed01b9bf1941ad03da62d312df641

Was this page helpful?
0 / 5 - 0 ratings