Skip to content

Commit

Permalink
manifest: increase timeout of remote spkg fetch to 5 minutes, up from…
Browse files Browse the repository at this point in the history
… 30 seconds
  • Loading branch information
colindickson committed Aug 28, 2024
1 parent ebeb904 commit 8abf4c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/release-notes/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
* Revert 'initialBlocks' changes from v1.9.1 because a 'changing module hash' causes more trouble.
* Wazero: bump v1.8.0 and activate caching of precompiled wasm modules in `/tmp/wazero` to decrease compilation time
* Metering update: more detailed metering with addition of new metrics (`live_uncompressed_read_bytes`, `live_uncompressed_read_forked_bytes`, `file_uncompressed_read_bytes`, `file_uncompressed_read_forked_bytes`, `file_compressed_read_forked_bytes`, `file_compressed_read_bytes`, `file_uncompressed_write_bytes`, `file_compressed_write_bytes`). *DEPRECATION WARNING*: `bytes_read` and `bytes_written` metrics will be removed in the future, please use the new metrics for metering instead.
* Manifest reader: increase timeout of remote spkg fetch to 5 minutes, up from 30 seconds

### Client
* Add `substreams auth` command, to authenticate via `thegraph.market` and to get a dev API Key.
Expand Down
6 changes: 4 additions & 2 deletions manifest/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ import (
yaml3 "gopkg.in/yaml.v3"
)

var remoteFetchTimeout = 5 * time.Minute

var IPFSURL string
var IPFSTimeout time.Duration
var httpClient = &http.Client{
Timeout: 30 * time.Second,
Timeout: remoteFetchTimeout,
}

func hasRemotePrefix(in string) bool {
Expand Down Expand Up @@ -235,7 +237,7 @@ func (r *Reader) readFromHttp(input string) error {
}

func (r *Reader) readFromStore(input string) error {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), remoteFetchTimeout)
defer cancel()

store, filename, err := dstore.NewStoreFromFileURL(input)
Expand Down

0 comments on commit 8abf4c5

Please sign in to comment.