Skip to content

Commit 395e72c

Browse files
committed
fix: log context for future debugging
Signed-off-by: Chris Goller <[email protected]>
1 parent 16e9893 commit 395e72c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cache/refs.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,13 @@ func (sr *immutableRef) prepareRemoteSnapshotsStargzMode(ctx context.Context, s
11031103
for k := range tmpLabels {
11041104
info.Labels[k] = ""
11051105
}
1106+
} else {
1107+
// We are logging here to track to try to debug when and why labels are nil.
1108+
// Log can be removed when not happening anymore.
1109+
bklog.G(ctx).
1110+
WithField("snapshotID", snapshotID).
1111+
WithField("name", info.Name).
1112+
Debug("snapshots exist but labels are nil")
11061113
}
11071114
if _, err := r.cm.Snapshotter.Update(ctx, info, tmpFields...); err != nil {
11081115
bklog.G(ctx).Warn(errors.Wrapf(err,

0 commit comments

Comments
 (0)