Skip to content
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

fix: add workflow template level pod annotations and labels to template. Fixes: #12945 #12987

Merged
merged 5 commits into from
Jan 6, 2025

Conversation

shuangkun
Copy link
Member

@shuangkun shuangkun commented Apr 27, 2024

Fixes #12945

Motivation

add workflow template level pod annotations and labels to template

Modifications

Verification

Local test.

@shuangkun shuangkun marked this pull request as draft April 27, 2024 17:16
@shuangkun shuangkun marked this pull request as ready for review May 16, 2024 08:24
@tczhao tczhao self-assigned this Jun 27, 2024
Copy link
Member

@tczhao tczhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to have test with this change

Comment on lines 141 to 156
// add workflow template level pod annotations and labels to template
podMetadata := wftmpl.GetPodMetadata()
if podMetadata != nil {
if template.Metadata.Annotations == nil {
template.Metadata.Annotations = make(map[string]string)
}
for k, v := range podMetadata.Annotations {
template.Metadata.Annotations[k] = v
}
if template.Metadata.Labels == nil {
template.Metadata.Labels = make(map[string]string)
}
for k, v := range podMetadata.Labels {
template.Metadata.Labels[k] = v
}
}
Copy link
Member

@tczhao tczhao Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good but I think GetTemplateByName need to have these as well

so that if the template in clusterWorkflowTemplate is a dag template, the podMetadata still applies

@shuangkun
Copy link
Member Author

add a ut.

@shuangkun shuangkun requested a review from tczhao January 5, 2025 16:23
@shuangkun
Copy link
Member Author

/retest

1 similar comment
@shuangkun
Copy link
Member Author

/retest

@MasonM
Copy link
Contributor

MasonM commented Jan 6, 2025

@shuangkun The E2E tests are broken due to a bug in Kit. I have a fix for it in #14048. Could you please review that PR?

@shuangkun
Copy link
Member Author

@shuangkun The E2E tests are broken due to a bug in Kit. I have a fix for it in #14048. Could you please review that PR?

Thanks, I was wondering why this test case keeps failing

@tczhao tczhao enabled auto-merge (squash) January 6, 2025 21:19
@tczhao tczhao merged commit 2719e06 into argoproj:main Jan 6, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WorkflowTemplate podMetadata not working
3 participants