-
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
refactor: upgrade kube client version to v0.19.6. Fixes #4425, #4791 #4810
Conversation
2958ab1
to
d41ea06
Compare
Are you using the same version of swagger as argo currently uses @JPZ13 ? Seems like the definition don't follow version 2. |
@NikeNano I installed it using the
|
hmm looks strange with:
maybe if you try to install version 2.X. Since the error for
but I don't know these things ..... so guess we have to wait for @alexec to get feedback on this. |
|
@alexec Sounds good. I switched the dependencies to match Argo events. To fix the test-cli error, I think we have to upgrade the k8s dependencies here. That will fix klog. Should I skip those in the meantime and make the update to the argoproj/pkg repo? I still can't get codegen to fix despite doing what you suggested. Feel free to pull this branch, make a commit running Also, happy new year. I'm game to pause on this and resume on the 4th if you're taking some time to relax. |
Looks good. I'll ask Derek to review as he did the work for Argo Events. You need to make these changes: test-e2eTestGLogLevels is failiing. I would say change Instead, change import (
"github.com/argoproj/pkg/cli"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
// INSERT THIS IMPORT:
"k8s.io/klog/v2"
...
command.PersistentPreRun = func(cmd *cobra.Command, args []string) {
if verbose {
logLevel = "debug"
glogLevel = 6
}
cli.SetLogLevel(logLevel)
// INSERT THIS LINE:
klog.InitFlags(nil)
// END
cli.SetGLogLevel(glogLevel)
log.WithField("version", argo.GetVersion()).Debug("CLI version")
} codegenThis is failing Swagger validation. I don't think the My first hypothesis - the underlying problem is because If that does not fix this issue (or reveal the underlying cause), I'd like to know how the swagger.json has change. Insert
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment.
3e484bd
to
3801ba3
Compare
Thanks for the review @alexec. I deleted the lines in the
|
You have a panic in your tests:
|
can you try this? If that does not fix this issue (or reveal the underlying cause), I'd like to know how the swagger.json has change. Insert git diff before swagger validate in the Makefile;
|
4e85dde
to
df4ce8e
Compare
I look like you need to change your Makefile line 134 to: -I ${GOPATH}/pkg/mod/github.com/grpc-ecosystem/grpc-gateway@v1.16.0/third_party/googleapis \ |
I'm pretty stuck @alexec. Here's what I've tried so far:
I've also placed a |
Signed-off-by: J.P. Zivalich <j.p.zivalich@gmail.com>
All good! |
util/cmd/cmd.go
Outdated
"strings" | ||
|
||
log "github.com/sirupsen/logrus" | ||
"github.com/spf13/cobra" | ||
"k8s.io/klog" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong klog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is why tests are failing again I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah my bad on that - pushing the commit now
util/cmd/cmd.go
Outdated
// SetGLogLevel set the glog level for the k8s go-client | ||
// this is taken from argoproj/pkg but uses v2 of klog here | ||
// to be compatible with k8s clients v0.19.x and above | ||
func SetGLogLevel(glogLevel int) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor - could go into own file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good - i'll scoot it into a separate file real quick
Signed-off-by: J.P. Zivalich <j.p.zivalich@gmail.com>
Signed-off-by: J.P. Zivalich <j.p.zivalich@gmail.com>
Signed-off-by: J.P. Zivalich <j.p.zivalich@gmail.com>
This is ready to merge, I think we now need to get v1.2 of Argo Events released so that we can import it on the |
Will take a look today just for a sanity check :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing all this work! My main question is whether we should consider saving the context on the structs instead of passing it down function signatures.
@@ -267,7 +268,7 @@ func (woc *wfOperationCtx) executeStepGroup(stepGroup []wfv1.WorkflowStep, sgNod | |||
if !childNode.Fulfilled() { | |||
completed = false | |||
} else if childNode.Completed() { | |||
hasOnExitNode, onExitNode, err := woc.runOnExitNode(step.OnExit, step.Name, childNode.Name, stepsCtx.boundaryID, stepsCtx.tmplCtx) | |||
hasOnExitNode, onExitNode, err := woc.runOnExitNode(ctx, step.OnExit, step.Name, childNode.Name, stepsCtx.boundaryID, stepsCtx.tmplCtx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, for example
workflow/cron/controller.go
Outdated
@@ -229,25 +230,26 @@ func (cc *Controller) syncAll() { | |||
continue | |||
} | |||
|
|||
err = cc.syncCronWorkflow(cronWf, groupedWorkflows[cronWf.UID]) | |||
ctx := context.Background() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we using background here? I understand that the way syncAll
gets called makes it so you can't pass parameters, but it would still be possible to pass it in using a higher-level function definition.
Maybe we should also add a cc.ctx
or at least use a high-level def
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one might just be a typo where I didn't see that ctx
is declared in the function signature. I'll remove line 233 here
Thanks @simster7. I appreciate it. I'll make the changes you mentioned in the inline issues tomorrow |
Signed-off-by: J.P. Zivalich <j.p.zivalich@gmail.com>
Signed-off-by: J.P. Zivalich <j.p.zivalich@gmail.com>
The most recent commit addresses your line-item changes @simster7. Let me know if it all looks good |
@simster7 do you want to review again? I'm happy to merge. |
@alexec good to merge |
Next step after this is to change |
Checklist:
Running e2e tests here because my machine times out before completion
This PR: