Skip to content

Commit

Permalink
remote: add support for Amazon S3 timeout configuration (#6634)
Browse files Browse the repository at this point in the history
Fixes #6241
  • Loading branch information
whysage authored Sep 25, 2021
1 parent f9df6d2 commit 7fe370b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dvc/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ class RelPath(str):
"grant_write_acp": str,
"grant_full_control": str,
"cache_regions": bool,
"read_timeout": Coerce(int),
"connect_timeout": Coerce(int),
**REMOTE_COMMON,
},
"gs": {
Expand Down
5 changes: 5 additions & 0 deletions dvc/fs/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ def _prepare_credentials(self, **config):
client["endpoint_url"] = config.get("endpointurl")
client["verify"] = config.get("ssl_verify")

# timeout configuration
config_kwargs = login_info["config_kwargs"]
config_kwargs["read_timeout"] = config.get("read_timeout")
config_kwargs["connect_timeout"] = config.get("connect_timeout")

# encryptions
additional = login_info["s3_additional_kwargs"]
additional["ServerSideEncryption"] = config.get("sse")
Expand Down

0 comments on commit 7fe370b

Please sign in to comment.