Skip to content

Compute tags in parallel#1820

Merged
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
dgageot:tags-parallel
Mar 19, 2019
Merged

Compute tags in parallel#1820
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
dgageot:tags-parallel

Conversation

@dgageot
Copy link
Copy Markdown
Contributor

@dgageot dgageot commented Mar 18, 2019

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

@dgageot dgageot force-pushed the tags-parallel branch 2 times, most recently from 4461448 to 0ee6e8b Compare March 18, 2019 15:25
@codecov-io
Copy link
Copy Markdown

codecov-io commented Mar 18, 2019

Codecov Report

Merging #1820 into master will increase coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1820      +/-   ##
==========================================
+ Coverage   47.71%   47.78%   +0.07%     
==========================================
  Files         143      143              
  Lines        6438     6447       +9     
==========================================
+ Hits         3072     3081       +9     
  Misses       3086     3086              
  Partials      280      280
Impacted Files Coverage Δ
pkg/skaffold/runner/runner.go 61.67% <100%> (+1.58%) ⬆️

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 7b1b8fa...9f2bceb. Read the comment docs.

@dgageot dgageot force-pushed the tags-parallel branch 4 times, most recently from 097d67a to 8f162b8 Compare March 19, 2019 17:37
for i := range artifacts {
tagErrs[i] = make(chan tagErr, 1)

i := i
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.

am I missing something here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The variable needs to be captured otherwise every go routine will use the same value

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.

makes sense. just looks kinda funny lol

tag, err := r.Tagger.GenerateFullyQualifiedImageName(artifact.Workspace, imageName)
case t := <-tagErrs[i]:
tag := t.tag
err := t.err
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.

should we combine errors here in the case that multiple tag generation runs fail?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We could do that. That's not what the current sequential code is doing so I didn't want to also add that complexity.

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.

that's fair. I don't think it's a big deal.

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.

red X for kokoro is good, right? ❓ ❌ ❓

@dgageot
Copy link
Copy Markdown
Contributor Author

dgageot commented Mar 19, 2019

@nkubala actually, I don't know about this one...

@dgageot
Copy link
Copy Markdown
Contributor Author

dgageot commented Mar 19, 2019

@nkubala This one is a real timeout. The build took more than 10 minutes but there's no visible issue. Let me push a PR with a timeout set to 15 minutes

Signed-off-by: David Gageot <david@gageot.net>
@dgageot dgageot merged commit 8418c9e into GoogleContainerTools:master Mar 19, 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.

4 participants