Page MenuHomeSoftware Heritage

D7583.diff
No OneTemporary

D7583.diff

diff --git a/requirements.txt b/requirements.txt
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,7 @@
click
+fastimport
flask
psycopg2
python-dateutil
-fastimport
+sentry-sdk
typing-extensions
diff --git a/swh/vault/cookers/base.py b/swh/vault/cookers/base.py
--- a/swh/vault/cookers/base.py
+++ b/swh/vault/cookers/base.py
@@ -10,6 +10,7 @@
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 @@
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)
diff --git a/swh/vault/cookers/git_bare.py b/swh/vault/cookers/git_bare.py
--- a/swh/vault/cookers/git_bare.py
+++ b/swh/vault/cookers/git_bare.py
@@ -42,6 +42,8 @@
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 @@
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)

File Metadata

Mime Type
text/plain
Expires
Dec 21 2024, 2:15 AM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3213720

Event Timeline