Skip to content

feat: log whether blob transfer was a noop during repository import

João Pereira requested to merge blob-transfer-noop-log into master

In !944 (merged) we added a log entry to denote when a blob already exists on the destination during an import blob transfer attempt. However, while working on metrics and dashboards, I realized this means that the two important and related metrics:

  1. How long it took to do the transfer
  2. If any blob was copied or not during the transfer

... are in separate log entries. (1) is logged by the importer as part of the blob transfer complete entry, (2) is logged by the blob transfer service using the blob already present, no need to transfer entry.

Having these two details in separate log messages means that we can't related them while drawing graphs in Kibana.

This MR uses the existing (but so far unused 🤔) distribution.ErrBlobExists error to signal the blob transfer service caller that a blob was already present and therefore the transfer call was a noop. We can then log this along with the blob size in a single log entry.

Merge request reports