Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 7ab2b02

Browse files
committed
fix(ta): use bucket specified in config
we were previously using the bucket name hard coded in the Django settings instead of using the bucket name specified in the codecov installation config
1 parent 3813d1b commit 7ab2b02

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

utils/test_results.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import polars as pl
2-
from django.conf import settings
32
from shared.api_archive.storage import StorageService
43
from shared.storage.exceptions import FileNotInStorageError
54

65
from services.redis_configuration import get_redis_connection
76
from services.task import TaskService
7+
from utils.config import get_config
88

99

1010
def redis_key(
@@ -53,14 +53,14 @@ def get_results(
5353
key = redis_key(repoid, branch, interval_start, interval_end)
5454
result: bytes | None = redis_conn.get(key)
5555

56+
bucket_name: str = get_config("services", "minio", "bucket", default="archive") # type: ignore
57+
5658
if result is None:
5759
# try storage
5860
storage_service = StorageService()
5961
key = storage_key(repoid, branch, interval_start, interval_end)
6062
try:
61-
result = storage_service.read_file(
62-
bucket_name=settings.GCS_BUCKET_NAME, path=key
63-
)
63+
result = storage_service.read_file(bucket_name=bucket_name, path=key)
6464
# cache to redis
6565
TaskService().cache_test_results_redis(repoid, branch)
6666
except FileNotInStorageError:

0 commit comments

Comments
 (0)