Skip to content

Commit

Permalink
Merge pull request #173 from codecov/scott/fix-report-size
Browse files Browse the repository at this point in the history
fix: Handle report size for readonlyreports
  • Loading branch information
scott-codecov committed Nov 6, 2023
2 parents 55177d9 + a83a296 commit 931ebab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
https://github.com/codecov/shared/archive/c096c95a612ccc043843c2c773f6a3d83b5e4248.tar.gz#egg=shared
https://github.com/codecov/shared/archive/db5d79745716d5e4ea3224d31df358159380e88c.tar.gz#egg=shared
https://github.com/codecov/opentelem-python/archive/refs/tags/v0.0.4a1.tar.gz#egg=codecovopentelem
boto3
celery
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ s3transfer==0.3.4
# via boto3
sentry-sdk==1.19.1
# via -r requirements.in
shared @ https://github.com/codecov/shared/archive/c096c95a612ccc043843c2c773f6a3d83b5e4248.tar.gz
shared @ https://github.com/codecov/shared/archive/db5d79745716d5e4ea3224d31df358159380e88c.tar.gz
# via -r requirements.in
six==1.15.0
# via
Expand Down Expand Up @@ -353,6 +353,7 @@ urllib3==1.26.13
# minio
# requests
# sentry-sdk
# shared
vcrpy==4.1.1
# via -r requirements.in
vine==5.0.0
Expand Down
7 changes: 2 additions & 5 deletions services/notification/notifiers/mixins/message/sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,12 @@ def _potential_ats_user(self, comparison: ComparisonProxy) -> bool:
# we're using the total chunks size as a proxy for potential CI
# runtime - assuming that if you have more files + uploads then
# perhaps your CI is running longer
approx_size = 0
for chunk in report._chunks:
approx_size += len(chunk)

#
# this value was just chosen empirically by looking at some of our
# own repos and relating chunks size to CI time - ideally we'd like
# to target repos w/ CI time > 20 min but we don't really have that
# info available
if approx_size > 80_000_000:
if report.size > 80_000_000:
return True

return False
Expand Down

0 comments on commit 931ebab

Please sign in to comment.