Skip to content
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
7 changes: 6 additions & 1 deletion dev/deploy-to-container/settings_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@
access_key="minio_root",
secret_key="minio_pass",
security_token=None,
client_config=botocore.config.Config(signature_version="s3v4"),
client_config=botocore.config.Config(
signature_version="s3v4",
connect_timeout=BLOBSTORAGE_CONNECT_TIMEOUT,
read_timeout=BLOBSTORAGE_READ_TIMEOUT,
retries={"total_max_attempts": BLOBSTORAGE_MAX_ATTEMPTS},
),
verify=False,
bucket_name=f"test-{storagename}",
),
Expand Down
7 changes: 6 additions & 1 deletion dev/diff/settings_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@
access_key="minio_root",
secret_key="minio_pass",
security_token=None,
client_config=botocore.config.Config(signature_version="s3v4"),
client_config=botocore.config.Config(
signature_version="s3v4",
connect_timeout=BLOBSTORAGE_CONNECT_TIMEOUT,
read_timeout=BLOBSTORAGE_READ_TIMEOUT,
retries={"total_max_attempts": BLOBSTORAGE_MAX_ATTEMPTS},
),
verify=False,
bucket_name=f"test-{storagename}",
),
Expand Down
7 changes: 6 additions & 1 deletion dev/tests/settings_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@
access_key="minio_root",
secret_key="minio_pass",
security_token=None,
client_config=botocore.config.Config(signature_version="s3v4"),
client_config=botocore.config.Config(
signature_version="s3v4",
connect_timeout=BLOBSTORAGE_CONNECT_TIMEOUT,
read_timeout=BLOBSTORAGE_READ_TIMEOUT,
retries={"total_max_attempts": BLOBSTORAGE_MAX_ATTEMPTS},
),
verify=False,
bucket_name=f"test-{storagename}",
),
Expand Down
7 changes: 6 additions & 1 deletion docker/configs/settings_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@
access_key="minio_root",
secret_key="minio_pass",
security_token=None,
client_config=botocore.config.Config(signature_version="s3v4"),
client_config=botocore.confg.Config(
signature_version="s3v4",
connect_timeout=BLOBSTORAGE_CONNECT_TIMEOUT,
read_timeout=BLOBSTORAGE_READ_TIMEOUT,
retries={"total_max_attempts": BLOBSTORAGE_MAX_ATTEMPTS},
),
verify=False,
bucket_name=storagename,
),
Expand Down
4 changes: 4 additions & 0 deletions ietf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@

ENABLE_BLOBSTORAGE = True

BLOBSTORAGE_MAX_ATTEMPTS = 1
BLOBSTORAGE_CONNECT_TIMEOUT = 2
BLOBSTORAGE_READ_TIMEOUT = 2

WSGI_APPLICATION = "ietf.wsgi.application"

AUTHENTICATION_BACKENDS = ( 'ietf.ietfauth.backends.CaseInsensitiveModelBackend', )
Expand Down
7 changes: 6 additions & 1 deletion ietf/settings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ def tempdir_with_cleanup(**kwargs):
access_key=_blob_store_access_key,
secret_key=_blob_store_secret_key,
security_token=None,
client_config=botocore.config.Config(signature_version="s3v4"),
client_config=botocore.config.Config(
signature_version="s3v4",
connect_timeout=BLOBSTORAGE_CONNECT_TIMEOUT,
read_timeout=BLOBSTORAGE_READ_TIMEOUT,
retries={"total_max_attempts": BLOBSTORAGE_MAX_ATTEMPTS},
),
bucket_name=f"{_blob_store_bucket_prefix}{storagename}",
ietf_log_blob_timing=_blob_store_enable_profiling,
),
Expand Down
16 changes: 15 additions & 1 deletion k8s/settings_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,15 @@ def _multiline_to_list(s):
_blob_store_enable_profiling = (
os.environ.get("DATATRACKER_BLOB_STORE_ENABLE_PROFILING", "false").lower() == "true"
)
_blob_store_max_attempts = (
os.environ.get("DATATRACKER_BLOB_STORE_MAX_ATTEMPTS", BLOBSTORAGE_MAX_ATTEMPTS)
)
_blob_store_connect_timeout = (
os.environ.get("DATATRACKER_BLOB_STORE_CONNECT_TIMEOUT", BLOBSTORAGE_CONNECT_TIMEOUT)
)
_blob_store_read_timeout = (
os.environ.get("DATATRACKER_BLOB_STORE_READ_TIMEOUT", BLOBSTORAGE_READ_TIMEOUT)
)
try:
from ietf.settings import MORE_STORAGE_NAMES
except ImportError:
Expand All @@ -331,7 +340,12 @@ def _multiline_to_list(s):
access_key=_blob_store_access_key,
secret_key=_blob_store_secret_key,
security_token=None,
client_config=botocore.config.Config(signature_version="s3v4"),
client_config=botocore.config.Config(
signature_version="s3v4",
connect_timeout=_blob_store_connect_timeout,
read_timeout=_blob_store_read_timeout,
retries={"total_max_attempts": _blob_store_max_attempts},
),
bucket_name=f"{_blob_store_bucket_prefix}{storage_name}".strip(),
ietf_log_blob_timing=_blob_store_enable_profiling,
),
Expand Down