Skip to content
Snippets Groups Projects
Commit 5348fcd4 authored by Benoit Chauvet's avatar Benoit Chauvet
Browse files

add missing sentry captures

parent 478c27f1
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ import traceback
from typing import ClassVar, Set
from psycopg2.extensions import QueryCanceledError
import sentry_sdk
from swh.model.swhids import CoreSWHID, ObjectType
from swh.storage.interface import StorageInterface
......@@ -151,6 +152,7 @@ class BaseVaultCooker(metaclass=abc.ABCMeta):
f"The full error was:\n\n{tb}",
)
logging.exception("Bundle cooking failed.")
sentry_sdk.capture_exception()
else:
self.backend.set_status(self.BUNDLE_TYPE, self.swhid, "done")
self.backend.set_progress(self.BUNDLE_TYPE, self.swhid, None)
......
......@@ -42,6 +42,8 @@ import tempfile
from typing import Any, Dict, Iterable, Iterator, List, NoReturn, Optional, Set, Tuple
import zlib
import sentry_sdk
from swh.core.api.classes import stream_results_optional
from swh.model import git_objects
from swh.model.hashutil import hash_to_bytehex, hash_to_hex
......@@ -210,6 +212,7 @@ class GitBareCooker(BaseVaultCooker):
subprocess.run(["git", "-C", self.gitdir, "repack", "-d"], check=True)
except subprocess.CalledProcessError:
logging.exception("git-repack failed with:")
sentry_sdk.capture_exception()
# Remove their non-packed originals
subprocess.run(["git", "-C", self.gitdir, "prune-packed"], check=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment