Skip to content

Commit

Permalink
increase proto import timeout; bump golang to 1.21.1 (#503)
Browse files Browse the repository at this point in the history
* increase proto import timeout; bump golang to 1.21.1

* gen
  • Loading branch information
tjons authored Sep 27, 2023
1 parent eb9e7cf commit 38333cc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
10 changes: 10 additions & 0 deletions changelog/v0.34.5/bump-proto-imports-timeout.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
changelog:
- type: DEPENDENCY_BUMP
dependencyOwner: golang
dependencyRepo: golang
dependencyTag: v1.21.1
- type: NON_USER_FACING
issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/11090
description: >
Bump time before declaring a deadlock when processing proto imports to 15s instead of 5s.
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/solo-io/skv2

go 1.20
go 1.21

require (
github.com/BurntSushi/toml v0.3.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
Expand Down Expand Up @@ -870,6 +871,7 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
Expand Down

0 comments on commit 38333cc

Please sign in to comment.