-
Notifications
You must be signed in to change notification settings - Fork 705
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
Fetch Argo workflow logs #1332
Fetch Argo workflow logs #1332
Conversation
return string(output), nil | ||
} | ||
|
||
func getPodLogs(podName string) (string, error) { |
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.
kubectl logs
would fetch all the logs, please add a TODO comment here to implement fetch logs by an incremental way.
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.
Sure, I will add this in the next PR.
@@ -163,6 +164,16 @@ func writeArgoFile(coulerFileName string) (string, error) { | |||
return argoYaml.Name(), nil | |||
} | |||
|
|||
func getWorkflowID(output string) (string, error) { |
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.
Duplicated with workflow.go
#getWorkflowID ?
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.
Yes, I will move workflow related code to package workflow
in the next PR.
} | ||
|
||
func getWorkflowStatusPhase(job pb.Job) (string, error) { | ||
cmd := exec.Command("kubectl", "get", "wf", job.Id, "-o", "jsonpath={.status.phase}") |
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.
can we use https://github.com/kubernetes/client-go instead of calling the command line?
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.
What is the advantage of using the client-go
? I am not sure if the client-go
supports parsing the Argo workflow descriptions, so I may need to spend some time to test it out.
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.
I created an issue: #1362 to discuss go-client or kubectl, maybe we can move to make some disccusion.
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.
LGTM
Part of #1066.
Next step: