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-58767] Persist yaml fragment in a single string #573

Merged
merged 5 commits into from
Aug 1, 2019

Conversation

Vlatombe
Copy link
Member

@Vlatombe Vlatombe commented Aug 1, 2019


private List<String> yamls = new ArrayList<>();
/**
* List of yaml fragments used for transient pod templates. Never persisted
Copy link
Member

Choose a reason for hiding this comment

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

Could this field just be deleted, and any call to setYamls with a list of size > 1 would just set yaml to something separated by "\n----\n" or whatever? Would be easier to follow the logic and be sure that you are not missing some complication.

Copy link
Member Author

Choose a reason for hiding this comment

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

hum, I guess it would increase complexity of getYaml, not sure I want it

Copy link
Member Author

Choose a reason for hiding this comment

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

Problem I see is that would end up being an invalid yaml fragment to parse into a pod template

Copy link
Member

Choose a reason for hiding this comment

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

As you see fit. I do not really understand what the list of YAMLs is for to begin with.

@@ -96,6 +101,19 @@ public void upgradeFrom_1_15_9() {
assertNull(template._getYamls());
}

@Test
@LocalData
public void upgradeFrom_1_15_9_invalid() {
Copy link
Member

Choose a reason for hiding this comment

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

Probably overkill, but OK.

@Vlatombe Vlatombe added the bug Bug Fixes label Aug 1, 2019
@Vlatombe Vlatombe merged commit 60c5972 into jenkinsci:master Aug 1, 2019
@Vlatombe Vlatombe deleted the JENKINS-58767 branch August 1, 2019 16:06
Vlatombe added a commit to Vlatombe/kubernetes-plugin that referenced this pull request Aug 28, 2019
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