diff --git a/changelog/v0.32.2/backport-timeout-fix.yaml b/changelog/v0.32.2/backport-timeout-fix.yaml new file mode 100644 index 000000000..580fbd04f --- /dev/null +++ b/changelog/v0.32.2/backport-timeout-fix.yaml @@ -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 \ No newline at end of file diff --git a/codegen/collector/extractor.go b/codegen/collector/extractor.go index 9117345e2..b05607183 100644 --- a/codegen/collector/extractor.go +++ b/codegen/collector/extractor.go @@ -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)