Skip to content

Remove Tagger from Builder interface#1601

Merged
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
dgageot:remove-tagger-from-builder-interface
Feb 6, 2019
Merged

Remove Tagger from Builder interface#1601
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
dgageot:remove-tagger-from-builder-interface

Conversation

@dgageot
Copy link
Copy Markdown
Contributor

@dgageot dgageot commented Feb 5, 2019

Tags are now computed by the runner and passed as a map to the builder.
This makes it easier to transform builder into plugins that have basically no notion of tagging

@dgageot dgageot force-pushed the remove-tagger-from-builder-interface branch from 384aa1b to ed84316 Compare February 5, 2019 16:18
@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 5, 2019

Codecov Report

Merging #1601 into master will increase coverage by 0.69%.
The diff coverage is 69.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1601      +/-   ##
==========================================
+ Coverage   46.31%   47.01%   +0.69%     
==========================================
  Files         117      117              
  Lines        5106     5118      +12     
==========================================
+ Hits         2365     2406      +41     
+ Misses       2508     2471      -37     
- Partials      233      241       +8
Impacted Files Coverage Δ
pkg/skaffold/build/gcb/cloud_build.go 0% <0%> (ø) ⬆️
pkg/skaffold/build/kaniko/kaniko.go 0% <0%> (ø) ⬆️
pkg/skaffold/runner/timings.go 15.38% <0%> (ø) ⬆️
pkg/skaffold/build/local/local.go 51.72% <100%> (-17.03%) ⬇️
pkg/skaffold/build/prebuilt.go 82.75% <100%> (ø) ⬆️
pkg/skaffold/build/sequence.go 100% <100%> (ø) ⬆️
pkg/skaffold/runner/runner.go 61.74% <73.33%> (+0.8%) ⬆️
pkg/skaffold/build/parallel.go 88.63% <88.88%> (+88.63%) ⬆️
pkg/skaffold/build/local/docker.go 47.5% <0%> (-10%) ⬇️
... and 1 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 36782cc...c6f2b7d. Read the comment docs.

Copy link
Copy Markdown
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.

so much cleaner 😍 a few nits but it looks great

description string
api testutil.FakeAPIClient
tagger tag.Tagger
tagger tag.ByImage
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I'd change this to tags instead of tagger

}

func (b *prebuiltImagesBuilder) Build(ctx context.Context, out io.Writer, tagger tag.Tagger, artifacts []*latest.Artifact) ([]Artifact, error) {
func (b *prebuiltImagesBuilder) Build(ctx context.Context, out io.Writer, tagsIgnored tag.ByImage, artifacts []*latest.Artifact) ([]Artifact, error) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if these are actually unused then can we just pass them as _ tag.ByImage?

package tag

// ByImage maps image names to tags
type ByImage map[string]string
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this name is slightly confusing to me, maybe it makes more sense as ImageTags or ImageToTag?


// imageTags generates tags for a list of artifacts
func (r *SkaffoldRunner) imageTags(out io.Writer, artifacts []*latest.Artifact) (tag.ByImage, error) {
tags := make(tag.ByImage)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tags := make(tag.ByImage, len(artifacts))?

Signed-off-by: David Gageot <david@gageot.net>
@dgageot dgageot force-pushed the remove-tagger-from-builder-interface branch from ed84316 to c6f2b7d Compare February 6, 2019 12:55
@dgageot
Copy link
Copy Markdown
Contributor Author

dgageot commented Feb 6, 2019

@nkubala @priyawadhwa Should be ready for review

Copy link
Copy Markdown
Contributor

@priyawadhwa priyawadhwa left a comment

Choose a reason for hiding this comment

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

so hyped for this! LGTM

@dgageot dgageot merged commit 08d5615 into GoogleContainerTools:master Feb 6, 2019
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.

6 participants