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

[JENKINS-72314] Fix cloud save and roundtrip test #1471

Merged
merged 3 commits into from
Nov 16, 2023

Conversation

Vlatombe
Copy link
Member

@Vlatombe Vlatombe commented Nov 16, 2023

https://issues.jenkins.io/browse/JENKINS-72314

Roundtrip test was bogus so it didn't catch the regression introduced by #1443

Also fixed a few setters causing incorrect KubernetesCloud equality.

Testing done

Submitter checklist

Preview Give feedback

@Vlatombe Vlatombe added the bug Bug Fixes label Nov 16, 2023
@Vlatombe Vlatombe enabled auto-merge November 16, 2023 14:53
@Vlatombe Vlatombe merged commit d65bbc7 into jenkinsci:master Nov 16, 2023
5 checks passed
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Sorry, you merged right before I could submit…

@@ -455,7 +457,7 @@ public void setLabels(Map<String, String> labels) {
*/
@NonNull
public List<PodLabel> getPodLabels() {
return podLabels == null || podLabels.isEmpty() ? PodLabel.fromMap(DEFAULT_POD_LABELS) : podLabels;
return podLabels == null ? List.of() : podLabels;
Copy link
Member

Choose a reason for hiding this comment

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

The previous idiom made more sense to me actually. It depends on whether DEFAULT_POD_LABELS might ever change in the future, and if so, what we expect the impact to be on existing templates. https://www.jenkins.io/doc/developer/plugin-development/pipeline-integration/#handling-default-values has some discussion. At any rate, what about the previous handling of podLabels did not round-trip correctly?

@Vlatombe Vlatombe deleted the JENKINS-72314 branch November 16, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants