Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2022-07-25 22:09:48 +0300
committerStan Hu <stanhu@gmail.com>2022-07-25 22:09:48 +0300
commit3084276ceb389521a20ed9caf7f8be5f67887171 (patch)
tree39777c65df9b0658cd4fc64cce3133237432cad6 /internal/vfs
parent4d2b5871703931acb597b414d26b2e7835bad5b5 (diff)
parente34ed022accdff134d7464de03069670c0e18aaf (diff)
Merge branch 'sh-log-zfs-corruption-error' into 'master'
chore: log ZIP archive corruption error See merge request gitlab-org/gitlab-pages!821
Diffstat (limited to 'internal/vfs')
-rw-r--r--internal/vfs/zip/vfs.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/vfs/zip/vfs.go b/internal/vfs/zip/vfs.go
index b87b7822..6b42e627 100644
--- a/internal/vfs/zip/vfs.go
+++ b/internal/vfs/zip/vfs.go
@@ -188,7 +188,7 @@ func (zfs *zipVFS) findOrCreateArchive(key string) (*zipArchive, error) {
archive, expiry, found := zfs.cache.GetWithExpiration(key)
if found {
- status, _ := archive.(*zipArchive).openStatus()
+ status, zipErr := archive.(*zipArchive).openStatus()
switch status {
case archiveOpening:
metrics.ZipCacheRequests.WithLabelValues("archive", "hit-opening").Inc()
@@ -209,7 +209,7 @@ func (zfs *zipVFS) findOrCreateArchive(key string) (*zipArchive, error) {
case archiveCorrupted:
// this means that archive is likely changed
// we should invalidate it immediately
- log.WithFields(log.Fields{
+ log.WithError(zipErr).WithFields(log.Fields{
"archive_key": key,
}).Error("archive corrupted")
metrics.ZipCacheRequests.WithLabelValues("archive", "corrupted").Inc()