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

Better support for docker build with a target #1497

Merged
merged 1 commit into from Jan 25, 2019

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Jan 20, 2019

Fix #1120

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

@codecov-io
Copy link

codecov-io commented Jan 20, 2019

Codecov Report

Merging #1497 into master will increase coverage by 0.27%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1497      +/-   ##
==========================================
+ Coverage   45.18%   45.45%   +0.27%     
==========================================
  Files         115      115              
  Lines        4794     4818      +24     
==========================================
+ Hits         2166     2190      +24     
  Misses       2403     2403              
  Partials      225      225
Impacted Files Coverage Δ
pkg/skaffold/docker/parse.go 77.32% <100%> (+2.44%) ⬆️

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 1aadb67...c3b0315. Read the comment docs.

Fix GoogleContainerTools#1120

Signed-off-by: David Gageot <david@gageot.net>
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.

two nits but LGTM

return nodes, nil
}

byTarget := make(map[string][]*parser.Node)
Copy link
Contributor

Choose a reason for hiding this comment

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

var byTarget map[string][]*parser.Node

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so. Setting a value on a nil map fails hard


for _, node := range nodesByTarget[target] {
if node.Value == command.From {
inst := fromInstruction(node)
Copy link
Contributor

Choose a reason for hiding this comment

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

you could inline this into the append(...) call instead of creating a new var

@dgageot dgageot merged commit 7287cab into GoogleContainerTools:master Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants