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
feat: Append previous workflow name as label to resubmitted workflow #3261
Conversation
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 change, then this should be good to merge. Thanks!
workflow/util/util.go
Outdated
const letters = "abcdefghijklmnopqrstuvwxyz0123456789" | ||
const ( | ||
letters = "abcdefghijklmnopqrstuvwxyz0123456789" | ||
previousWorkflowNameLabelKey = "workflows.argoproj.io/previous-workflow-name" |
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 should be added in https://github.com/argoproj/argo/blob/master/workflow/common/common.go
Also I would suggest this be called
previousWorkflowNameLabelKey = "workflows.argoproj.io/previous-workflow-name" | |
previousWorkflowNameLabelKey = "workflows.argoproj.io/resubmitted-from-workflow" |
if newWF.ObjectMeta.Labels == nil { | ||
newWF.ObjectMeta.Labels = make(map[string]string) | ||
} |
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.
Huh, wonder why this didn't come up as an issue before
workflow/util/util.go
Outdated
newWF.ObjectMeta.Labels[key] = val | ||
} | ||
// Append an additional label so it's easy for user to see the | ||
// name of the original workflow that has been resubmitted. | ||
newWF.ObjectMeta.Labels[previousWorkflowNameLabelKey] = wf.ObjectMeta.Name |
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.
👍
@simster7 Thanks for the review! Just updated the PR to address your comments. |
Append an additional label so it's easy for user to see the name of the original workflow that has been resubmitted.
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.