-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Argo Client does not work with newer k8s client versions (>=v0.21.0) #6750
Comments
EDIT: I tried with the master branch version of argo. This fixes the exec.GetAuthenticator error above, but raises a bunch of other issues on running
|
@alexec I tried using the master branch version but this is still a problem with the latest k8s client versions. |
I too am seeing the exact same error, any luck on identifying root cause or better context on what is happening @alexec ? |
please can you compare your go.mod file and list differences |
@alexec Compare go.mod file with what? Anyways, here's the go.mod file that I am using for my project:
|
try removing everything but argo-workflows, then run |
I think this works!
No longer see those compatibility errors. Many thanks, @alexec! |
Now that I think about it, even using argo-wf v0.3.12 and following the process above would have worked, except that it would use k8s client v0.19.6 :) |
This doesn't work for me, tried with latest version of argo-workflows and the above version also, in both cases I am getting some weird # github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1
../../go/pkg/mod/github.com/argoproj/argo-workflows/v3@v3.2.0-rc3.0.20210916144414-7684ef4a0c5f/pkg/apis/workflow/v1alpha1/openapi_generated.go:139:3: cannot use "github.com/go-openapi/spec".Schema{...} (type "github.com/go-openapi/spec".Schema) as type "k8s.io/kube-openapi/pkg/validation/spec".Schema in field value
../../go/pkg/mod/github.com/argoproj/argo-workflows/v3@v3.2.0-rc3.0.20210916144414-7684ef4a0c5f/pkg/apis/workflow/v1alpha1/openapi_generated.go:151:3: cannot use "github.com/go-openapi/spec".Schema{...} (type "github.com/go-openapi/spec".Schema) as type "k8s.io/kube-openapi/pkg/validation/spec".Schema in field value
../../go/pkg/mod/github.com/argoproj/argo-workflows/v3@v3.2.0-rc3.0.20210916144414-7684ef4a0c5f/pkg/apis/workflow/v1alpha1/openapi_generated.go:158:8: cannot use ref("github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1.Tar...) (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../go/pkg/mod/github.com/argoproj/argo-workflows/v3@v3.2.0-rc3.0.20210916144414-7684ef4a0c5f/pkg/apis/workflow/v1alpha1/openapi_generated.go:163:8: cannot use ref("github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1.Non...) (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../go/pkg/mod/github.com/argoproj/argo-workflows/v3@v3.2.0-rc3.0.20210916144414-7684ef4a0c5f/pkg/apis/workflow/v1alpha1/openapi_generated.go:168:8: cannot use ref("github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1.Zip...) (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../go/pkg/mod/github.com/argoproj/argo-workflows/v3@v3.2.0-rc3.0.20210916144414-7684ef4a0c5f/pkg/apis/workflow/v1alpha1/openapi_generated.go:181:3: cannot use "github.com/go-openapi/spec".Schema{...} (type "github.com/go-openapi/spec".Schema) as type "k8s.io/kube-openapi/pkg/validation/spec".Schema in field value
../../go/pkg/mod/github.com/argoproj/argo-workflows/v3@v3.2.0-rc3.0.20210916144414-7684ef4a0c5f/pkg/apis/workflow/v1alpha1/openapi_generated.go:200:11: cannot use ref("github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1.Par...) (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../go/pkg/mod/github.com/argoproj/argo-workflows/v3@v3.2.0-rc3.0.20210916144414-7684ef4a0c5f/pkg/apis/workflow/v1alpha1/openapi_generated.go:220:11: cannot use ref("github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1.Art...) (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../go/pkg/mod/github.com/argoproj/argo-workflows/v3@v3.2.0-rc3.0.20210916144414-7684ef4a0c5f/pkg/apis/workflow/v1alpha1/openapi_generated.go:280:8: cannot use ref("github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1.S3A...) (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../go/pkg/mod/github.com/argoproj/argo-workflows/v3@v3.2.0-rc3.0.20210916144414-7684ef4a0c5f/pkg/apis/workflow/v1alpha1/openapi_generated.go:286:8: cannot use ref("github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1.Git...) (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../go/pkg/mod/github.com/argoproj/argo-workflows/v3@v3.2.0-rc3.0.20210916144414-7684ef4a0c5f/pkg/apis/workflow/v1alpha1/openapi_generated.go:286:8: too many errors Here's the module example.com/myproject
go 1.16
require (
github.com/ReneKroon/ttlcache/v2 v2.8.1
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
github.com/argoproj/argo-workflows/v3 v3.2.0
github.com/aws/aws-sdk-go v1.37.1
github.com/bradleyfalzon/ghinstallation v1.1.1
github.com/gin-gonic/autotls v0.0.3
github.com/gin-gonic/gin v1.7.4
github.com/go-ini/ini v1.63.2
github.com/go-redis/redis/v8 v8.11.4
github.com/go-resty/resty/v2 v2.3.0
github.com/gofrs/flock v0.8.1
github.com/google/go-github/v35 v35.3.0
github.com/google/uuid v1.2.0
github.com/goombaio/namegenerator v0.0.0-20181006234301-989e774b106e
github.com/gorilla/websocket v1.4.2
github.com/jinzhu/copier v0.3.2
github.com/jinzhu/gorm v1.9.16
github.com/joeshaw/envdecode v0.0.0-20200121155833-099f1fc765bd
github.com/joho/godotenv v1.3.0
github.com/lestrrat-go/jwx v1.2.7
github.com/logrusorgru/aurora/v3 v3.0.0
github.com/manifoldco/promptui v0.8.0
github.com/pieterclaerhout/go-log v1.14.0
github.com/spf13/cobra v1.2.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.8.1
github.com/swaggo/gin-swagger v1.3.2
github.com/swaggo/swag v1.7.3
github.com/tidwall/pretty v1.1.0
github.com/walle/targz v0.0.0-20140417120357-57fe4206da5a
go.uber.org/zap v1.17.0
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
gorm.io/driver/postgres v1.1.2
gorm.io/gorm v1.21.16
helm.sh/helm/v3 v3.7.1
k8s.io/api v0.22.2
k8s.io/apimachinery v0.22.2
k8s.io/cli-runtime v0.22.2
k8s.io/client-go v0.22.2
sigs.k8s.io/aws-iam-authenticator v0.5.3
sigs.k8s.io/yaml v1.2.0
) Code snippet that uses argo-workflows. func CreateWorkflow() {
y := v1alpha1.Workflow{Spec: v1alpha1.WorkflowSpec{
ServiceAccountName: "hello",
}}
} |
A possible hack for the desperate: I had the same errors as the above comment (
Only applicable if you're willing to |
Maybe we also need to update the code that does open API? |
This hack works for me. Thank you @ljmatkins |
I think our openapi library needs updating. Would anyone be interested in making the update? @ljmatkins @PrashantRaj18198 |
@SVilgelm are you using the latest v3.2.x CLI? |
@sarabala1979 I'm trying to update, but got same error:
|
|
Signed-off-by: Alex Collins <alex_collins@intuit.com>
Signed-off-by: J.P. Zivalich <jp@pipekit.io>
The PR is blocked on Argo Events PR. I'm waiting for @whynowy to review that PR, because I could not figure out how to get it to work nicely. Hoped he'd be able to bring new ideas to it. |
Sounds good. I put up a PR on events to give it a stab based off what I saw you do in your events PR: argoproj/argo-events#1640 |
Ugh. This is a massive tangel of dependiencies. |
Summary
I am using the go-client for argo and here's how I defined it:
My go.mod file:
What happened/what you expected to happen?
I need to use k8s go client version >= v0.21.0 but it seems the latest argo client is incompatible with the newer k8s versions. So
Running
go vet ./...
gives an error:Clearly, the exec.GetAuthenticator function requires two arguments in the newer k8s client versions. Can a bug fix be released for this purpose? Alternately, how should I define my apiClient to be compatible with the latest k8s client? Would appreciate any pointers!
Diagnostics
What Kubernetes provider are you using?
Terraform
What version of Argo Workflows are you running?
v0.3.12
What executor are you running? Docker/K8SAPI/Kubelet/PNS/Emissary
Docker
Did this work in a previous version? I.e. is it a regression?
No
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
The text was updated successfully, but these errors were encountered: