refactor: Add upgrade utility to handle all pipelines in a SkaffoldConfig#2582
Merged
nkubala merged 2 commits intoGoogleContainerTools:masterfrom Aug 20, 2019
Merged
Conversation
Codecov Report
|
nkubala
reviewed
Aug 8, 2019
Contributor
nkubala
left a comment
There was a problem hiding this comment.
makes sense to me, can you add some tests?
Before, the main pipeline and the profile pipelineshad to be upgraded manually, which was easy to forget. Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
de4012a to
aee1696
Compare
Contributor
Author
|
@nkubala Thanks for reviewing. My thinking was that this code is tested implicitly by the existing config upgrade tests, but it's better to make this explicit :). Do you think what I added is enough for that? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before, the main pipeline and the profile pipelines had to be upgraded
manually, which was easy to forget.
In contrast to what is outlined in #2469, I didn't introduce a new interface. This is mainly because I want to avoid double json-cloning of the same objects. Instead, I opted for reflection which has the main drawback that it requires the exact same go-naming for
PipelineandProfiles[*].Pipeline. Given that this naming scheme is rather stable now, I think this is affordable.Fixes #2469