diff options
author | Stan Hu <stanhu@gmail.com> | 2022-07-25 22:09:48 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2022-07-25 22:09:48 +0300 |
commit | 3084276ceb389521a20ed9caf7f8be5f67887171 (patch) | |
tree | 39777c65df9b0658cd4fc64cce3133237432cad6 /internal | |
parent | 4d2b5871703931acb597b414d26b2e7835bad5b5 (diff) | |
parent | e34ed022accdff134d7464de03069670c0e18aaf (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')
-rw-r--r-- | internal/vfs/zip/vfs.go | 4 |
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() |