-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix(executor): Always poll for Docker injected sidecars. Resolves #5448 #5479
Conversation
Signed-off-by: Alex Collins <alex_collins@intuit.com>
Codecov Report
@@ Coverage Diff @@
## master #5479 +/- ##
==========================================
- Coverage 46.69% 46.67% -0.03%
==========================================
Files 240 240
Lines 14994 14994
==========================================
- Hits 7002 6998 -4
- Misses 7093 7100 +7
+ Partials 899 896 -3
Continue to review full report at Codecov.
|
functional_test.go:310: timeout after 30s waiting for condition |
artifacts_test.go:52: timeout after 30s waiting for condition pns |
@@ -185,6 +185,8 @@ func (d *DockerExecutor) GetExitCode(ctx context.Context, containerName string) | |||
} | |||
|
|||
func (d *DockerExecutor) Wait(ctx context.Context, containerNames []string) error { | |||
ctx, cancel := context.WithCancel(ctx) // stop the polling when we are no longer waiting | |||
defer cancel() | |||
go func() { | |||
err := d.pollContainerIDs(ctx, containerNames) |
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.
If pollContainerIDs
returns with a timeout error, it could stay at for !d.haveContainers(containerNames)
forever.
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.
poll now runs for ever
workflow/executor/docker/docker.go
Outdated
@@ -185,6 +185,8 @@ func (d *DockerExecutor) GetExitCode(ctx context.Context, containerName string) | |||
} | |||
|
|||
func (d *DockerExecutor) Wait(ctx context.Context, containerNames []string) error { | |||
ctx, cancel := context.WithCancel(ctx) // stop the polling when we are no longer waiting |
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.
It seems to be useless here to do WithCancel(ctx)
. If the passed in ctx
is cancelable, then there's no need to do it; If the passed in ctx
is not cancelable, then I don't see a way could hit ctx.Done()
.
pns: artifacts_test.go:52: timeout after 30s waiting for condition |
Signed-off-by: Alex Collins <alex_collins@intuit.com>
Signed-off-by: Alex Collins <alex_collins@intuit.com>
@whynowy ready for review again. I did not make your change - I'd prefer to wait forever, I don't think we ever can have a case now that we don't get all container names. I've removed the PNS changes. |
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.
LGTM
Set milestone as v3.0 for inclusing in v3.0.0-rc10. |
No description provided.