diff --git a/api/next.pb.txt b/api/next.pb.txt index b4a06c11b..f5e29bfe0 100755 --- a/api/next.pb.txt +++ b/api/next.pb.txt @@ -3390,6 +3390,13 @@ file { type: TYPE_STRING json_name: "snapshotter" } + field { + name: "filters" + number: 2 + label: LABEL_REPEATED + type: TYPE_STRING + json_name: "filters" + } } message_type { name: "ListSnapshotsResponse" diff --git a/api/services/snapshots/v1/snapshots.pb.go b/api/services/snapshots/v1/snapshots.pb.go index 1aa7585be..b5e34a06d 100644 --- a/api/services/snapshots/v1/snapshots.pb.go +++ b/api/services/snapshots/v1/snapshots.pb.go @@ -609,7 +609,18 @@ func (m *UpdateSnapshotResponse) XXX_DiscardUnknown() { var xxx_messageInfo_UpdateSnapshotResponse proto.InternalMessageInfo type ListSnapshotsRequest struct { - Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` + Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, images that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + Filters []string `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -796,70 +807,71 @@ func init() { } var fileDescriptor_cfc0ddf12791f168 = []byte{ - // 1007 bytes of a gzipped FileDescriptorProto + // 1022 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1a, 0x47, - 0x14, 0x67, 0x60, 0x8d, 0xe3, 0x87, 0xed, 0xd2, 0x09, 0x26, 0x68, 0x5b, 0xe1, 0x15, 0x87, 0xca, - 0xea, 0x61, 0x37, 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 0x0d, - 0xb4, 0xcb, 0x15, 0x60, 0x39, 0x30, 0x32, 0x2d, 0x8f, 0x1d, 0x58, 0x31, 0x89, 0xe3, 0x75, 0x66, - 0x91, 0x14, 0xfc, 0x5e, 0xac, 0x14, 0x3d, 0xc7, 0xb1, 0xd9, 0xe4, 0xd6, 0x30, 0x28, 0xae, 0xe5, - 0x04, 0x92, 0x8b, 0x71, 0xe0, 0x21, 0xd6, 0x8f, 0xcc, 0x17, 0x43, 0xb7, 0xa2, 0x38, 0xfe, 0x56, - 0x8c, 0x24, 0x34, 0xeb, 0x7b, 0x51, 0x86, 0xdb, 0x4f, 0x99, 0xc5, 0x66, 0x21, 0xe2, 0xbf, 0x51, - 0x50, 0xca, 0xee, 0x89, 0xd7, 0x53, 0x04, 0x0d, 0x28, 0xd2, 0xcf, 0x96, 0xe8, 0x95, 0x6c, 0x79, - 0x04, 0x4a, 0xdd, 0x76, 0xab, 0x42, 0xaa, 0xe5, 0xfc, 0x07, 0xe3, 0x55, 0xd9, 0xb1, 0xdd, 0xaa, - 0x29, 0x30, 0xb8, 0x08, 0x50, 0x69, 0x11, 0x8b, 0x91, 0xea, 0x4b, 0x8b, 0x65, 0x14, 0x0d, 0xad, - 0x25, 0xf2, 0xaa, 0xee, 0xd7, 0x61, 0x3d, 0xa8, 0xc3, 0xfa, 0x7e, 0x50, 0x87, 0x37, 0x6f, 0x5d, - 0xfc, 0xbe, 0x1a, 0xf9, 0xe1, 0x8f, 0x55, 0x64, 0x2e, 0x48, 0x5c, 0x81, 0x71, 0x23, 0xed, 0x66, - 0x35, 0x30, 0x32, 0x37, 0x89, 0x11, 0x89, 0x2b, 0x30, 0xbc, 0xdd, 0x8b, 0x6e, 0x5c, 0x44, 0x37, - 0x3f, 0xfe, 0x1c, 0x5c, 0xa9, 0x59, 0x07, 0xf3, 0x39, 0xa4, 0xae, 0x06, 0x53, 0x26, 0xd7, 0x27, - 0xa0, 0xd8, 0xee, 0x89, 0x27, 0x8c, 0x24, 0xc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xe9, 0x08, + 0x57, 0xae, 0x7d, 0xe5, 0x6e, 0x70, 0x03, 0xe1, 0xec, 0x18, 0xe2, 0x5e, 0x32, 0xd0, 0x83, 0x90, + 0x97, 0x9f, 0x92, 0xb9, 0x56, 0xf3, 0x65, 0xf6, 0x48, 0x67, 0xd0, 0xde, 0x63, 0x20, 0x08, 0xf4, + 0xc4, 0x67, 0xc3, 0xff, 0x42, 0x77, 0x41, 0x66, 0x3d, 0x35, 0x48, 0x66, 0x26, 0x5c, 0xa4, 0x41, + 0x32, 0x33, 0xb1, 0x65, 0x7f, 0x0b, 0x71, 0xaf, 0x6b, 0x05, 0x89, 0x68, 0x62, 0x67, 0x56, 0x36, + 0x66, 0x37, 0x14, 0xce, 0xfb, 0x20, 0xb3, 0x16, 0x84, 0x02, 0x90, 0x9f, 0xd4, 0xfe, 0x94, 0x07, + 0x33, 0xdb, 0x79, 0x8e, 0xef, 0x4a, 0xe8, 0x14, 0x16, 0x78, 0x7b, 0x41, 0x5a, 0x00, 0xf6, 0x23, + 0xbd, 0x4c, 0xd1, 0x03, 0xef, 0xf7, 0x7c, 0x6d, 0x7d, 0x75, 0xf1, 0x26, 0x17, 0xf9, 0xed, 0x4d, + 0x2e, 0xf2, 0xfd, 0x65, 0x4e, 0xba, 0xb8, 0xcc, 0x49, 0xbf, 0x5e, 0xe6, 0xa4, 0x3f, 0x2f, 0x73, + 0xd2, 0x8b, 0xed, 0xf0, 0x7f, 0xa3, 0x9b, 0x83, 0xc9, 0xf3, 0xc8, 0x49, 0x9c, 0x1f, 0xa5, 0x8f, + 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x8b, 0xa6, 0xa4, 0xde, 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1787,6 +1799,21 @@ func (m *ListSnapshotsRequest) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) i += copy(dAtA[i:], m.Snapshotter) } + if len(m.Filters) > 0 { + for _, s := range m.Filters { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -2204,6 +2231,12 @@ func (m *ListSnapshotsRequest) Size() (n int) { if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } + if len(m.Filters) > 0 { + for _, s := range m.Filters { + l = len(s) + n += 1 + l + sovSnapshots(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -2487,6 +2520,7 @@ func (this *ListSnapshotsRequest) String() string { } s := strings.Join([]string{`&ListSnapshotsRequest{`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, + `Filters:` + fmt.Sprintf("%v", this.Filters) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -4704,6 +4738,38 @@ func (m *ListSnapshotsRequest) Unmarshal(dAtA []byte) error { } m.Snapshotter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshots + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSnapshots + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSnapshots + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) diff --git a/api/services/snapshots/v1/snapshots.proto b/api/services/snapshots/v1/snapshots.proto index 0e62add3b..082c96a60 100644 --- a/api/services/snapshots/v1/snapshots.proto +++ b/api/services/snapshots/v1/snapshots.proto @@ -133,6 +133,18 @@ message UpdateSnapshotResponse { message ListSnapshotsRequest{ string snapshotter = 1; + + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, images that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + repeated string filters = 2; } message ListSnapshotsResponse { diff --git a/metadata/snapshot.go b/metadata/snapshot.go index 4c38b41d7..1ed42c31f 100644 --- a/metadata/snapshot.go +++ b/metadata/snapshot.go @@ -530,7 +530,7 @@ type infoPair struct { info snapshots.Info } -func (s *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +func (s *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error, filters ...string) error { ns, err := namespaces.NamespaceRequired(ctx) if err != nil { return err diff --git a/snapshots/btrfs/btrfs.go b/snapshots/btrfs/btrfs.go index 5abe9c064..6fd80172b 100644 --- a/snapshots/btrfs/btrfs.go +++ b/snapshots/btrfs/btrfs.go @@ -186,7 +186,7 @@ func (b *snapshotter) usage(ctx context.Context, key string) (snapshots.Usage, e } // Walk the committed snapshots. -func (b *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +func (b *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error, filters ...string) error { ctx, t, err := b.ms.TransactionContext(ctx, false) if err != nil { return err diff --git a/snapshots/devmapper/snapshotter.go b/snapshots/devmapper/snapshotter.go index c6e0332fe..c1332897a 100644 --- a/snapshots/devmapper/snapshotter.go +++ b/snapshots/devmapper/snapshotter.go @@ -312,7 +312,7 @@ func (s *Snapshotter) removeDevice(ctx context.Context, key string) error { } // Walk iterates through all metadata Info for the stored snapshots and calls the provided function for each. -func (s *Snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +func (s *Snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error, filters ...string) error { log.G(ctx).Debug("walk") return s.withTransaction(ctx, false, func(ctx context.Context) error { return storage.WalkInfo(ctx, fn) diff --git a/snapshots/lcow/lcow.go b/snapshots/lcow/lcow.go index 239c7e7d0..0c08d5c69 100644 --- a/snapshots/lcow/lcow.go +++ b/snapshots/lcow/lcow.go @@ -241,7 +241,7 @@ func (s *snapshotter) Remove(ctx context.Context, key string) error { } // Walk the committed snapshots. -func (s *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +func (s *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error, filters ...string) error { log.G(ctx).Debug("Starting Walk") ctx, t, err := s.ms.TransactionContext(ctx, false) if err != nil { diff --git a/snapshots/native/native.go b/snapshots/native/native.go index aac26d37b..cfe443c5a 100644 --- a/snapshots/native/native.go +++ b/snapshots/native/native.go @@ -232,7 +232,7 @@ func (o *snapshotter) Remove(ctx context.Context, key string) (err error) { } // Walk the committed snapshots. -func (o *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +func (o *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error, filters ...string) error { ctx, t, err := o.ms.TransactionContext(ctx, false) if err != nil { return err diff --git a/snapshots/overlay/overlay.go b/snapshots/overlay/overlay.go index 9ad82c7f3..c99c47554 100644 --- a/snapshots/overlay/overlay.go +++ b/snapshots/overlay/overlay.go @@ -283,7 +283,7 @@ func (o *snapshotter) Remove(ctx context.Context, key string) (err error) { } // Walk the committed snapshots. -func (o *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +func (o *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error, filters ...string) error { ctx, t, err := o.ms.TransactionContext(ctx, false) if err != nil { return err diff --git a/snapshots/proxy/proxy.go b/snapshots/proxy/proxy.go index 1e8c2634c..080067ec4 100644 --- a/snapshots/proxy/proxy.go +++ b/snapshots/proxy/proxy.go @@ -153,7 +153,7 @@ func (p *proxySnapshotter) Remove(ctx context.Context, key string) error { return errdefs.FromGRPC(err) } -func (p *proxySnapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +func (p *proxySnapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error, filters ...string) error { sc, err := p.client.List(ctx, &snapshotsapi.ListSnapshotsRequest{ Snapshotter: p.snapshotterName, }) diff --git a/snapshots/snapshotter.go b/snapshots/snapshotter.go index 514538f7e..c7470a594 100644 --- a/snapshots/snapshotter.go +++ b/snapshots/snapshotter.go @@ -315,8 +315,11 @@ type Snapshotter interface { Remove(ctx context.Context, key string) error // Walk all snapshots in the snapshotter. For each snapshot in the - // snapshotter, the function will be called. - Walk(ctx context.Context, fn func(context.Context, Info) error) error + // snapshotter, the function will be called, unless filters were used. + // Zero or more filters may be provided as strings. Only events that match + // *any* of the provided filters will be sent on the channel. The filters use + // the standard containerd filters package syntax. + Walk(ctx context.Context, fn func(context.Context, Info) error, filters ...string) error // Close releases the internal resources. // diff --git a/snapshots/windows/windows.go b/snapshots/windows/windows.go index 2378b617d..74573405e 100644 --- a/snapshots/windows/windows.go +++ b/snapshots/windows/windows.go @@ -238,7 +238,7 @@ func (s *snapshotter) Remove(ctx context.Context, key string) error { } // Walk the committed snapshots. -func (s *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +func (s *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error, filters ...string) error { ctx, t, err := s.ms.TransactionContext(ctx, false) if err != nil { return err