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

Compute tags in parallel #1820

Merged
merged 1 commit into from
Mar 19, 2019
Merged

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Mar 18, 2019

Signed-off-by: David Gageot [email protected]

@codecov-io
Copy link

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
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
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
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
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
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
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
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
Contributor Author

dgageot commented Mar 19, 2019

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

@dgageot
Copy link
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 <[email protected]>
@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