diff --git a/dvc/config_schema.py b/dvc/config_schema.py index c3aa29d32..13d5a73ae 100644 --- a/dvc/config_schema.py +++ b/dvc/config_schema.py @@ -156,6 +156,8 @@ SCHEMA = { "grant_write_acp": str, "grant_full_control": str, "cache_regions": bool, + "read_timeout": Coerce(int), + "connect_timeout": Coerce(int), **REMOTE_COMMON, }, "gs": { diff --git a/dvc/fs/s3.py b/dvc/fs/s3.py index 91295a791..e22854179 100644 --- a/dvc/fs/s3.py +++ b/dvc/fs/s3.py @@ -99,6 +99,11 @@ class BaseS3FileSystem(ObjectFSWrapper): 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")