-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Garbage collect the completed workflow after persisted to database #1802
Conversation
/assign @hongye-sun |
/test kubeflow-pipeline-e2e-test |
@@ -122,4 +124,5 @@ func init() { | |||
flag.StringVar(&mlPipelineAPIServerBasePath, mlPipelineAPIServerBasePathFlagName, | |||
"/apis/v1beta1", "The base path for the ML pipeline API server.") | |||
flag.StringVar(&namespace, namespaceFlagName, "", "The namespace name used for Kubernetes informers to obtain the listers.") | |||
flag.Int64Var(&ttlSecondsAfterWorkflowFinish, ttlSecondsAfterWorkflowFinishFlagName, 3600, "The TTL for Argo workflow to persist after workflow finish.") |
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.
Do you think we should make it to longer like 7 days to not cause surprise to existing users?
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.
done
/test kubeflow-pipeline-e2e-test |
|
||
// IsInFinalState whether the workflow is in a final state. | ||
func (w *Workflow) IsInFinalState() bool { | ||
if w.Status.Phase == workflowapi.NodeSucceeded || w.Status.Phase == workflowapi.NodeFailed { |
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 think you also need add Skip state here.
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.
And Error state
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.
discussed offline for now we only treat succeeded or failed workflow as final.
if _, ok :=w.GetLabels()[LabelKeyWorkflowPersistedFinalState]; ok { | ||
// If the label exist, workflow final state has being persisted. | ||
return true | ||
} |
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.
nit:
_, ok = w.GetLabels()[LabelKeyWorkflowPersistedFinalState]
return ok
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: IronPan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Verified the travis tests passed. only coverall failed. |
execuse, i use 0.6.2 branch persistent agent image, Garbage collection funtion works immediately, it will not wait 7 days. so is I lacking any config ? |
fix #1706
with this change this issue seems no longer relevent #1708
This change is