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

Apply default values upgraded configurations #1332

Merged

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Nov 28, 2018

Default values need to be set after upgrade, not before. In fact, default values are only needed to simplify the code of the runner, so that it doesn't have to compensate missing fields.

I used this opportunity to:

  • improve the code and coverage for skaffold fix
  • Remove duplication in code and tests

Signed-off-by: David Gageot david@gageot.net

Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

Thank you! can you implement the tests for it as well? We have a reasonable coverage now, shouldn't be hard.

@dgageot dgageot changed the title Apply default values on new fields at each step of the upgrade Apply default values upgraded configurations Nov 29, 2018
@dgageot dgageot force-pushed the missing-defaults-during-upgrade branch from 067fd07 to 70fd325 Compare November 29, 2018 09:42
@codecov-io
Copy link

codecov-io commented Nov 29, 2018

Codecov Report

Merging #1332 into master will decrease coverage by 0.12%.
The diff coverage is 46.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1332      +/-   ##
==========================================
- Coverage   44.84%   44.71%   -0.13%     
==========================================
  Files         110      114       +4     
  Lines        4797     4880      +83     
==========================================
+ Hits         2151     2182      +31     
- Misses       2425     2476      +51     
- Partials      221      222       +1
Impacted Files Coverage Δ
pkg/skaffold/schema/v1alpha5/config.go 50% <ø> (+4.54%) ⬆️
pkg/skaffold/schema/v1alpha3/config.go 50% <ø> (+4.54%) ⬆️
pkg/skaffold/schema/v1alpha4/config.go 50% <ø> (+4.54%) ⬆️
pkg/skaffold/schema/v1alpha1/config.go 50% <ø> (-7.15%) ⬇️
pkg/skaffold/schema/v1alpha2/config.go 50% <ø> (+4.54%) ⬆️
cmd/skaffold/app/cmd/dev.go 0% <0%> (ø) ⬆️
pkg/skaffold/schema/v1alpha1/defaults.go 0% <0%> (ø)
cmd/skaffold/app/cmd/run.go 0% <0%> (ø) ⬆️
cmd/skaffold/app/cmd/diagnose.go 0% <0%> (ø) ⬆️
cmd/skaffold/app/cmd/init.go 15.42% <0%> (ø) ⬆️
... and 15 more

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 96a4adf...3335346. Read the comment docs.

Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
@dgageot dgageot force-pushed the missing-defaults-during-upgrade branch from 70fd325 to 2ccf30d Compare November 29, 2018 13:16
Signed-off-by: David Gageot <david@gageot.net>
@dgageot dgageot force-pushed the missing-defaults-during-upgrade branch from aec9654 to 3335346 Compare November 29, 2018 18:34
@dgageot dgageot merged commit a6606b2 into GoogleContainerTools:master Nov 29, 2018
@dgageot dgageot deleted the missing-defaults-during-upgrade branch December 28, 2018 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants