Skip to content
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

Backporting timeout fix #588

Merged
merged 2 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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