Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package v2.5.2+incompatible and Kubernetes 1.18 #2962

Closed
jsenon opened this issue May 6, 2020 · 11 comments
Closed

Package v2.5.2+incompatible and Kubernetes 1.18 #2962

jsenon opened this issue May 6, 2020 · 11 comments

Comments

@jsenon
Copy link

jsenon commented May 6, 2020

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/argo@v2.5.2+incompatible/pkg/apis/workflow/v1alpha1?tab=doc

@jsenon jsenon added the question label May 6, 2020
@alexec
Copy link
Contributor

alexec commented May 6, 2020

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

@jsenon
Copy link
Author

jsenon commented May 6, 2020

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 #2602

@jsenon
Copy link
Author

jsenon commented May 6, 2020

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

@yoichiwo7
Copy link

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

@jsenon
Copy link
Author

jsenon commented May 25, 2020

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.

@yoichiwo7
Copy link

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.

@alexec
Copy link
Contributor

alexec commented May 26, 2020

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?

@yoichiwo7
Copy link

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

@stale
Copy link

stale bot commented Jul 25, 2020

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.

@stale stale bot added the wontfix label Jul 25, 2020
@stale stale bot closed this as completed Aug 1, 2020
@iven
Copy link
Contributor

iven commented Oct 19, 2020

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

../go/pkg/mod/github.com/argoproj/argo@v0.0.0-20201015222631-076bf89c4658/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.

@shahadarsh
Copy link

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

shahadarsh added a commit to cloudknit-io/cloudknit that referenced this issue Nov 2, 2020
shahadarsh added a commit to cloudknit-io/cloudknit that referenced this issue Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants