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

init --analyze should return unique image names #3141

Merged

Conversation

caulagi
Copy link
Contributor

@caulagi caulagi commented Oct 30, 2019

Fixes #3128

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Mentions any output changes.
  • Adds documentation as needed: user docs, YAML reference, CLI reference.
  • Adds integration tests if needed.

Reviewer Notes

  • The code flow looks good.
  • Unit test added.
  • User facing changes look good.

Release Notes

Bug fixes
    * "Skaffold init --analyze returns a unique list of image names"

Fixes GoogleContainerTools#3128

Signed-off-by: Pradip Caulagi <caulagi@gmail.com>
Signed-off-by: Pradip Caulagi <caulagi@gmail.com>
@codecov
Copy link

codecov bot commented Oct 30, 2019

Codecov Report

Merging #3141 into master will increase coverage by 0.13%.
The diff coverage is 100%.

Impacted Files Coverage Δ
pkg/skaffold/initializer/init.go 58.16% <100%> (+0.97%) ⬆️
pkg/skaffold/build/local/local.go 31.57% <0%> (-1.76%) ⬇️
pkg/skaffold/docker/remote.go 12.96% <0%> (-1.04%) ⬇️
pkg/skaffold/runner/diagnose.go 12.5% <0%> (-0.36%) ⬇️
pkg/skaffold/kubernetes/context/context.go 100% <0%> (ø) ⬆️
pkg/skaffold/schema/versions.go 70.83% <0%> (ø) ⬆️
pkg/skaffold/config/options.go 100% <0%> (ø) ⬆️
pkg/skaffold/schema/v1beta17/upgrade.go 77.77% <0%> (ø)
...ck/tools/vendor/github.com/rakyll/statik/statik.go 100% <0%> (ø)
pkg/skaffold/build/local/buildpacks.go 0% <0%> (ø)
... and 13 more

@balopat balopat added the kokoro:run runs the kokoro jobs on a PR label Oct 30, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Oct 30, 2019
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 for opening this @caulagi!
I think we can simplify this - if you add the test in TestResolveBuilderImages and implement the "set semantics" for unresolvedImages via map[string]interface{} in autoSelectBuilders instead of the json printer methods. What do you think?

Copy link
Contributor

@dgageot dgageot left a comment

Choose a reason for hiding this comment

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

Just a few nits

pkg/skaffold/initializer/init.go Outdated Show resolved Hide resolved
pkg/skaffold/initializer/init.go Outdated Show resolved Hide resolved
Signed-off-by: Pradip Caulagi <caulagi@gmail.com>
@caulagi
Copy link
Contributor Author

caulagi commented Oct 31, 2019

@balopat, @dgageot Thanks for the feedback. Can you have one more look?

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.

LGTM, please run a gofmt to fix the Travis Check

Signed-off-by: Pradip Caulagi <caulagi@gmail.com>
@caulagi
Copy link
Contributor Author

caulagi commented Nov 1, 2019

Oops, fixed.

@balopat balopat added the kokoro:run runs the kokoro jobs on a PR label Nov 6, 2019
@balopat balopat requested a review from dgageot November 6, 2019 06:06
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Nov 6, 2019
@balopat balopat merged commit 99dad21 into GoogleContainerTools:master Nov 6, 2019
@caulagi caulagi deleted the init-analyze-unique-names branch November 11, 2021 15:13
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.

Skaffold init --analyze returns duplicate image name
5 participants