# HG changeset patch # User Serhii Ilin # Date 2024-07-16 06:50:10 # Node ID 3850c0209ea8ccd5a61f4f615e6852569799e7ae # Parent 3fe73e54bd200adde6b26cf10e3e1da831f57489 feat(s3 region): added configurable s3 region. diff --git a/vcsserver/lib/archive_cache/backends/objectstore_cache.py b/vcsserver/lib/archive_cache/backends/objectstore_cache.py --- a/vcsserver/lib/archive_cache/backends/objectstore_cache.py +++ b/vcsserver/lib/archive_cache/backends/objectstore_cache.py @@ -142,10 +142,13 @@ class ObjectStoreCache(BaseCache): endpoint_url = settings.pop('archive_cache.objectstore.url') key = settings.pop('archive_cache.objectstore.key') secret = settings.pop('archive_cache.objectstore.secret') + region = settings.pop('archive_cache.objectstore.region') log.debug('Initializing %s archival cache instance', self) - fs = fsspec.filesystem('s3', anon=False, endpoint_url=endpoint_url, key=key, secret=secret) + fs = fsspec.filesystem( + 's3', anon=False, endpoint_url=endpoint_url, key=key, secret=secret, client_kwargs={'region_name': region} + ) # init main bucket if not fs.exists(self._bucket):