-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
update persistent agence to only store the argo spec #1634
Conversation
Currently when persisting the runs spawned from a job, PersistentAgent stores more information than needed into the pipeline manifest, and also miss the TypeMetadata. This resulted in storing lots of runtime information that's not needed. Example WorkflowSpec ``` "metadata":{ "name":"fffpw4fh-2-2911767673", "namespace":"kubeflow", "selfLink":"/apis/argoproj.io/v1alpha1/namespaces/kubeflow/workflows/fffpw4fh-2-2911767673", "uid":"de23bd5c-a8c1-11e9-a176-42010a800233", "resourceVersion":"3975687", "generation":1, "creationTimestamp":"2019-07-17T18:37:02Z", "labels":{ "scheduledworkflows.kubeflow.org/isOwnedByScheduledWorkflow":"true", "scheduledworkflows.kubeflow.org/scheduledWorkflowName":"fffpw4fh", "scheduledworkflows.kubeflow.org/workflowEpoch":"1563388612", "scheduledworkflows.kubeflow.org/workflowIndex":"2", "workflows.argoproj.io/phase":"Running" }, "ownerReferences":[ { "apiVersion":"kubeflow.org/v1beta1", "kind":"ScheduledWorkflow", "name":"fffpw4fh", "uid":"91039a28-a8c1-11e9-a176-42010a800233", "controller":true, "blockOwnerDeletion":true } ] }, ```
/assign @rileyjbauer |
backend/src/common/util/workflow.go
Outdated
@@ -162,9 +162,11 @@ func (w *Workflow) HasScheduledWorkflowAsParent() bool { | |||
} | |||
|
|||
func (w *Workflow) GetSpec() *Workflow { |
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 you rename this function as well, since it's returning the whole workflow, not just the spec
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. hopefully getworkflowspec can reduce the confusion.
spec := w.DeepCopy() | ||
spec.Status = workflowapi.WorkflowStatus{} | ||
return NewWorkflow(spec) | ||
func (w *Workflow) GetWorkflowSpec() *Workflow { |
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.
You need to update the references to this in resource_manager.go
and resource_manager_test.go
Thanks for this! |
/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 |
Currently when persisting the runs spawned from a job, PersistentAgent stores more information than needed into the pipeline manifest, and also miss the TypeMetadata. This resulted in storing lots of runtime information that's not needed.
Example WorkflowSpec
This change is