Remove Tagger from Builder interface#1601
Remove Tagger from Builder interface#1601dgageot merged 1 commit intoGoogleContainerTools:masterfrom
Conversation
384aa1b to
ed84316
Compare
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
nkubala
left a comment
There was a problem hiding this comment.
so much cleaner 😍 a few nits but it looks great
| description string | ||
| api testutil.FakeAPIClient | ||
| tagger tag.Tagger | ||
| tagger tag.ByImage |
There was a problem hiding this comment.
nit: I'd change this to tags instead of tagger
pkg/skaffold/build/prebuilt.go
Outdated
| } | ||
|
|
||
| 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) { |
There was a problem hiding this comment.
if these are actually unused then can we just pass them as _ tag.ByImage?
pkg/skaffold/build/tag/tag.go
Outdated
| package tag | ||
|
|
||
| // ByImage maps image names to tags | ||
| type ByImage map[string]string |
There was a problem hiding this comment.
this name is slightly confusing to me, maybe it makes more sense as ImageTags or ImageToTag?
pkg/skaffold/runner/runner.go
Outdated
|
|
||
| // 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) |
There was a problem hiding this comment.
tags := make(tag.ByImage, len(artifacts))?
Signed-off-by: David Gageot <david@gageot.net>
ed84316 to
c6f2b7d
Compare
|
@nkubala @priyawadhwa Should be ready for review |
priyawadhwa
left a comment
There was a problem hiding this comment.
so hyped for this! LGTM
Tags are now computed by the runner and passed as a
mapto the builder.This makes it easier to transform builder into plugins that have basically no notion of tagging