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

Allow multiple configs in single skaffold.yaml #5199

Merged
merged 4 commits into from
Jan 11, 2021

Conversation

gsquared94
Copy link
Collaborator

Related: Skaffold Multiple Configs support
This PR implements defining multiple skaffold pipelines in a single file. Maintaining multiple configurations is already implemented in #5160

@gsquared94 gsquared94 requested a review from a team as a code owner December 31, 2020 04:22
@google-cla google-cla bot added the cla: yes label Dec 31, 2020
@codecov
Copy link

codecov bot commented Dec 31, 2020

Codecov Report

Merging #5199 (6f5d2cd) into master (35214eb) will increase coverage by 0.04%.
The diff coverage is 84.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5199      +/-   ##
==========================================
+ Coverage   71.82%   71.87%   +0.04%     
==========================================
  Files         387      387              
  Lines       13928    13974      +46     
==========================================
+ Hits        10004    10044      +40     
- Misses       3190     3193       +3     
- Partials      734      737       +3     
Impacted Files Coverage Δ
pkg/skaffold/schema/versions.go 82.41% <84.90%> (+0.27%) ⬆️
pkg/skaffold/yaml/yaml.go 54.83% <0.00%> (-8.13%) ⬇️
pkg/skaffold/runner/build_deploy.go 68.88% <0.00%> (-1.01%) ⬇️
pkg/skaffold/runner/dev.go 71.52% <0.00%> (+2.01%) ⬆️
pkg/skaffold/util/tar.go 56.00% <0.00%> (+5.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35214eb...6f5d2cd. Read the comment docs.

nkubala
nkubala previously requested changes Jan 5, 2021
Copy link
Contributor

@nkubala nkubala left a comment

Choose a reason for hiding this comment

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

thinking about this a little more, i don't know that we want to require all configs passed in to explicitly have the same API version.

in most cases, we should be able to take the latest found API version, and skaffold fix up the older ones to that new version successfully. this won't always work (in the event that there was a breaking config change at some point), but these are usually rare so it should work in the majority of cases. WDYT?

pkg/skaffold/schema/versions.go Show resolved Hide resolved
@gsquared94
Copy link
Collaborator Author

thinking about this a little more, i don't know that we want to require all configs passed in to explicitly have the same API version.

in most cases, we should be able to take the latest found API version, and skaffold fix up the older ones to that new version successfully. this won't always work (in the event that there was a breaking config change at some point), but these are usually rare so it should work in the majority of cases. WDYT?

So this only limits all configs defined in the same skaffold.yaml file to have the same config version. Different files can have different config versions obviously. WDYT?

@nkubala
Copy link
Contributor

nkubala commented Jan 7, 2021

So this only limits all configs defined in the same skaffold.yaml file to have the same config version. Different files can have different config versions obviously. WDYT?

ahh ok, sorry i didn't follow that. i don't think it's a huge deal, but if different files can have different config versions, and then i can combine those separate files into a single (legal) skaffold.yaml which now will fail because the config versions are different, that feels a bit arbitrary no?

i won't die on this hill because it's pretty unconventional and might make the implementation more annoying for you since you'll have to figure out how to make multi-config skaffold.yamls work with skaffold fix, but this does feel a tad inconsistent.

@gsquared94
Copy link
Collaborator Author

ahh ok, sorry i didn't follow that. i don't think it's a huge deal, but if different files can have different config versions, and then i can combine those separate files into a single (legal) skaffold.yaml which now will fail because the config versions are different, that feels a bit arbitrary no?
i won't die on this hill because it's pretty unconventional and might make the implementation more annoying for you since you'll have to figure out how to make multi-config skaffold.yamls work with skaffold fix, but this does feel a tad inconsistent.

You're right. It now supports multiple config versions. It was mostly an arbitrary choice on my part and not implementation difficulty. Fixed!

@gsquared94 gsquared94 mentioned this pull request Jan 11, 2021
Copy link
Contributor

@MarlonGamez MarlonGamez left a comment

Choose a reason for hiding this comment

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

This LGTM 👍🏼

@gsquared94 gsquared94 dismissed nkubala’s stale review January 11, 2021 22:04

Added their change request

@gsquared94 gsquared94 merged commit a11657f into GoogleContainerTools:master Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants