Build: do not send notifications on known failed builds
We do not want to send notifications (email or webhook) for known exceptions:
Duplicated build
Project builds skipped
Closes
@@ -228,6 +228,12 @@ class UpdateDocsTask(SyncRepositoryMixin, Task):
YAMLParseError,
)
+ # Do not send notifications on failure builds for these exceptions.
+ exceptions_without_notifications = (
+ DuplicatedBuildError,
+ ProjectBuildsSkippedError,
+ )
+
acks_late = True
track_started = True
@@ -394,6 +400,7 @@ class UpdateDocsTask(SyncRepositoryMixin, Task):
)
# Send notifications for unhandled errors
+ if not isinstance(exc, self.exceptions_without_notifications):
self.send_notifications(
self.data.version.pk,
self.data.build['id'],
