Skip to content

Commit

Permalink
Merge pull request #15944 from bparees/logstream_timeout
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 15862, 15781, 15944)

enforce context timeout on build log streaming
  • Loading branch information
openshift-merge-robot committed Aug 30, 2017
2 parents 558cdda + d873f17 commit 248fa76
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/build/registry/buildlog/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ func (r *REST) Get(ctx apirequest.Context, name string, opts runtime.Object) (ru
// until they have all run, unless we see one of them fail.
// If we aren't following the logs, we will run through all the init containers exactly once.
for waitForInitContainers {
select {
case <-ctx.Done():
glog.V(4).Infof("timed out while iterating on build init containers for build pod %s/%s", build.Namespace, buildPodName)
return
default:
}
glog.V(4).Infof("iterating through build init containers for build pod %s/%s", build.Namespace, buildPodName)

// assume we are not going to need to iterate again until proven otherwise
Expand Down

0 comments on commit 248fa76

Please sign in to comment.