Skip to content

Commit 2882ed3

Browse files
authored
Backporting timeout fix (#588)
* Backporting timeout fix * Fixing changelog
1 parent bee8366 commit 2882ed3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
changelog:
2+
- type: FIX
3+
description: Backporting timeout fix from 0.34.5.
4+
issueLink: https://github.com/solo-io/solo-projects/issues/7909
5+
resolvesIssue: false

codegen/collector/extractor.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,10 @@ func (i *synchronizedImportsExtractor) FetchImportsForFile(protoFile string, imp
8787
i.activeRequestsMu.Unlock()
8888

8989
select {
90-
case <-time.After(5 * time.Second):
91-
// We should never reach this. This can only occur if we deadlock on file imports
92-
// which only happens with cyclic dependencies
90+
case <-time.After(15 * time.Second):
91+
// We should never reach this in an ideal scenario. If we do, it means that
92+
// we either have a deadlock or golang is being very slow.
93+
// The deadlock occurs on file imports with cyclic dependencies.
9394
// Perhaps a safer alternative to erroring is just to execute the importsFetcher:
9495
// return importsFetcher(protoFile)
9596
return nil, FetchImportsTimeout(protoFile)

0 commit comments

Comments
 (0)