File tree 2 files changed +14
-19
lines changed
2 files changed +14
-19
lines changed Original file line number Diff line number Diff line change 26
26
from readthedocs .core .utils import slugify
27
27
from readthedocs .projects .constants import LOG_TEMPLATE
28
28
from readthedocs .projects .models import Feature
29
+ from readthedocs .projects .exceptions import (
30
+ RepositoryError ,
31
+ ProjectConfigurationError ,
32
+ )
29
33
30
34
from .constants import (
31
35
DOCKER_HOSTNAME_MAX_LEN ,
@@ -528,15 +532,18 @@ class BuildEnvironment(BaseEnvironment):
528
532
successful
529
533
"""
530
534
531
- # Exceptions considered ERROR from a Build perspective but as a WARNING for
532
- # the application itself. These exception are logged as warning and not sent
533
- # to Sentry.
535
+ # These exceptions are considered ERROR from a Build perspective (the build
536
+ # failed and can continue) but as a WARNING for the application itself (RTD
537
+ # code didn't failed). These exception are logged as ``WARNING`` and they
538
+ # are not sent to Sentry.
534
539
WARNING_EXCEPTIONS = (
535
540
VersionLockedError ,
536
541
ProjectBuildsSkippedError ,
537
542
YAMLParseError ,
538
543
BuildTimeoutError ,
539
544
MkDocsYAMLParseError ,
545
+ RepositoryError ,
546
+ ProjectConfigurationError ,
540
547
)
541
548
542
549
def __init__ (
Original file line number Diff line number Diff line change @@ -307,7 +307,10 @@ def get_rtd_env_vars(self):
307
307
return env
308
308
309
309
310
- @app .task (max_retries = 5 , default_retry_delay = 7 * 60 )
310
+ @app .task (
311
+ max_retries = 5 ,
312
+ default_retry_delay = 7 * 60 ,
313
+ )
311
314
def sync_repository_task (version_pk ):
312
315
"""Celery task to trigger VCS version sync."""
313
316
try :
@@ -394,25 +397,10 @@ def run(self, version_pk): # pylint: disable=arguments-differ
394
397
return False
395
398
396
399
397
- # Exceptions under ``throws`` argument are considered ERROR from a Build
398
- # perspective (the build failed and can continue) but as a WARNING for the
399
- # application itself (RTD code didn't failed). These exception are logged as
400
- # ``INFO`` and they are not sent to Sentry.
401
400
@app .task (
402
401
bind = True ,
403
402
max_retries = 5 ,
404
403
default_retry_delay = 7 * 60 ,
405
- throws = (
406
- VersionLockedError ,
407
- ProjectBuildsSkippedError ,
408
- YAMLParseError ,
409
- BuildTimeoutError ,
410
- BuildEnvironmentWarning ,
411
- RepositoryError ,
412
- ProjectConfigurationError ,
413
- ProjectBuildsSkippedError ,
414
- MkDocsYAMLParseError ,
415
- ),
416
404
)
417
405
def update_docs_task (self , version_pk , * args , ** kwargs ):
418
406
try :
You can’t perform that action at this time.
0 commit comments