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

Commit 47dc9fb

Browse files
Merge branch 'sshin/3211' into staging
2 parents 4bf7a9a + afaf9a7 commit 47dc9fb

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
25.1.3
1+
25.1.10

codecov/settings_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@
395395
)
396396

397397
SHELTER_SHARED_SECRET = get_config("setup", "shelter_shared_secret", default=None)
398+
SHELTER_ENABLED = get_config("setup", "shelter_enabled", default=True)
398399

399400
SENTRY_ENV = os.environ.get("CODECOV_ENV", False)
400401
SENTRY_DSN = os.environ.get("SERVICES__SENTRY__SERVER_DSN", None)

codecov/settings_enterprise.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,5 @@
7272
]
7373

7474
GUEST_ACCESS = get_config("setup", "guest_access", default=True)
75+
76+
SHELTER_ENABLED = get_config("setup", "shelter_enabled", default=False)

requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ freezegun
2626
google-cloud-pubsub
2727
gunicorn>=22.0.0
2828
https://github.com/codecov/opentelem-python/archive/refs/tags/v0.0.4a1.tar.gz#egg=codecovopentelem
29-
https://github.com/codecov/shared/archive/c1c9cb24639157fd903e40799c7d364481f42ef7.tar.gz#egg=shared
29+
https://github.com/codecov/shared/archive/a03c2f987b1f317f0372aa844cebd6b8d207a1f9.tar.gz#egg=shared
3030
https://github.com/photocrowd/django-cursor-pagination/archive/f560902696b0c8509e4d95c10ba0d62700181d84.tar.gz
3131
idna>=3.7
3232
minio

requirements.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,6 @@ googleapis-common-protos[grpc]==1.59.1
202202
# grpcio-status
203203
graphql-core==3.2.3
204204
# via ariadne
205-
greenlet==3.1.1
206-
# via sqlalchemy
207205
grpc-google-iam-v1==0.12.6
208206
# via google-cloud-pubsub
209207
grpcio==1.62.1
@@ -314,7 +312,7 @@ prometheus-client==0.17.1
314312
# shared
315313
prompt-toolkit==3.0.28
316314
# via click-repl
317-
proto-plus==1.22.3
315+
proto-plus==1.25.0
318316
# via
319317
# google-api-core
320318
# google-cloud-pubsub
@@ -418,7 +416,7 @@ sentry-sdk[celery]==2.13.0
418416
# shared
419417
setproctitle==1.1.10
420418
# via -r requirements.in
421-
shared @ https://github.com/codecov/shared/archive/c1c9cb24639157fd903e40799c7d364481f42ef7.tar.gz
419+
shared @ https://github.com/codecov/shared/archive/a03c2f987b1f317f0372aa844cebd6b8d207a1f9.tar.gz
422420
# via -r requirements.in
423421
simplejson==3.17.2
424422
# via -r requirements.in

utils/shelter.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ def get_instance(cls) -> "ShelterPubsub":
2323
return cls._instance
2424

2525
def __init__(self) -> None:
26+
if not settings.SHELTER_ENABLED:
27+
return
28+
2629
if not self.pubsub_publisher:
2730
self.pubsub_publisher = pubsub_v1.PublisherClient()
2831
pubsub_project_id: str = settings.SHELTER_PUBSUB_PROJECT_ID
@@ -32,6 +35,9 @@ def __init__(self) -> None:
3235
self.topic_path = self.pubsub_publisher.topic_path(pubsub_project_id, topic_id)
3336

3437
def publish(self, data: Dict[str, Any]) -> None:
38+
if not settings.SHELTER_ENABLED:
39+
return
40+
3541
try:
3642
self.pubsub_publisher.publish(
3743
self.topic_path,

0 commit comments

Comments
 (0)