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

back: proto timeout #527

Merged
merged 1 commit into from
Dec 27, 2023
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.26.3/proto-import-timeout.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
- type: NON_USER_FACING
description: >
Bump time before declaring a deadlock when processing proto imports to 15s instead of 5s.
Backport of https://github.com/solo-io/skv2/commit/38333ccb2e5e779973ad94354ec499932749fed0
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
Loading