-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Compute tags in parallel #1820
Conversation
4461448
to
0ee6e8b
Compare
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
097d67a
to
8f162b8
Compare
for i := range artifacts { | ||
tagErrs[i] = make(chan tagErr, 1) | ||
|
||
i := i |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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? ❓ ❌ ❓
@nkubala actually, I don't know about this one... |
@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]>
Signed-off-by: David Gageot [email protected]