Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use new UploadErrorCode value for processing timeouts #945

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
https://github.com/codecov/test-results-parser/archive/c840502d1b4dd7d05b2efc2c1328affaf2acd27c.tar.gz#egg=test-results-parser
https://github.com/codecov/shared/archive/45252f75524c38172b991a960bac964ec7b6f7d1.tar.gz#egg=shared
https://github.com/codecov/shared/archive/22622868034aa8dbaad88901ba7156e3ae6b9539.tar.gz#egg=shared
https://github.com/codecov/timestring/archive/d37ceacc5954dff3b5bd2f887936a98a668dda42.tar.gz#egg=timestring
asgiref>=3.7.2
analytics-python==1.3.0b1
Expand Down Expand Up @@ -48,4 +48,4 @@ stripe>=9.6.0
time-machine
urllib3>=1.26.18
vcrpy
zstandard
zstandard
33 changes: 20 additions & 13 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# This file was autogenerated by uv via the following command:
# uv pip compile requirements.in -o requirements.txt
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile requirements.in
#
amqp==5.2.0
# via kombu
analytics-python==1.3.0b1
Expand Down Expand Up @@ -71,7 +75,7 @@ codecov-ribs==0.1.18
# shared
colour==0.1.5
# via shared
coverage==7.5.0
coverage[toml]==7.5.0
# via
# -r requirements.in
# pytest-cov
Expand Down Expand Up @@ -105,7 +109,7 @@ filelock==3.12.4
# via virtualenv
freezegun==1.5.0
# via pytest-freezegun
google-api-core==2.23.0
google-api-core[grpc]==2.23.0
# via
# google-cloud-core
# google-cloud-pubsub
Expand All @@ -132,7 +136,7 @@ google-crc32c==1.1.2
# google-resumable-media
google-resumable-media==2.7.2
# via google-cloud-storage
googleapis-common-protos==1.59.1
googleapis-common-protos[grpc]==1.59.1
# via
# google-api-core
# grpc-google-iam-v1
Expand Down Expand Up @@ -316,19 +320,17 @@ requests==2.32.3
# stripe
respx==0.20.2
# via -r requirements.in
rfc3986==1.4.0
rfc3986[idna2008]==1.4.0
# via httpx
rsa==4.7.2
# via google-auth
s3transfer==0.10.1
# via boto3
sentry-sdk==2.13.0
sentry-sdk[celery]==2.13.0
# via
# -r requirements.in
# shared
setuptools==75.6.0
# via nodeenv
shared @ https://github.com/codecov/shared/archive/45252f75524c38172b991a960bac964ec7b6f7d1.tar.gz#egg=shared
shared @ https://github.com/codecov/shared/archive/22622868034aa8dbaad88901ba7156e3ae6b9539.tar.gz
# via -r requirements.in
six==1.16.0
# via
Expand Down Expand Up @@ -358,13 +360,13 @@ statsd==3.3.0
# via -r requirements.in
stripe==9.6.0
# via -r requirements.in
test-results-parser @ https://github.com/codecov/test-results-parser/archive/c840502d1b4dd7d05b2efc2c1328affaf2acd27c.tar.gz#egg=test-results-parser
test-results-parser @ https://github.com/codecov/test-results-parser/archive/c840502d1b4dd7d05b2efc2c1328affaf2acd27c.tar.gz
# via -r requirements.in
text-unidecode==1.3
# via faker
time-machine==2.14.1
# via -r requirements.in
timestring @ https://github.com/codecov/timestring/archive/d37ceacc5954dff3b5bd2f887936a98a668dda42.tar.gz#egg=timestring
timestring @ https://github.com/codecov/timestring/archive/d37ceacc5954dff3b5bd2f887936a98a668dda42.tar.gz
# via -r requirements.in
tqdm==4.66.1
# via openai
Expand Down Expand Up @@ -399,4 +401,9 @@ wrapt==1.16.0
yarl==1.9.4
# via vcrpy
zstandard==0.23.0
# via -r requirements.in
# via
# -r requirements.in
# shared

# The following packages are considered to be unsafe in a requirements file:
# setuptools
11 changes: 11 additions & 0 deletions services/report/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,17 @@
result.error = ProcessingError(code=UploadErrorCode.REPORT_EMPTY, params={})
raw_report_info.error = result.error
return result
except SoftTimeLimitExceeded as e:
sentry_sdk.capture_exception(e)
log.warning(

Check warning on line 683 in services/report/__init__.py

View check run for this annotation

Codecov Notifications / codecov/patch

services/report/__init__.py#L681-L683

Added lines #L681 - L683 were not covered by tests
"Timed out while processing report", extra=dict(reportid=reportid)
)
result.error = ProcessingError(

Check warning on line 686 in services/report/__init__.py

View check run for this annotation

Codecov Notifications / codecov/patch

services/report/__init__.py#L686

Added line #L686 was not covered by tests
code=UploadErrorCode.PROCESSING_TIMEOUT, params={}
)
raw_report_info.error = result.error

Check warning on line 689 in services/report/__init__.py

View check run for this annotation

Codecov Notifications / codecov/patch

services/report/__init__.py#L689

Added line #L689 was not covered by tests
# Return and attempt to save the error result rather than re-raise
return result

Check warning on line 691 in services/report/__init__.py

View check run for this annotation

Codecov Notifications / codecov/patch

services/report/__init__.py#L691

Added line #L691 was not covered by tests
except Exception as e:
sentry_sdk.capture_exception(e)
log.exception(
Expand Down
Loading