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

Fixed an issue where only the last PodTemplateFilter would be applied #521

Merged
merged 1 commit into from
Jun 27, 2019

Conversation

Vlatombe
Copy link
Member

Looks like I missed it when I initially introduced the extension point in #288

@Vlatombe Vlatombe requested review from carlossg and jglick June 27, 2019 00:53
@richbg
Copy link
Contributor

richbg commented Jun 27, 2019

@Vlatombe are there any reported Jira issues we can mark fixed pending this PR?

@Vlatombe
Copy link
Member Author

There is no bug for this, it is preventing me from implementing a new PodTemplateFilter.

@@ -33,9 +33,9 @@
public static List<PodTemplate> applyAll(@Nonnull KubernetesCloud cloud, @Nonnull List<PodTemplate> podTemplates, @CheckForNull Label label) {
List<PodTemplate> result = new ArrayList<>();
for (PodTemplate t : podTemplates) {
PodTemplate output = null;
Copy link
Member

Choose a reason for hiding this comment

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

Note that this changes behavior in the case that there are no filters. Previously, this function would return an empty list, which makes little sense; now it will return (a copy of) podTemplates unchanged, as you would expect. I suppose that bug was not previously noticed because PodTemplateLabelFilter is always registered.

@Vlatombe Vlatombe merged commit f78e96e into jenkinsci:master Jun 27, 2019
@Vlatombe Vlatombe deleted the multiple-podtemplate-filters branch June 27, 2019 14:45
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.

3 participants