Skip to content

Commit

Permalink
Backporting timeout fix (#588)
Browse files Browse the repository at this point in the history
* Backporting timeout fix

* Fixing changelog
  • Loading branch information
ryanrolds authored Mar 4, 2025
1 parent bee8366 commit 2882ed3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog/v0.32.2/backport-timeout-fix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
- type: FIX
description: Backporting timeout fix from 0.34.5.
issueLink: https://github.com/solo-io/solo-projects/issues/7909
resolvesIssue: false
7 changes: 4 additions & 3 deletions codegen/collector/extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ func (i *synchronizedImportsExtractor) FetchImportsForFile(protoFile string, imp
i.activeRequestsMu.Unlock()

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

0 comments on commit 2882ed3

Please sign in to comment.