-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
refactor: Add upgrade utility to handle all pipelines in a SkaffoldConfig #2582
refactor: Add upgrade utility to handle all pipelines in a SkaffoldConfig #2582
Conversation
Codecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for doing this!
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
Pipeline
andProfiles[*].Pipeline
. Given that this naming scheme is rather stable now, I think this is affordable.Fixes #2469