From 4ce3d446a52e617a7b1676d999857f92d807f07c Mon Sep 17 00:00:00 2001 From: Ankita Thomas Date: Thu, 20 Jun 2024 11:19:53 -0400 Subject: [PATCH 01/29] [OCPBUGS-25341]: perform operator apiService certificate validity checks directly (#3217) * perform operator apiService certificate validity checks directly Signed-off-by: Ankita Thomas * use sets to track certs to install, revert to checking for installPlan timeouts after API availability checks, add service FQDN to list of hostnames. Signed-off-by: Ankita Thomas --------- Signed-off-by: Ankita Thomas Upstream-repository: operator-lifecycle-manager Upstream-commit: 908da0c05363da40ad09ab774d9904b22aca7869 From 6e434b6c37bfe10edc4cf99a3b1e82be5088baf2 Mon Sep 17 00:00:00 2001 From: Per Goncalves da Silva Date: Tue, 2 Jul 2024 15:35:05 +0200 Subject: [PATCH 02/29] update ginkgo opts (#3337) Signed-off-by: Per Goncalves da Silva Co-authored-by: Per Goncalves da Silva Upstream-repository: operator-lifecycle-manager Upstream-commit: 8615a10dcce46dadaa627916c76fbbf6dc47ad37 --- staging/operator-lifecycle-manager/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/operator-lifecycle-manager/Makefile b/staging/operator-lifecycle-manager/Makefile index 8e6e295892..effe9b744c 100644 --- a/staging/operator-lifecycle-manager/Makefile +++ b/staging/operator-lifecycle-manager/Makefile @@ -251,7 +251,7 @@ GINKGO_OPTS += -v -randomize-suites -race -trace $(if $(E2E_FLAKE_ATTEMPTS),--fl .PHONY: e2e e2e: #HELP Run e2e tests against a cluster running OLM (params: $E2E_TEST_NS (operator), $E2E_INSTALL_NS (operator-lifecycle-manager), $E2E_CATALOG_NS (operator-lifecycle-manager), $E2E_TIMEOUT (90m), $E2E_FLAKE_ATTEMPTS (1), $TEST(undefined)) - $(GO_TEST_ENV) $(GINKGO) -timeout $(E2E_TIMEOUT) $(GINKGO_OPTS) ./test/e2e -- -namespace=$(E2E_TEST_NS) -olmNamespace=$(E2E_INSTALL_NS) -catalogNamespace=$(E2E_CATALOG_NS) $(E2E_OPTS) + $(GO_TEST_ENV) $(GINKGO) -timeout $(E2E_TIMEOUT) $(GINKGO_OPTS) $(E2E_GINKGO_OPTS) ./test/e2e -- -namespace=$(E2E_TEST_NS) -olmNamespace=$(E2E_INSTALL_NS) -catalogNamespace=$(E2E_CATALOG_NS) $(E2E_OPTS) .PHONY: e2e-local e2e-local: e2e-build kind-create deploy e2e From 71eb4544f377a163df9a9a15670fa64f87129a3c Mon Sep 17 00:00:00 2001 From: Jordan Keister Date: Tue, 2 Jul 2024 08:35:21 -0500 Subject: [PATCH 03/29] bump operator-registry to v1.44.0 (#3335) Signed-off-by: Jordan Keister Upstream-repository: operator-lifecycle-manager Upstream-commit: 2a24a0fe2dc97231e664672912a5b93936d5fcdb --- go.mod | 14 +- go.sum | 24 +- staging/operator-lifecycle-manager/go.mod | 14 +- staging/operator-lifecycle-manager/go.sum | 28 +- .../archive/compression/compression.go | 2 +- .../containerd/containerd/archive/tar.go | 2 +- .../containerd/containerd/content/helpers.go | 4 +- .../containerd/content/local/locks.go | 2 +- .../containerd/content/local/readerat.go | 2 +- .../containerd/content/local/store.go | 4 +- .../containerd/content/local/writer.go | 4 +- .../{errors.go => errdefs_deprecated.go} | 58 +- .../containerd/containerd/errdefs/grpc.go | 147 --- .../containerd/containerd/filters/filter.go | 2 +- .../containerd/containerd/filters/parser.go | 2 +- .../containerd/identifiers/validate.go | 2 +- .../containerd/containerd/images/handlers.go | 2 +- .../containerd/containerd/images/image.go | 7 +- .../containerd/images/mediatypes.go | 2 +- .../containerd/containerd/labels/validate.go | 2 +- .../containerd/metadata/containers.go | 2 +- .../containerd/containerd/metadata/content.go | 4 +- .../containerd/containerd/metadata/db.go | 2 +- .../containerd/containerd/metadata/gc.go | 2 +- .../containerd/containerd/metadata/images.go | 2 +- .../containerd/containerd/metadata/leases.go | 2 +- .../containerd/metadata/namespaces.go | 2 +- .../containerd/containerd/metadata/sandbox.go | 2 +- .../containerd/metadata/snapshot.go | 4 +- .../containerd/mount/mount_windows.go | 2 +- .../containerd/containerd/mount/temp.go | 2 +- .../containerd/namespaces/context.go | 2 +- .../containerd/platforms/cpuinfo.go | 2 +- .../containerd/platforms/cpuinfo_linux.go | 2 +- .../containerd/platforms/cpuinfo_other.go | 2 +- .../containerd/platforms/platforms.go | 2 +- .../containerd/remotes/docker/auth/fetch.go | 2 +- .../containerd/remotes/docker/authorizer.go | 4 +- .../containerd/remotes/docker/converter.go | 2 +- .../remotes/docker/converter_fuzz.go | 2 +- .../containerd/remotes/docker/fetcher.go | 4 +- .../containerd/remotes/docker/handler.go | 2 +- .../remotes/docker/httpreadseeker.go | 4 +- .../containerd/remotes/docker/pusher.go | 4 +- .../containerd/remotes/docker/resolver.go | 4 +- .../remotes/docker/schema1/converter.go | 4 +- .../containerd/remotes/docker/status.go | 2 +- .../containerd/containerd/remotes/handlers.go | 4 +- .../containerd/sandbox/controller.go | 4 +- .../containerd/containerd/sandbox/store.go | 2 +- .../containerd/containerd/version/version.go | 2 +- .../image/v5/docker/docker_image.go | 9 + .../containers/image/v5/version/version.go | 2 +- vendor/github.com/docker/cli/AUTHORS | 20 + vendor/github.com/docker/cli/NOTICE | 2 +- .../docker/cli/cli/config/config.go | 69 +- .../cli/cli/config/credentials/file_store.go | 19 +- .../docker/docker/pkg/homedir/homedir.go | 28 - .../docker/pkg/homedir/homedir_linux.go | 105 -- .../docker/pkg/homedir/homedir_others.go | 32 - vendor/golang.org/x/mod/modfile/rule.go | 106 +- vendor/golang.org/x/mod/modfile/work.go | 52 +- vendor/golang.org/x/mod/module/module.go | 2 + .../protoc-gen-go/internal_gengo/reflect.go | 6 +- .../internal_gengo/well_known_types.go | 40 +- .../protobuf/compiler/protogen/protogen.go | 2 +- .../protobuf/encoding/protojson/decode.go | 4 +- .../protobuf/encoding/prototext/decode.go | 4 +- .../protobuf/internal/encoding/json/decode.go | 2 +- .../protobuf/internal/encoding/text/decode.go | 2 +- .../protobuf/internal/errors/errors.go | 6 +- .../protobuf/internal/filedesc/desc.go | 4 + .../protobuf/internal/filedesc/desc_init.go | 2 +- .../protobuf/internal/filedesc/desc_lazy.go | 5 + .../protobuf/internal/filetype/build.go | 4 +- .../protobuf/internal/genid/descriptor_gen.go | 3 + .../protobuf/internal/impl/api_export.go | 6 +- .../protobuf/internal/impl/checkinit.go | 2 +- .../protobuf/internal/impl/codec_extension.go | 22 + .../internal/impl/codec_messageset.go | 22 + .../protobuf/internal/impl/convert.go | 2 +- .../protobuf/internal/impl/convert_list.go | 2 +- .../protobuf/internal/impl/convert_map.go | 2 +- .../protobuf/internal/impl/encode.go | 48 +- .../protobuf/internal/impl/extension.go | 8 +- .../protobuf/internal/impl/legacy_enum.go | 2 +- .../protobuf/internal/impl/legacy_message.go | 4 +- .../protobuf/internal/impl/message.go | 8 +- .../protobuf/internal/impl/message_reflect.go | 14 +- .../internal/impl/message_reflect_gen.go | 4 +- .../protobuf/internal/impl/pointer_reflect.go | 6 +- .../protobuf/internal/impl/pointer_unsafe.go | 4 +- .../protobuf/internal/msgfmt/format.go | 4 +- .../protobuf/internal/order/range.go | 4 +- .../protobuf/internal/version/version.go | 2 +- .../protobuf/proto/extension.go | 6 +- .../reflect/protodesc/desc_resolve.go | 5 + .../reflect/protodesc/desc_validate.go | 12 - .../reflect/protoreflect/source_gen.go | 2 + .../protobuf/reflect/protoreflect/type.go | 6 +- .../reflect/protoreflect/value_pure.go | 14 +- .../reflect/protoreflect/value_union.go | 14 +- .../protoreflect/value_unsafe_go120.go | 6 +- .../protoreflect/value_unsafe_go121.go | 8 +- .../reflect/protoregistry/registry.go | 14 +- .../types/descriptorpb/descriptor.pb.go | 995 +++++++++--------- .../protobuf/types/dynamicpb/dynamic.go | 16 +- .../types/gofeaturespb/go_features.pb.go | 44 +- .../protobuf/types/known/anypb/any.pb.go | 4 +- .../types/known/durationpb/duration.pb.go | 4 +- .../protobuf/types/known/emptypb/empty.pb.go | 4 +- .../types/known/fieldmaskpb/field_mask.pb.go | 4 +- .../types/known/structpb/struct.pb.go | 50 +- .../types/known/timestamppb/timestamp.pb.go | 4 +- .../types/known/wrapperspb/wrappers.pb.go | 20 +- .../protobuf/types/pluginpb/plugin.pb.go | 10 +- vendor/modules.txt | 17 +- 117 files changed, 1205 insertions(+), 1156 deletions(-) rename vendor/github.com/containerd/containerd/errdefs/{errors.go => errdefs_deprecated.go} (60%) delete mode 100644 vendor/github.com/containerd/containerd/errdefs/grpc.go delete mode 100644 vendor/github.com/docker/docker/pkg/homedir/homedir.go delete mode 100644 vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go delete mode 100644 vendor/github.com/docker/docker/pkg/homedir/homedir_others.go diff --git a/go.mod b/go.mod index 2512d54e18..303112c0c8 100644 --- a/go.mod +++ b/go.mod @@ -17,12 +17,12 @@ require ( github.com/openshift/api v3.9.0+incompatible github.com/operator-framework/api v0.26.0 github.com/operator-framework/operator-lifecycle-manager v0.0.0-00010101000000-000000000000 - github.com/operator-framework/operator-registry v1.43.1 + github.com/operator-framework/operator-registry v1.44.0 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 - google.golang.org/protobuf v1.34.1 + google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 helm.sh/helm/v3 v3.14.4 k8s.io/api v0.30.2 @@ -69,14 +69,14 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect github.com/containerd/cgroups/v3 v3.0.3 // indirect - github.com/containerd/containerd v1.7.17 // indirect + github.com/containerd/containerd v1.7.18 // indirect github.com/containerd/continuity v0.4.2 // indirect github.com/containerd/errdefs v0.1.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/ttrpc v1.2.4 // indirect github.com/containerd/typeurl/v2 v2.1.1 // indirect - github.com/containers/common v0.59.0 // indirect - github.com/containers/image/v5 v5.31.0 // indirect + github.com/containers/common v0.59.1 // indirect + github.com/containers/image/v5 v5.31.1 // indirect github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect github.com/containers/ocicrypt v1.1.10 // indirect github.com/containers/storage v1.54.0 // indirect @@ -86,7 +86,7 @@ require ( github.com/cyphar/filepath-securejoin v0.2.5 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/cli v26.1.3+incompatible // indirect + github.com/docker/cli v27.0.2+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker v26.1.3+incompatible // indirect github.com/docker/docker-credential-helpers v0.8.1 // indirect @@ -226,7 +226,7 @@ require ( golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/mod v0.18.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.20.0 // indirect golang.org/x/sync v0.7.0 // indirect diff --git a/go.sum b/go.sum index 9b447a5ae2..39e8c5e852 100644 --- a/go.sum +++ b/go.sum @@ -1424,8 +1424,8 @@ github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/P github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= -github.com/containerd/containerd v1.7.17 h1:KjNnn0+tAVQHAoaWRjmdak9WlvnFR/8rU1CHHy8Rm2A= -github.com/containerd/containerd v1.7.17/go.mod h1:vK+hhT4TIv2uejlcDlbVIc8+h/BqtKLIyNrtCZol8lI= +github.com/containerd/containerd v1.7.18 h1:jqjZTQNfXGoEaZdW1WwPU0RqSn1Bm2Ay/KJPUuO8nao= +github.com/containerd/containerd v1.7.18/go.mod h1:IYEk9/IO6wAPUz2bCMVUbsfXjzw5UNP5fLz4PsUygQ4= github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM= github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= @@ -1436,10 +1436,10 @@ github.com/containerd/ttrpc v1.2.4 h1:eQCQK4h9dxDmpOb9QOOMh2NHTfzroH1IkmHiKZi05O github.com/containerd/ttrpc v1.2.4/go.mod h1:ojvb8SJBSch0XkqNO0L0YX/5NxR3UnVk2LzFKBK0upc= github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= -github.com/containers/common v0.59.0 h1:fy9Jz0B7Qs1C030bm73YJtVddaiFSZD3558EV1tgN2g= -github.com/containers/common v0.59.0/go.mod h1:53VicJCZ2AD0O+Br7VVoyrS7viXF4YmwlTIocWUT8XE= -github.com/containers/image/v5 v5.31.0 h1:eDFVlz5XaYICxe9dXpf23htEKvyosgkl62mJlIATXE4= -github.com/containers/image/v5 v5.31.0/go.mod h1:5QfOqSackPkSbF7Qxc1DnVNnPJKQ+KWLkfEfDpK590Q= +github.com/containers/common v0.59.1 h1:7VkmJN3YvD0jLFwaUjLHSRJ98JLffydiyOJjYr0dUTo= +github.com/containers/common v0.59.1/go.mod h1:53VicJCZ2AD0O+Br7VVoyrS7viXF4YmwlTIocWUT8XE= +github.com/containers/image/v5 v5.31.1 h1:3x9soI6Biml/GiDLpkSmKrkRSwVGctxu/vONpoUdklA= +github.com/containers/image/v5 v5.31.1/go.mod h1:5QfOqSackPkSbF7Qxc1DnVNnPJKQ+KWLkfEfDpK590Q= github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA= github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY= github.com/containers/ocicrypt v1.1.10 h1:r7UR6o8+lyhkEywetubUUgcKFjOWOaWz8cEBrCPX0ic= @@ -1474,8 +1474,8 @@ github.com/distribution/distribution/v3 v3.0.0-alpha.1 h1:jn7I1gvjOvmLztH1+1cLiU github.com/distribution/distribution/v3 v3.0.0-alpha.1/go.mod h1:LCp4JZp1ZalYg0W/TN05jarCQu+h4w7xc7ZfQF4Y/cY= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v26.1.3+incompatible h1:bUpXT/N0kDE3VUHI2r5VMsYQgi38kYuoC0oL9yt3lqc= -github.com/docker/cli v26.1.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v27.0.2+incompatible h1:IgWU3lWqAYNibtcxgl/PY4TB0eCmK1ZpNUZVJfenDQs= +github.com/docker/cli v27.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v26.1.3+incompatible h1:lLCzRbrVZrljpVNobJu1J2FHk8V0s4BawoZippkc+xo= @@ -2385,8 +2385,8 @@ golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -3098,8 +3098,8 @@ google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/staging/operator-lifecycle-manager/go.mod b/staging/operator-lifecycle-manager/go.mod index d2f57cba6d..aedbbb60a2 100644 --- a/staging/operator-lifecycle-manager/go.mod +++ b/staging/operator-lifecycle-manager/go.mod @@ -24,7 +24,7 @@ require ( github.com/openshift/api v3.9.0+incompatible github.com/openshift/client-go v0.0.0-20220525160904-9e1acff93e4a github.com/operator-framework/api v0.26.0 - github.com/operator-framework/operator-registry v1.43.1 + github.com/operator-framework/operator-registry v1.44.0 github.com/otiai10/copy v1.14.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.19.0 @@ -67,20 +67,20 @@ require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/containerd/cgroups/v3 v3.0.3 // indirect - github.com/containerd/containerd v1.7.17 // indirect + github.com/containerd/containerd v1.7.18 // indirect github.com/containerd/continuity v0.4.2 // indirect github.com/containerd/errdefs v0.1.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/ttrpc v1.2.4 // indirect github.com/containerd/typeurl/v2 v2.1.1 // indirect - github.com/containers/common v0.59.0 // indirect - github.com/containers/image/v5 v5.31.0 // indirect + github.com/containers/common v0.59.1 // indirect + github.com/containers/image/v5 v5.31.1 // indirect github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect github.com/containers/ocicrypt v1.1.10 // indirect github.com/containers/storage v1.54.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/docker/cli v26.1.3+incompatible // indirect + github.com/docker/cli v27.0.2+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker v26.1.3+incompatible // indirect github.com/docker/docker-credential-helpers v0.8.1 // indirect @@ -153,7 +153,7 @@ require ( go.uber.org/zap v1.26.0 // indirect golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/mod v0.18.0 // indirect golang.org/x/oauth2 v0.20.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/term v0.21.0 // indirect @@ -163,7 +163,7 @@ require ( google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/staging/operator-lifecycle-manager/go.sum b/staging/operator-lifecycle-manager/go.sum index 4bb8f0d2da..41f73ec445 100644 --- a/staging/operator-lifecycle-manager/go.sum +++ b/staging/operator-lifecycle-manager/go.sum @@ -1387,8 +1387,8 @@ github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/P github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= -github.com/containerd/containerd v1.7.17 h1:KjNnn0+tAVQHAoaWRjmdak9WlvnFR/8rU1CHHy8Rm2A= -github.com/containerd/containerd v1.7.17/go.mod h1:vK+hhT4TIv2uejlcDlbVIc8+h/BqtKLIyNrtCZol8lI= +github.com/containerd/containerd v1.7.18 h1:jqjZTQNfXGoEaZdW1WwPU0RqSn1Bm2Ay/KJPUuO8nao= +github.com/containerd/containerd v1.7.18/go.mod h1:IYEk9/IO6wAPUz2bCMVUbsfXjzw5UNP5fLz4PsUygQ4= github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM= github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= @@ -1399,10 +1399,10 @@ github.com/containerd/ttrpc v1.2.4 h1:eQCQK4h9dxDmpOb9QOOMh2NHTfzroH1IkmHiKZi05O github.com/containerd/ttrpc v1.2.4/go.mod h1:ojvb8SJBSch0XkqNO0L0YX/5NxR3UnVk2LzFKBK0upc= github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= -github.com/containers/common v0.59.0 h1:fy9Jz0B7Qs1C030bm73YJtVddaiFSZD3558EV1tgN2g= -github.com/containers/common v0.59.0/go.mod h1:53VicJCZ2AD0O+Br7VVoyrS7viXF4YmwlTIocWUT8XE= -github.com/containers/image/v5 v5.31.0 h1:eDFVlz5XaYICxe9dXpf23htEKvyosgkl62mJlIATXE4= -github.com/containers/image/v5 v5.31.0/go.mod h1:5QfOqSackPkSbF7Qxc1DnVNnPJKQ+KWLkfEfDpK590Q= +github.com/containers/common v0.59.1 h1:7VkmJN3YvD0jLFwaUjLHSRJ98JLffydiyOJjYr0dUTo= +github.com/containers/common v0.59.1/go.mod h1:53VicJCZ2AD0O+Br7VVoyrS7viXF4YmwlTIocWUT8XE= +github.com/containers/image/v5 v5.31.1 h1:3x9soI6Biml/GiDLpkSmKrkRSwVGctxu/vONpoUdklA= +github.com/containers/image/v5 v5.31.1/go.mod h1:5QfOqSackPkSbF7Qxc1DnVNnPJKQ+KWLkfEfDpK590Q= github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA= github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY= github.com/containers/ocicrypt v1.1.10 h1:r7UR6o8+lyhkEywetubUUgcKFjOWOaWz8cEBrCPX0ic= @@ -1425,8 +1425,8 @@ github.com/distribution/distribution/v3 v3.0.0-alpha.1 h1:jn7I1gvjOvmLztH1+1cLiU github.com/distribution/distribution/v3 v3.0.0-alpha.1/go.mod h1:LCp4JZp1ZalYg0W/TN05jarCQu+h4w7xc7ZfQF4Y/cY= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v26.1.3+incompatible h1:bUpXT/N0kDE3VUHI2r5VMsYQgi38kYuoC0oL9yt3lqc= -github.com/docker/cli v26.1.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v27.0.2+incompatible h1:IgWU3lWqAYNibtcxgl/PY4TB0eCmK1ZpNUZVJfenDQs= +github.com/docker/cli v27.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v26.1.3+incompatible h1:lLCzRbrVZrljpVNobJu1J2FHk8V0s4BawoZippkc+xo= @@ -1819,8 +1819,8 @@ github.com/openshift/client-go v0.0.0-20221019143426-16aed247da5c h1:CV76yFOTXmq github.com/openshift/client-go v0.0.0-20221019143426-16aed247da5c/go.mod h1:lFMO8mLHXWFzSdYvGNo8ivF9SfF6zInA8ZGw4phRnUE= github.com/operator-framework/api v0.26.0 h1:YVntU2NkVl5zSLLwK5kFcH6P3oSvN9QDgTsY9mb4yUM= github.com/operator-framework/api v0.26.0/go.mod h1:3IxOwzVUeGxYlzfwKCcfCyS+q3EEhWA/4kv7UehbeyM= -github.com/operator-framework/operator-registry v1.43.1 h1:ACahVHGIL/hINBXd3RKWqSFR5SmSM6L5/n9xXqpR51s= -github.com/operator-framework/operator-registry v1.43.1/go.mod h1:qhssAIYWXDIW+nTg0C5i4iD9zpMtiXtfXqGUuUmGz5c= +github.com/operator-framework/operator-registry v1.44.0 h1:NW5/xHYR77J2EUYm+6iBER1WNGLNS8gM+G5GBQWqTTs= +github.com/operator-framework/operator-registry v1.44.0/go.mod h1:55I4XJ//Erir98Mm9OlD8UURWE0HQgL/zlvpGF+gkig= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= @@ -2102,8 +2102,8 @@ golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2782,8 +2782,8 @@ google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/vendor/github.com/containerd/containerd/archive/compression/compression.go b/vendor/github.com/containerd/containerd/archive/compression/compression.go index 31bbe41246..23ddfab1a6 100644 --- a/vendor/github.com/containerd/containerd/archive/compression/compression.go +++ b/vendor/github.com/containerd/containerd/archive/compression/compression.go @@ -29,7 +29,7 @@ import ( "strconv" "sync" - "github.com/containerd/containerd/log" + "github.com/containerd/log" "github.com/klauspost/compress/zstd" ) diff --git a/vendor/github.com/containerd/containerd/archive/tar.go b/vendor/github.com/containerd/containerd/archive/tar.go index 28b623dcf2..cdc7e14bfd 100644 --- a/vendor/github.com/containerd/containerd/archive/tar.go +++ b/vendor/github.com/containerd/containerd/archive/tar.go @@ -30,10 +30,10 @@ import ( "time" "github.com/containerd/containerd/archive/tarheader" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/pkg/epoch" "github.com/containerd/containerd/pkg/userns" "github.com/containerd/continuity/fs" + "github.com/containerd/log" ) var bufPool = &sync.Pool{ diff --git a/vendor/github.com/containerd/containerd/content/helpers.go b/vendor/github.com/containerd/containerd/content/helpers.go index d3a82cb6f7..f4763847d3 100644 --- a/vendor/github.com/containerd/containerd/content/helpers.go +++ b/vendor/github.com/containerd/containerd/content/helpers.go @@ -24,9 +24,9 @@ import ( "sync" "time" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/pkg/randutil" + "github.com/containerd/errdefs" + "github.com/containerd/log" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/vendor/github.com/containerd/containerd/content/local/locks.go b/vendor/github.com/containerd/containerd/content/local/locks.go index 1e59f39b30..4caffcc02f 100644 --- a/vendor/github.com/containerd/containerd/content/local/locks.go +++ b/vendor/github.com/containerd/containerd/content/local/locks.go @@ -21,7 +21,7 @@ import ( "sync" "time" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" ) // Handles locking references diff --git a/vendor/github.com/containerd/containerd/content/local/readerat.go b/vendor/github.com/containerd/containerd/content/local/readerat.go index 899e85c0ba..7918844b19 100644 --- a/vendor/github.com/containerd/containerd/content/local/readerat.go +++ b/vendor/github.com/containerd/containerd/content/local/readerat.go @@ -22,7 +22,7 @@ import ( "os" "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" ) // readerat implements io.ReaderAt in a completely stateless manner by opening diff --git a/vendor/github.com/containerd/containerd/content/local/store.go b/vendor/github.com/containerd/containerd/content/local/store.go index baae3565bb..feecec79fc 100644 --- a/vendor/github.com/containerd/containerd/content/local/store.go +++ b/vendor/github.com/containerd/containerd/content/local/store.go @@ -28,10 +28,10 @@ import ( "time" "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/filters" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/pkg/randutil" + "github.com/containerd/errdefs" + "github.com/containerd/log" "github.com/sirupsen/logrus" "github.com/opencontainers/go-digest" diff --git a/vendor/github.com/containerd/containerd/content/local/writer.go b/vendor/github.com/containerd/containerd/content/local/writer.go index b187e524cb..f82b131e16 100644 --- a/vendor/github.com/containerd/containerd/content/local/writer.go +++ b/vendor/github.com/containerd/containerd/content/local/writer.go @@ -27,8 +27,8 @@ import ( "time" "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/log" + "github.com/containerd/errdefs" + "github.com/containerd/log" "github.com/opencontainers/go-digest" ) diff --git a/vendor/github.com/containerd/containerd/errdefs/errors.go b/vendor/github.com/containerd/containerd/errdefs/errdefs_deprecated.go similarity index 60% rename from vendor/github.com/containerd/containerd/errdefs/errors.go rename to vendor/github.com/containerd/containerd/errdefs/errdefs_deprecated.go index 8762255970..c6a0d843eb 100644 --- a/vendor/github.com/containerd/containerd/errdefs/errors.go +++ b/vendor/github.com/containerd/containerd/errdefs/errdefs_deprecated.go @@ -27,8 +27,7 @@ package errdefs import ( - "context" - "errors" + "github.com/containerd/errdefs" ) // Definitions of common error types used throughout containerd. All containerd @@ -39,54 +38,79 @@ import ( // For the most part, we just try to provide local grpc errors. Most conditions // map very well to those defined by grpc. var ( - ErrUnknown = errors.New("unknown") // used internally to represent a missed mapping. - ErrInvalidArgument = errors.New("invalid argument") - ErrNotFound = errors.New("not found") - ErrAlreadyExists = errors.New("already exists") - ErrFailedPrecondition = errors.New("failed precondition") - ErrUnavailable = errors.New("unavailable") - ErrNotImplemented = errors.New("not implemented") // represents not supported and unimplemented + ErrUnknown = errdefs.ErrUnknown + ErrInvalidArgument = errdefs.ErrInvalidArgument + ErrNotFound = errdefs.ErrNotFound + ErrAlreadyExists = errdefs.ErrAlreadyExists + ErrFailedPrecondition = errdefs.ErrFailedPrecondition + ErrUnavailable = errdefs.ErrUnavailable + ErrNotImplemented = errdefs.ErrNotImplemented ) // IsInvalidArgument returns true if the error is due to an invalid argument func IsInvalidArgument(err error) bool { - return errors.Is(err, ErrInvalidArgument) + return errdefs.IsInvalidArgument(err) } // IsNotFound returns true if the error is due to a missing object func IsNotFound(err error) bool { - return errors.Is(err, ErrNotFound) + return errdefs.IsNotFound(err) } // IsAlreadyExists returns true if the error is due to an already existing // metadata item func IsAlreadyExists(err error) bool { - return errors.Is(err, ErrAlreadyExists) + return errdefs.IsAlreadyExists(err) } // IsFailedPrecondition returns true if an operation could not proceed to the // lack of a particular condition func IsFailedPrecondition(err error) bool { - return errors.Is(err, ErrFailedPrecondition) + return errdefs.IsFailedPrecondition(err) } // IsUnavailable returns true if the error is due to a resource being unavailable func IsUnavailable(err error) bool { - return errors.Is(err, ErrUnavailable) + return errdefs.IsUnavailable(err) } // IsNotImplemented returns true if the error is due to not being implemented func IsNotImplemented(err error) bool { - return errors.Is(err, ErrNotImplemented) + return errdefs.IsNotImplemented(err) } // IsCanceled returns true if the error is due to `context.Canceled`. func IsCanceled(err error) bool { - return errors.Is(err, context.Canceled) + return errdefs.IsCanceled(err) } // IsDeadlineExceeded returns true if the error is due to // `context.DeadlineExceeded`. func IsDeadlineExceeded(err error) bool { - return errors.Is(err, context.DeadlineExceeded) + return errdefs.IsDeadlineExceeded(err) +} + +// ToGRPC will attempt to map the backend containerd error into a grpc error, +// using the original error message as a description. +// +// Further information may be extracted from certain errors depending on their +// type. +// +// If the error is unmapped, the original error will be returned to be handled +// by the regular grpc error handling stack. +func ToGRPC(err error) error { + return errdefs.ToGRPC(err) +} + +// ToGRPCf maps the error to grpc error codes, assembling the formatting string +// and combining it with the target error string. +// +// This is equivalent to errdefs.ToGRPC(fmt.Errorf("%s: %w", fmt.Sprintf(format, args...), err)) +func ToGRPCf(err error, format string, args ...interface{}) error { + return errdefs.ToGRPCf(err, format, args...) +} + +// FromGRPC returns the underlying error from a grpc service based on the grpc error code +func FromGRPC(err error) error { + return errdefs.FromGRPC(err) } diff --git a/vendor/github.com/containerd/containerd/errdefs/grpc.go b/vendor/github.com/containerd/containerd/errdefs/grpc.go deleted file mode 100644 index 7a9b33e05a..0000000000 --- a/vendor/github.com/containerd/containerd/errdefs/grpc.go +++ /dev/null @@ -1,147 +0,0 @@ -/* - Copyright The containerd Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package errdefs - -import ( - "context" - "fmt" - "strings" - - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -// ToGRPC will attempt to map the backend containerd error into a grpc error, -// using the original error message as a description. -// -// Further information may be extracted from certain errors depending on their -// type. -// -// If the error is unmapped, the original error will be returned to be handled -// by the regular grpc error handling stack. -func ToGRPC(err error) error { - if err == nil { - return nil - } - - if isGRPCError(err) { - // error has already been mapped to grpc - return err - } - - switch { - case IsInvalidArgument(err): - return status.Errorf(codes.InvalidArgument, err.Error()) - case IsNotFound(err): - return status.Errorf(codes.NotFound, err.Error()) - case IsAlreadyExists(err): - return status.Errorf(codes.AlreadyExists, err.Error()) - case IsFailedPrecondition(err): - return status.Errorf(codes.FailedPrecondition, err.Error()) - case IsUnavailable(err): - return status.Errorf(codes.Unavailable, err.Error()) - case IsNotImplemented(err): - return status.Errorf(codes.Unimplemented, err.Error()) - case IsCanceled(err): - return status.Errorf(codes.Canceled, err.Error()) - case IsDeadlineExceeded(err): - return status.Errorf(codes.DeadlineExceeded, err.Error()) - } - - return err -} - -// ToGRPCf maps the error to grpc error codes, assembling the formatting string -// and combining it with the target error string. -// -// This is equivalent to errdefs.ToGRPC(fmt.Errorf("%s: %w", fmt.Sprintf(format, args...), err)) -func ToGRPCf(err error, format string, args ...interface{}) error { - return ToGRPC(fmt.Errorf("%s: %w", fmt.Sprintf(format, args...), err)) -} - -// FromGRPC returns the underlying error from a grpc service based on the grpc error code -func FromGRPC(err error) error { - if err == nil { - return nil - } - - var cls error // divide these into error classes, becomes the cause - - switch code(err) { - case codes.InvalidArgument: - cls = ErrInvalidArgument - case codes.AlreadyExists: - cls = ErrAlreadyExists - case codes.NotFound: - cls = ErrNotFound - case codes.Unavailable: - cls = ErrUnavailable - case codes.FailedPrecondition: - cls = ErrFailedPrecondition - case codes.Unimplemented: - cls = ErrNotImplemented - case codes.Canceled: - cls = context.Canceled - case codes.DeadlineExceeded: - cls = context.DeadlineExceeded - default: - cls = ErrUnknown - } - - msg := rebaseMessage(cls, err) - if msg != "" { - err = fmt.Errorf("%s: %w", msg, cls) - } else { - err = cls - } - - return err -} - -// rebaseMessage removes the repeats for an error at the end of an error -// string. This will happen when taking an error over grpc then remapping it. -// -// Effectively, we just remove the string of cls from the end of err if it -// appears there. -func rebaseMessage(cls error, err error) string { - desc := errDesc(err) - clss := cls.Error() - if desc == clss { - return "" - } - - return strings.TrimSuffix(desc, ": "+clss) -} - -func isGRPCError(err error) bool { - _, ok := status.FromError(err) - return ok -} - -func code(err error) codes.Code { - if s, ok := status.FromError(err); ok { - return s.Code() - } - return codes.Unknown -} - -func errDesc(err error) string { - if s, ok := status.FromError(err); ok { - return s.Message() - } - return err.Error() -} diff --git a/vendor/github.com/containerd/containerd/filters/filter.go b/vendor/github.com/containerd/containerd/filters/filter.go index e13f2625c7..dcc569a4b7 100644 --- a/vendor/github.com/containerd/containerd/filters/filter.go +++ b/vendor/github.com/containerd/containerd/filters/filter.go @@ -70,7 +70,7 @@ package filters import ( "regexp" - "github.com/containerd/containerd/log" + "github.com/containerd/log" ) // Filter matches specific resources based the provided filter diff --git a/vendor/github.com/containerd/containerd/filters/parser.go b/vendor/github.com/containerd/containerd/filters/parser.go index 32767909b1..f07fd33bd2 100644 --- a/vendor/github.com/containerd/containerd/filters/parser.go +++ b/vendor/github.com/containerd/containerd/filters/parser.go @@ -20,7 +20,7 @@ import ( "fmt" "io" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" ) /* diff --git a/vendor/github.com/containerd/containerd/identifiers/validate.go b/vendor/github.com/containerd/containerd/identifiers/validate.go index cbd3a52ba9..0acbf3fc4b 100644 --- a/vendor/github.com/containerd/containerd/identifiers/validate.go +++ b/vendor/github.com/containerd/containerd/identifiers/validate.go @@ -28,7 +28,7 @@ import ( "fmt" "regexp" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" ) const ( diff --git a/vendor/github.com/containerd/containerd/images/handlers.go b/vendor/github.com/containerd/containerd/images/handlers.go index 077d88e787..162e87a862 100644 --- a/vendor/github.com/containerd/containerd/images/handlers.go +++ b/vendor/github.com/containerd/containerd/images/handlers.go @@ -23,8 +23,8 @@ import ( "sort" "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/platforms" + "github.com/containerd/errdefs" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "golang.org/x/sync/errgroup" "golang.org/x/sync/semaphore" diff --git a/vendor/github.com/containerd/containerd/images/image.go b/vendor/github.com/containerd/containerd/images/image.go index 2d2e36a9a3..3e2abc75f4 100644 --- a/vendor/github.com/containerd/containerd/images/image.go +++ b/vendor/github.com/containerd/containerd/images/image.go @@ -24,9 +24,9 @@ import ( "time" "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/platforms" + "github.com/containerd/errdefs" + "github.com/containerd/log" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) @@ -268,6 +268,9 @@ func Platforms(ctx context.Context, provider content.Provider, image ocispec.Des var platformSpecs []ocispec.Platform return platformSpecs, Walk(ctx, Handlers(HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { if desc.Platform != nil { + if desc.Platform.OS == "unknown" || desc.Platform.Architecture == "unknown" { + return nil, ErrSkipDesc + } platformSpecs = append(platformSpecs, *desc.Platform) return nil, ErrSkipDesc } diff --git a/vendor/github.com/containerd/containerd/images/mediatypes.go b/vendor/github.com/containerd/containerd/images/mediatypes.go index d3b28d42dc..cd51aa5ebb 100644 --- a/vendor/github.com/containerd/containerd/images/mediatypes.go +++ b/vendor/github.com/containerd/containerd/images/mediatypes.go @@ -22,7 +22,7 @@ import ( "sort" "strings" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/vendor/github.com/containerd/containerd/labels/validate.go b/vendor/github.com/containerd/containerd/labels/validate.go index f83b5dde29..6f23cdd7c6 100644 --- a/vendor/github.com/containerd/containerd/labels/validate.go +++ b/vendor/github.com/containerd/containerd/labels/validate.go @@ -19,7 +19,7 @@ package labels import ( "fmt" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" ) const ( diff --git a/vendor/github.com/containerd/containerd/metadata/containers.go b/vendor/github.com/containerd/containerd/metadata/containers.go index d97d9c6cd1..8929ebf97f 100644 --- a/vendor/github.com/containerd/containerd/metadata/containers.go +++ b/vendor/github.com/containerd/containerd/metadata/containers.go @@ -24,7 +24,6 @@ import ( "time" "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/filters" "github.com/containerd/containerd/identifiers" "github.com/containerd/containerd/labels" @@ -32,6 +31,7 @@ import ( "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/protobuf/proto" "github.com/containerd/containerd/protobuf/types" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" bolt "go.etcd.io/bbolt" ) diff --git a/vendor/github.com/containerd/containerd/metadata/content.go b/vendor/github.com/containerd/containerd/metadata/content.go index 2df665fcfc..e3ccf3f85a 100644 --- a/vendor/github.com/containerd/containerd/metadata/content.go +++ b/vendor/github.com/containerd/containerd/metadata/content.go @@ -26,12 +26,12 @@ import ( "time" "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/filters" "github.com/containerd/containerd/labels" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/metadata/boltutil" "github.com/containerd/containerd/namespaces" + "github.com/containerd/errdefs" + "github.com/containerd/log" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" bolt "go.etcd.io/bbolt" diff --git a/vendor/github.com/containerd/containerd/metadata/db.go b/vendor/github.com/containerd/containerd/metadata/db.go index 83b614fd13..7be54f796c 100644 --- a/vendor/github.com/containerd/containerd/metadata/db.go +++ b/vendor/github.com/containerd/containerd/metadata/db.go @@ -30,10 +30,10 @@ import ( "github.com/containerd/containerd/content" "github.com/containerd/containerd/events" "github.com/containerd/containerd/gc" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/pkg/cleanup" "github.com/containerd/containerd/snapshots" + "github.com/containerd/log" bolt "go.etcd.io/bbolt" ) diff --git a/vendor/github.com/containerd/containerd/metadata/gc.go b/vendor/github.com/containerd/containerd/metadata/gc.go index 5518a44872..4a810ea3f2 100644 --- a/vendor/github.com/containerd/containerd/metadata/gc.go +++ b/vendor/github.com/containerd/containerd/metadata/gc.go @@ -26,7 +26,7 @@ import ( eventstypes "github.com/containerd/containerd/api/events" "github.com/containerd/containerd/gc" - "github.com/containerd/containerd/log" + "github.com/containerd/log" bolt "go.etcd.io/bbolt" ) diff --git a/vendor/github.com/containerd/containerd/metadata/images.go b/vendor/github.com/containerd/containerd/metadata/images.go index ff5b624cce..beba82d07b 100644 --- a/vendor/github.com/containerd/containerd/metadata/images.go +++ b/vendor/github.com/containerd/containerd/metadata/images.go @@ -25,13 +25,13 @@ import ( "sync/atomic" "time" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/filters" "github.com/containerd/containerd/images" "github.com/containerd/containerd/labels" "github.com/containerd/containerd/metadata/boltutil" "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/pkg/epoch" + "github.com/containerd/errdefs" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" bolt "go.etcd.io/bbolt" diff --git a/vendor/github.com/containerd/containerd/metadata/leases.go b/vendor/github.com/containerd/containerd/metadata/leases.go index 03fa75af34..7c451e7469 100644 --- a/vendor/github.com/containerd/containerd/metadata/leases.go +++ b/vendor/github.com/containerd/containerd/metadata/leases.go @@ -24,11 +24,11 @@ import ( "sync/atomic" "time" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/filters" "github.com/containerd/containerd/leases" "github.com/containerd/containerd/metadata/boltutil" "github.com/containerd/containerd/namespaces" + "github.com/containerd/errdefs" digest "github.com/opencontainers/go-digest" bolt "go.etcd.io/bbolt" ) diff --git a/vendor/github.com/containerd/containerd/metadata/namespaces.go b/vendor/github.com/containerd/containerd/metadata/namespaces.go index 84eb83f273..8b6174e354 100644 --- a/vendor/github.com/containerd/containerd/metadata/namespaces.go +++ b/vendor/github.com/containerd/containerd/metadata/namespaces.go @@ -21,10 +21,10 @@ import ( "fmt" "strings" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/identifiers" l "github.com/containerd/containerd/labels" "github.com/containerd/containerd/namespaces" + "github.com/containerd/errdefs" bolt "go.etcd.io/bbolt" ) diff --git a/vendor/github.com/containerd/containerd/metadata/sandbox.go b/vendor/github.com/containerd/containerd/metadata/sandbox.go index 5766647d33..78126b4db9 100644 --- a/vendor/github.com/containerd/containerd/metadata/sandbox.go +++ b/vendor/github.com/containerd/containerd/metadata/sandbox.go @@ -23,12 +23,12 @@ import ( "strings" "time" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/filters" "github.com/containerd/containerd/identifiers" "github.com/containerd/containerd/metadata/boltutil" "github.com/containerd/containerd/namespaces" api "github.com/containerd/containerd/sandbox" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" "go.etcd.io/bbolt" ) diff --git a/vendor/github.com/containerd/containerd/metadata/snapshot.go b/vendor/github.com/containerd/containerd/metadata/snapshot.go index fa6ebfeeb8..8388e19c4a 100644 --- a/vendor/github.com/containerd/containerd/metadata/snapshot.go +++ b/vendor/github.com/containerd/containerd/metadata/snapshot.go @@ -25,14 +25,14 @@ import ( "time" eventstypes "github.com/containerd/containerd/api/events" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/filters" "github.com/containerd/containerd/labels" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/metadata/boltutil" "github.com/containerd/containerd/mount" "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/snapshots" + "github.com/containerd/errdefs" + "github.com/containerd/log" bolt "go.etcd.io/bbolt" ) diff --git a/vendor/github.com/containerd/containerd/mount/mount_windows.go b/vendor/github.com/containerd/containerd/mount/mount_windows.go index 7c24fa600c..91ac6968d2 100644 --- a/vendor/github.com/containerd/containerd/mount/mount_windows.go +++ b/vendor/github.com/containerd/containerd/mount/mount_windows.go @@ -27,7 +27,7 @@ import ( "github.com/Microsoft/go-winio/pkg/bindfilter" "github.com/Microsoft/hcsshim" - "github.com/containerd/containerd/log" + "github.com/containerd/log" "golang.org/x/sys/windows" ) diff --git a/vendor/github.com/containerd/containerd/mount/temp.go b/vendor/github.com/containerd/containerd/mount/temp.go index 83143521ab..7849d0609a 100644 --- a/vendor/github.com/containerd/containerd/mount/temp.go +++ b/vendor/github.com/containerd/containerd/mount/temp.go @@ -21,7 +21,7 @@ import ( "fmt" "os" - "github.com/containerd/containerd/log" + "github.com/containerd/log" ) var tempMountLocation = getTempDir() diff --git a/vendor/github.com/containerd/containerd/namespaces/context.go b/vendor/github.com/containerd/containerd/namespaces/context.go index e5e23fe430..94ef9408d1 100644 --- a/vendor/github.com/containerd/containerd/namespaces/context.go +++ b/vendor/github.com/containerd/containerd/namespaces/context.go @@ -21,8 +21,8 @@ import ( "fmt" "os" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/identifiers" + "github.com/containerd/errdefs" ) const ( diff --git a/vendor/github.com/containerd/containerd/platforms/cpuinfo.go b/vendor/github.com/containerd/containerd/platforms/cpuinfo.go index 8c600fc96b..91f50e8c88 100644 --- a/vendor/github.com/containerd/containerd/platforms/cpuinfo.go +++ b/vendor/github.com/containerd/containerd/platforms/cpuinfo.go @@ -20,7 +20,7 @@ import ( "runtime" "sync" - "github.com/containerd/containerd/log" + "github.com/containerd/log" ) // Present the ARM instruction set architecture, eg: v7, v8 diff --git a/vendor/github.com/containerd/containerd/platforms/cpuinfo_linux.go b/vendor/github.com/containerd/containerd/platforms/cpuinfo_linux.go index 722d86c357..e07aa99cc1 100644 --- a/vendor/github.com/containerd/containerd/platforms/cpuinfo_linux.go +++ b/vendor/github.com/containerd/containerd/platforms/cpuinfo_linux.go @@ -24,7 +24,7 @@ import ( "runtime" "strings" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" "golang.org/x/sys/unix" ) diff --git a/vendor/github.com/containerd/containerd/platforms/cpuinfo_other.go b/vendor/github.com/containerd/containerd/platforms/cpuinfo_other.go index fa5f19c427..8cbcbb24af 100644 --- a/vendor/github.com/containerd/containerd/platforms/cpuinfo_other.go +++ b/vendor/github.com/containerd/containerd/platforms/cpuinfo_other.go @@ -22,7 +22,7 @@ import ( "fmt" "runtime" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" ) func getCPUVariant() (string, error) { diff --git a/vendor/github.com/containerd/containerd/platforms/platforms.go b/vendor/github.com/containerd/containerd/platforms/platforms.go index 56613b0765..44bc24a5c6 100644 --- a/vendor/github.com/containerd/containerd/platforms/platforms.go +++ b/vendor/github.com/containerd/containerd/platforms/platforms.go @@ -116,7 +116,7 @@ import ( specs "github.com/opencontainers/image-spec/specs-go/v1" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" ) var ( diff --git a/vendor/github.com/containerd/containerd/remotes/docker/auth/fetch.go b/vendor/github.com/containerd/containerd/remotes/docker/auth/fetch.go index 64c6a38f91..244e03509a 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/auth/fetch.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/auth/fetch.go @@ -26,9 +26,9 @@ import ( "strings" "time" - "github.com/containerd/containerd/log" remoteserrors "github.com/containerd/containerd/remotes/errors" "github.com/containerd/containerd/version" + "github.com/containerd/log" ) var ( diff --git a/vendor/github.com/containerd/containerd/remotes/docker/authorizer.go b/vendor/github.com/containerd/containerd/remotes/docker/authorizer.go index ebd69c16c0..2fd1118bc7 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/authorizer.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/authorizer.go @@ -25,10 +25,10 @@ import ( "strings" "sync" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/remotes/docker/auth" remoteerrors "github.com/containerd/containerd/remotes/errors" + "github.com/containerd/errdefs" + "github.com/containerd/log" ) type dockerAuthorizer struct { diff --git a/vendor/github.com/containerd/containerd/remotes/docker/converter.go b/vendor/github.com/containerd/containerd/remotes/docker/converter.go index d7dca0d364..95a68d70e6 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/converter.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/converter.go @@ -24,8 +24,8 @@ import ( "github.com/containerd/containerd/content" "github.com/containerd/containerd/images" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/remotes" + "github.com/containerd/log" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/vendor/github.com/containerd/containerd/remotes/docker/converter_fuzz.go b/vendor/github.com/containerd/containerd/remotes/docker/converter_fuzz.go index 9082053924..aa7cf4666f 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/converter_fuzz.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/converter_fuzz.go @@ -24,7 +24,7 @@ import ( fuzz "github.com/AdaLogics/go-fuzz-headers" "github.com/containerd/containerd/content/local" - "github.com/containerd/containerd/log" + "github.com/containerd/log" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/sirupsen/logrus" ) diff --git a/vendor/github.com/containerd/containerd/remotes/docker/fetcher.go b/vendor/github.com/containerd/containerd/remotes/docker/fetcher.go index ecf245933f..3589db3ef9 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/fetcher.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/fetcher.go @@ -26,9 +26,9 @@ import ( "net/url" "strings" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/images" - "github.com/containerd/containerd/log" + "github.com/containerd/errdefs" + "github.com/containerd/log" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/vendor/github.com/containerd/containerd/remotes/docker/handler.go b/vendor/github.com/containerd/containerd/remotes/docker/handler.go index 27638ccc02..ccec490133 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/handler.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/handler.go @@ -25,8 +25,8 @@ import ( "github.com/containerd/containerd/content" "github.com/containerd/containerd/images" "github.com/containerd/containerd/labels" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/reference" + "github.com/containerd/log" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/vendor/github.com/containerd/containerd/remotes/docker/httpreadseeker.go b/vendor/github.com/containerd/containerd/remotes/docker/httpreadseeker.go index 8243593390..6739e7904e 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/httpreadseeker.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/httpreadseeker.go @@ -21,8 +21,8 @@ import ( "fmt" "io" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/log" + "github.com/containerd/errdefs" + "github.com/containerd/log" ) const maxRetry = 3 diff --git a/vendor/github.com/containerd/containerd/remotes/docker/pusher.go b/vendor/github.com/containerd/containerd/remotes/docker/pusher.go index 218a5dd30f..a27cda0b56 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/pusher.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/pusher.go @@ -29,11 +29,11 @@ import ( "time" "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/images" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/remotes" remoteserrors "github.com/containerd/containerd/remotes/errors" + "github.com/containerd/errdefs" + "github.com/containerd/log" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/vendor/github.com/containerd/containerd/remotes/docker/resolver.go b/vendor/github.com/containerd/containerd/remotes/docker/resolver.go index ce1f646252..b2b1242140 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/resolver.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/resolver.go @@ -28,15 +28,15 @@ import ( "path" "strings" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/images" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/reference" "github.com/containerd/containerd/remotes" "github.com/containerd/containerd/remotes/docker/schema1" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility. remoteerrors "github.com/containerd/containerd/remotes/errors" "github.com/containerd/containerd/tracing" "github.com/containerd/containerd/version" + "github.com/containerd/errdefs" + "github.com/containerd/log" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) diff --git a/vendor/github.com/containerd/containerd/remotes/docker/schema1/converter.go b/vendor/github.com/containerd/containerd/remotes/docker/schema1/converter.go index 8c9e520cd2..75bd9875a4 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/schema1/converter.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/schema1/converter.go @@ -34,11 +34,11 @@ import ( "github.com/containerd/containerd/archive/compression" "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/images" "github.com/containerd/containerd/labels" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/remotes" + "github.com/containerd/errdefs" + "github.com/containerd/log" digest "github.com/opencontainers/go-digest" specs "github.com/opencontainers/image-spec/specs-go" ocispec "github.com/opencontainers/image-spec/specs-go/v1" diff --git a/vendor/github.com/containerd/containerd/remotes/docker/status.go b/vendor/github.com/containerd/containerd/remotes/docker/status.go index 1a9227725b..c7764758f0 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/status.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/status.go @@ -21,7 +21,7 @@ import ( "sync" "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" "github.com/moby/locker" ) diff --git a/vendor/github.com/containerd/containerd/remotes/handlers.go b/vendor/github.com/containerd/containerd/remotes/handlers.go index f24669dc4a..912b85bfe8 100644 --- a/vendor/github.com/containerd/containerd/remotes/handlers.go +++ b/vendor/github.com/containerd/containerd/remotes/handlers.go @@ -26,11 +26,11 @@ import ( "sync" "github.com/containerd/containerd/content" - "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/images" "github.com/containerd/containerd/labels" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/platforms" + "github.com/containerd/errdefs" + "github.com/containerd/log" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "golang.org/x/sync/semaphore" ) diff --git a/vendor/github.com/containerd/containerd/sandbox/controller.go b/vendor/github.com/containerd/containerd/sandbox/controller.go index b74f82c108..4885b43668 100644 --- a/vendor/github.com/containerd/containerd/sandbox/controller.go +++ b/vendor/github.com/containerd/containerd/sandbox/controller.go @@ -22,8 +22,8 @@ import ( "time" "github.com/containerd/containerd/api/types" - "github.com/containerd/containerd/platforms" "github.com/containerd/typeurl/v2" + imagespec "github.com/opencontainers/image-spec/specs-go/v1" ) type CreateOptions struct { @@ -90,7 +90,7 @@ type Controller interface { Start(ctx context.Context, sandboxID string) (ControllerInstance, error) // Platform returns target sandbox OS that will be used by Controller. // containerd will rely on this to generate proper OCI spec. - Platform(_ctx context.Context, _sandboxID string) (platforms.Platform, error) + Platform(_ctx context.Context, _sandboxID string) (imagespec.Platform, error) // Stop will stop sandbox instance Stop(ctx context.Context, sandboxID string, opts ...StopOpt) error // Wait blocks until sandbox process exits. diff --git a/vendor/github.com/containerd/containerd/sandbox/store.go b/vendor/github.com/containerd/containerd/sandbox/store.go index cda646dde2..5d0d42bdb8 100644 --- a/vendor/github.com/containerd/containerd/sandbox/store.go +++ b/vendor/github.com/containerd/containerd/sandbox/store.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "github.com/containerd/containerd/errdefs" + "github.com/containerd/errdefs" "github.com/containerd/typeurl/v2" ) diff --git a/vendor/github.com/containerd/containerd/version/version.go b/vendor/github.com/containerd/containerd/version/version.go index 782771e4de..dfe46c922f 100644 --- a/vendor/github.com/containerd/containerd/version/version.go +++ b/vendor/github.com/containerd/containerd/version/version.go @@ -23,7 +23,7 @@ var ( Package = "github.com/containerd/containerd" // Version holds the complete version number. Filled in at linking time. - Version = "1.7.17+unknown" + Version = "1.7.18+unknown" // Revision is filled with the VCS (e.g. git) revision being used to build // the program at linking time. diff --git a/vendor/github.com/containers/image/v5/docker/docker_image.go b/vendor/github.com/containers/image/v5/docker/docker_image.go index 4c80bb2b52..9741afc3f0 100644 --- a/vendor/github.com/containers/image/v5/docker/docker_image.go +++ b/vendor/github.com/containers/image/v5/docker/docker_image.go @@ -14,6 +14,7 @@ import ( "github.com/containers/image/v5/manifest" "github.com/containers/image/v5/types" "github.com/opencontainers/go-digest" + "github.com/sirupsen/logrus" ) // Image is a Docker-specific implementation of types.ImageCloser with a few extra methods @@ -90,6 +91,14 @@ func GetRepositoryTags(ctx context.Context, sys *types.SystemContext, ref types. } for _, tag := range tagsHolder.Tags { if _, err := reference.WithTag(dr.ref, tag); err != nil { // Ensure the tag does not contain unexpected values + // Per https://github.com/containers/skopeo/issues/2346 , unknown versions of JFrog Artifactory, + // contrary to the tag format specified in + // https://github.com/opencontainers/distribution-spec/blob/8a871c8234977df058f1a14e299fe0a673853da2/spec.md?plain=1#L160 , + // include digests in the list. + if _, err := digest.Parse(tag); err == nil { + logrus.Debugf("Ignoring invalid tag %q matching a digest format", tag) + continue + } return nil, fmt.Errorf("registry returned invalid tag %q: %w", tag, err) } tags = append(tags, tag) diff --git a/vendor/github.com/containers/image/v5/version/version.go b/vendor/github.com/containers/image/v5/version/version.go index 0b5c3bd7a8..9e03381587 100644 --- a/vendor/github.com/containers/image/v5/version/version.go +++ b/vendor/github.com/containers/image/v5/version/version.go @@ -8,7 +8,7 @@ const ( // VersionMinor is for functionality in a backwards-compatible manner VersionMinor = 31 // VersionPatch is for backwards-compatible bug fixes - VersionPatch = 0 + VersionPatch = 1 // VersionDev indicates development branch. Releases will be empty string. VersionDev = "" diff --git a/vendor/github.com/docker/cli/AUTHORS b/vendor/github.com/docker/cli/AUTHORS index d6d23b3de3..ad1abd4964 100644 --- a/vendor/github.com/docker/cli/AUTHORS +++ b/vendor/github.com/docker/cli/AUTHORS @@ -26,6 +26,7 @@ Akhil Mohan Akihiro Suda Akim Demaille Alan Thompson +Alano Terblanche Albert Callarisa Alberto Roura Albin Kerouanton @@ -65,6 +66,7 @@ Andrew Hsu Andrew Macpherson Andrew McDonnell Andrew Po +Andrew-Zipperer Andrey Petrov Andrii Berehuliak André Martins @@ -124,11 +126,13 @@ Bryan Bess Bryan Boreham Bryan Murphy bryfry +Calvin Liu Cameron Spear Cao Weiwei Carlo Mion Carlos Alexandro Becker Carlos de Paula +Casey Korver Ce Gao Cedric Davies Cezar Sa Espinola @@ -160,6 +164,8 @@ Christophe Vidal Christopher Biscardi Christopher Crone Christopher Jones +Christopher Petito <47751006+krissetto@users.noreply.github.com> +Christopher Petito Christopher Svensson Christy Norman Chun Chen @@ -212,6 +218,7 @@ David Cramer David Dooling David Gageot David Karlsson +David le Blanc David Lechner David Scott David Sheets @@ -298,6 +305,7 @@ Gang Qiao Gary Schaetz Genki Takiuchi George MacRorie +George Margaritis George Xie Gianluca Borello Gildas Cuisinier @@ -306,6 +314,7 @@ Gleb Stsenov Goksu Toprak Gou Rao Govind Rai +Grace Choi Graeme Wiebe Grant Reaber Greg Pflaum @@ -386,6 +395,7 @@ Jezeniel Zapanta Jian Zhang Jie Luo Jilles Oldenbeuving +Jim Chen Jim Galasyn Jim Lin Jimmy Leger @@ -416,6 +426,7 @@ John Willis Jon Johnson Jon Zeolla Jonatas Baldin +Jonathan A. Sternberg Jonathan Boulle Jonathan Lee Jonathan Lomas @@ -470,6 +481,7 @@ Kevin Woblick khaled souf Kim Eik Kir Kolyshkin +Kirill A. Korinsky Kotaro Yoshimatsu Krasi Georgiev Kris-Mikael Krister @@ -530,6 +542,7 @@ Marco Vedovati Marcus Martins Marianna Tessel Marius Ileana +Marius Meschter Marius Sturm Mark Oates Marsh Macy @@ -538,6 +551,7 @@ Mary Anthony Mason Fish Mason Malone Mateusz Major +Mathias Duedahl <64321057+Lussebullen@users.noreply.github.com> Mathieu Champlon Mathieu Rollet Matt Gucci @@ -547,6 +561,7 @@ Matthew Heon Matthieu Hauglustaine Mauro Porras P Max Shytikov +Max-Julian Pogner Maxime Petazzoni Maximillian Fan Xavier Mei ChunTao @@ -610,6 +625,7 @@ Nathan McCauley Neil Peterson Nick Adcock Nick Santos +Nick Sieger Nico Stapelbroek Nicola Kabar Nicolas Borboën @@ -704,6 +720,7 @@ Rory Hunter Ross Boucher Rubens Figueiredo Rui Cao +Rui JingAn Ryan Belgrave Ryan Detzel Ryan Stelly @@ -797,6 +814,7 @@ Tim Hockin Tim Sampson Tim Smith Tim Waugh +Tim Welsh Tim Wraight timfeirg Timothy Hobbs @@ -880,9 +898,11 @@ Zhang Wei Zhang Wentao ZhangHang zhenghenghuo +Zhiwei Liang Zhou Hao Zhoulin Xie Zhu Guihua +Zhuo Zhi Álex González Álvaro Lázaro Átila Camurça Alves diff --git a/vendor/github.com/docker/cli/NOTICE b/vendor/github.com/docker/cli/NOTICE index 58b19b6d15..1c40faaec6 100644 --- a/vendor/github.com/docker/cli/NOTICE +++ b/vendor/github.com/docker/cli/NOTICE @@ -14,6 +14,6 @@ United States and other governments. It is your responsibility to ensure that your use and/or transfer does not violate applicable laws. -For more information, please see https://www.bis.doc.gov +For more information, see https://www.bis.doc.gov See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/vendor/github.com/docker/cli/cli/config/config.go b/vendor/github.com/docker/cli/cli/config/config.go index 952f6e71f4..5a51843260 100644 --- a/vendor/github.com/docker/cli/cli/config/config.go +++ b/vendor/github.com/docker/cli/cli/config/config.go @@ -4,14 +4,15 @@ import ( "fmt" "io" "os" + "os/user" "path/filepath" + "runtime" "strings" "sync" "github.com/docker/cli/cli/config/configfile" "github.com/docker/cli/cli/config/credentials" "github.com/docker/cli/cli/config/types" - "github.com/docker/docker/pkg/homedir" "github.com/pkg/errors" ) @@ -42,12 +43,38 @@ func resetConfigDir() { initConfigDir = new(sync.Once) } +// getHomeDir returns the home directory of the current user with the help of +// environment variables depending on the target operating system. +// Returned path should be used with "path/filepath" to form new paths. +// +// On non-Windows platforms, it falls back to nss lookups, if the home +// directory cannot be obtained from environment-variables. +// +// If linking statically with cgo enabled against glibc, ensure the +// osusergo build tag is used. +// +// If needing to do nss lookups, do not disable cgo or set osusergo. +// +// getHomeDir is a copy of [pkg/homedir.Get] to prevent adding docker/docker +// as dependency for consumers that only need to read the config-file. +// +// [pkg/homedir.Get]: https://pkg.go.dev/github.com/docker/docker@v26.1.4+incompatible/pkg/homedir#Get +func getHomeDir() string { + home, _ := os.UserHomeDir() + if home == "" && runtime.GOOS != "windows" { + if u, err := user.Current(); err == nil { + return u.HomeDir + } + } + return home +} + // Dir returns the directory the configuration file is stored in func Dir() string { initConfigDir.Do(func() { configDir = os.Getenv(EnvOverrideConfigDir) if configDir == "" { - configDir = filepath.Join(homedir.Get(), configFileDir) + configDir = filepath.Join(getHomeDir(), configFileDir) } }) return configDir @@ -75,7 +102,7 @@ func Path(p ...string) (string, error) { } // LoadFromReader is a convenience function that creates a ConfigFile object from -// a reader +// a reader. It returns an error if configData is malformed. func LoadFromReader(configData io.Reader) (*configfile.ConfigFile, error) { configFile := configfile.ConfigFile{ AuthConfigs: make(map[string]types.AuthConfig), @@ -84,8 +111,14 @@ func LoadFromReader(configData io.Reader) (*configfile.ConfigFile, error) { return &configFile, err } -// Load reads the configuration files in the given directory, and sets up -// the auth config information and returns values. +// Load reads the configuration file ([ConfigFileName]) from the given directory. +// If no directory is given, it uses the default [Dir]. A [*configfile.ConfigFile] +// is returned containing the contents of the configuration file, or a default +// struct if no configfile exists in the given location. +// +// Load returns an error if a configuration file exists in the given location, +// but cannot be read, or is malformed. Consumers must handle errors to prevent +// overwriting an existing configuration file. func Load(configDir string) (*configfile.ConfigFile, error) { if configDir == "" { configDir = Dir() @@ -100,29 +133,37 @@ func load(configDir string) (*configfile.ConfigFile, error) { file, err := os.Open(filename) if err != nil { if os.IsNotExist(err) { - // - // if file is there but we can't stat it for any reason other - // than it doesn't exist then stop + // It is OK for no configuration file to be present, in which + // case we return a default struct. return configFile, nil } - // if file is there but we can't stat it for any reason other - // than it doesn't exist then stop - return configFile, nil + // Any other error happening when failing to read the file must be returned. + return configFile, errors.Wrap(err, "loading config file") } defer file.Close() err = configFile.LoadFromReader(file) if err != nil { - err = errors.Wrap(err, filename) + err = errors.Wrapf(err, "loading config file: %s: ", filename) } return configFile, err } // LoadDefaultConfigFile attempts to load the default config file and returns -// an initialized ConfigFile struct if none is found. +// a reference to the ConfigFile struct. If none is found or when failing to load +// the configuration file, it initializes a default ConfigFile struct. If no +// credentials-store is set in the configuration file, it attempts to discover +// the default store to use for the current platform. +// +// Important: LoadDefaultConfigFile prints a warning to stderr when failing to +// load the configuration file, but otherwise ignores errors. Consumers should +// consider using [Load] (and [credentials.DetectDefaultStore]) to detect errors +// when updating the configuration file, to prevent discarding a (malformed) +// configuration file. func LoadDefaultConfigFile(stderr io.Writer) *configfile.ConfigFile { configFile, err := load(Dir()) if err != nil { - _, _ = fmt.Fprintf(stderr, "WARNING: Error loading config file: %v\n", err) + // FIXME(thaJeztah): we should not proceed here to prevent overwriting existing (but malformed) config files; see https://github.com/docker/cli/issues/5075 + _, _ = fmt.Fprintln(stderr, "WARNING: Error", err) } if !configFile.ContainsAuth() { configFile.CredentialsStore = credentials.DetectDefaultStore(configFile.CredentialsStore) diff --git a/vendor/github.com/docker/cli/cli/config/credentials/file_store.go b/vendor/github.com/docker/cli/cli/config/credentials/file_store.go index ea30fc3006..3b8955994d 100644 --- a/vendor/github.com/docker/cli/cli/config/credentials/file_store.go +++ b/vendor/github.com/docker/cli/cli/config/credentials/file_store.go @@ -1,6 +1,8 @@ package credentials import ( + "net" + "net/url" "strings" "github.com/docker/cli/cli/config/types" @@ -68,14 +70,17 @@ func (c *fileStore) IsFileStore() bool { // ConvertToHostname converts a registry url which has http|https prepended // to just an hostname. // Copied from github.com/docker/docker/registry.ConvertToHostname to reduce dependencies. -func ConvertToHostname(url string) string { - stripped := url - if strings.HasPrefix(url, "http://") { - stripped = strings.TrimPrefix(url, "http://") - } else if strings.HasPrefix(url, "https://") { - stripped = strings.TrimPrefix(url, "https://") +func ConvertToHostname(maybeURL string) string { + stripped := maybeURL + if strings.Contains(stripped, "://") { + u, err := url.Parse(stripped) + if err == nil && u.Hostname() != "" { + if u.Port() == "" { + return u.Hostname() + } + return net.JoinHostPort(u.Hostname(), u.Port()) + } } - hostName, _, _ := strings.Cut(stripped, "/") return hostName } diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir.go b/vendor/github.com/docker/docker/pkg/homedir/homedir.go deleted file mode 100644 index c0ab3f5bf3..0000000000 --- a/vendor/github.com/docker/docker/pkg/homedir/homedir.go +++ /dev/null @@ -1,28 +0,0 @@ -package homedir - -import ( - "os" - "os/user" - "runtime" -) - -// Get returns the home directory of the current user with the help of -// environment variables depending on the target operating system. -// Returned path should be used with "path/filepath" to form new paths. -// -// On non-Windows platforms, it falls back to nss lookups, if the home -// directory cannot be obtained from environment-variables. -// -// If linking statically with cgo enabled against glibc, ensure the -// osusergo build tag is used. -// -// If needing to do nss lookups, do not disable cgo or set osusergo. -func Get() string { - home, _ := os.UserHomeDir() - if home == "" && runtime.GOOS != "windows" { - if u, err := user.Current(); err == nil { - return u.HomeDir - } - } - return home -} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go deleted file mode 100644 index ded1c7c8c6..0000000000 --- a/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go +++ /dev/null @@ -1,105 +0,0 @@ -package homedir // import "github.com/docker/docker/pkg/homedir" - -import ( - "errors" - "os" - "path/filepath" - "strings" -) - -// GetRuntimeDir returns XDG_RUNTIME_DIR. -// XDG_RUNTIME_DIR is typically configured via pam_systemd. -// GetRuntimeDir returns non-nil error if XDG_RUNTIME_DIR is not set. -// -// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html -func GetRuntimeDir() (string, error) { - if xdgRuntimeDir := os.Getenv("XDG_RUNTIME_DIR"); xdgRuntimeDir != "" { - return xdgRuntimeDir, nil - } - return "", errors.New("could not get XDG_RUNTIME_DIR") -} - -// StickRuntimeDirContents sets the sticky bit on files that are under -// XDG_RUNTIME_DIR, so that the files won't be periodically removed by the system. -// -// StickyRuntimeDir returns slice of sticked files. -// StickyRuntimeDir returns nil error if XDG_RUNTIME_DIR is not set. -// -// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html -func StickRuntimeDirContents(files []string) ([]string, error) { - runtimeDir, err := GetRuntimeDir() - if err != nil { - // ignore error if runtimeDir is empty - return nil, nil - } - runtimeDir, err = filepath.Abs(runtimeDir) - if err != nil { - return nil, err - } - var sticked []string - for _, f := range files { - f, err = filepath.Abs(f) - if err != nil { - return sticked, err - } - if strings.HasPrefix(f, runtimeDir+"/") { - if err = stick(f); err != nil { - return sticked, err - } - sticked = append(sticked, f) - } - } - return sticked, nil -} - -func stick(f string) error { - st, err := os.Stat(f) - if err != nil { - return err - } - m := st.Mode() - m |= os.ModeSticky - return os.Chmod(f, m) -} - -// GetDataHome returns XDG_DATA_HOME. -// GetDataHome returns $HOME/.local/share and nil error if XDG_DATA_HOME is not set. -// If HOME and XDG_DATA_HOME are not set, getpwent(3) is consulted to determine the users home directory. -// -// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html -func GetDataHome() (string, error) { - if xdgDataHome := os.Getenv("XDG_DATA_HOME"); xdgDataHome != "" { - return xdgDataHome, nil - } - home := Get() - if home == "" { - return "", errors.New("could not get either XDG_DATA_HOME or HOME") - } - return filepath.Join(home, ".local", "share"), nil -} - -// GetConfigHome returns XDG_CONFIG_HOME. -// GetConfigHome returns $HOME/.config and nil error if XDG_CONFIG_HOME is not set. -// If HOME and XDG_CONFIG_HOME are not set, getpwent(3) is consulted to determine the users home directory. -// -// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html -func GetConfigHome() (string, error) { - if xdgConfigHome := os.Getenv("XDG_CONFIG_HOME"); xdgConfigHome != "" { - return xdgConfigHome, nil - } - home := Get() - if home == "" { - return "", errors.New("could not get either XDG_CONFIG_HOME or HOME") - } - return filepath.Join(home, ".config"), nil -} - -// GetLibHome returns $HOME/.local/lib -// If HOME is not set, getpwent(3) is consulted to determine the users home directory. -func GetLibHome() (string, error) { - home := Get() - if home == "" { - return "", errors.New("could not get HOME") - } - return filepath.Join(home, ".local/lib"), nil -} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go deleted file mode 100644 index 4eeb26b5dc..0000000000 --- a/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go +++ /dev/null @@ -1,32 +0,0 @@ -//go:build !linux - -package homedir // import "github.com/docker/docker/pkg/homedir" - -import ( - "errors" -) - -// GetRuntimeDir is unsupported on non-linux system. -func GetRuntimeDir() (string, error) { - return "", errors.New("homedir.GetRuntimeDir() is not supported on this system") -} - -// StickRuntimeDirContents is unsupported on non-linux system. -func StickRuntimeDirContents(files []string) ([]string, error) { - return nil, errors.New("homedir.StickRuntimeDirContents() is not supported on this system") -} - -// GetDataHome is unsupported on non-linux system. -func GetDataHome() (string, error) { - return "", errors.New("homedir.GetDataHome() is not supported on this system") -} - -// GetConfigHome is unsupported on non-linux system. -func GetConfigHome() (string, error) { - return "", errors.New("homedir.GetConfigHome() is not supported on this system") -} - -// GetLibHome is unsupported on non-linux system. -func GetLibHome() (string, error) { - return "", errors.New("homedir.GetLibHome() is not supported on this system") -} diff --git a/vendor/golang.org/x/mod/modfile/rule.go b/vendor/golang.org/x/mod/modfile/rule.go index 0e7b7e2679..66dcaf9803 100644 --- a/vendor/golang.org/x/mod/modfile/rule.go +++ b/vendor/golang.org/x/mod/modfile/rule.go @@ -38,6 +38,7 @@ type File struct { Module *Module Go *Go Toolchain *Toolchain + Godebug []*Godebug Require []*Require Exclude []*Exclude Replace []*Replace @@ -65,6 +66,13 @@ type Toolchain struct { Syntax *Line } +// A Godebug is a single godebug key=value statement. +type Godebug struct { + Key string + Value string + Syntax *Line +} + // An Exclude is a single exclude statement. type Exclude struct { Mod module.Version @@ -289,7 +297,7 @@ func parseToFile(file string, data []byte, fix VersionFixer, strict bool) (parse }) } continue - case "module", "require", "exclude", "replace", "retract": + case "module", "godebug", "require", "exclude", "replace", "retract": for _, l := range x.Line { f.add(&errs, x, l, x.Token[0], l.Token, fix, strict) } @@ -308,7 +316,9 @@ var laxGoVersionRE = lazyregexp.New(`^v?(([1-9][0-9]*)\.(0|[1-9][0-9]*))([^0-9]. // Toolchains must be named beginning with `go1`, // like "go1.20.3" or "go1.20.3-gccgo". As a special case, "default" is also permitted. -// TODO(samthanawalla): Replace regex with https://pkg.go.dev/go/version#IsValid in 1.23+ +// Note that this regexp is a much looser condition than go/version.IsValid, +// for forward compatibility. +// (This code has to be work to identify new toolchains even if we tweak the syntax in the future.) var ToolchainRE = lazyregexp.New(`^default$|^go1($|\.)`) func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, args []string, fix VersionFixer, strict bool) { @@ -384,7 +394,7 @@ func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, a if len(args) != 1 { errorf("toolchain directive expects exactly one argument") return - } else if strict && !ToolchainRE.MatchString(args[0]) { + } else if !ToolchainRE.MatchString(args[0]) { errorf("invalid toolchain version '%s': must match format go1.23.0 or default", args[0]) return } @@ -412,6 +422,22 @@ func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, a } f.Module.Mod = module.Version{Path: s} + case "godebug": + if len(args) != 1 || strings.ContainsAny(args[0], "\"`',") { + errorf("usage: godebug key=value") + return + } + key, value, ok := strings.Cut(args[0], "=") + if !ok { + errorf("usage: godebug key=value") + return + } + f.Godebug = append(f.Godebug, &Godebug{ + Key: key, + Value: value, + Syntax: line, + }) + case "require", "exclude": if len(args) != 2 { errorf("usage: %s module/path v1.2.3", verb) @@ -654,6 +680,22 @@ func (f *WorkFile) add(errs *ErrorList, line *Line, verb string, args []string, f.Toolchain = &Toolchain{Syntax: line} f.Toolchain.Name = args[0] + case "godebug": + if len(args) != 1 || strings.ContainsAny(args[0], "\"`',") { + errorf("usage: godebug key=value") + return + } + key, value, ok := strings.Cut(args[0], "=") + if !ok { + errorf("usage: godebug key=value") + return + } + f.Godebug = append(f.Godebug, &Godebug{ + Key: key, + Value: value, + Syntax: line, + }) + case "use": if len(args) != 1 { errorf("usage: %s local/dir", verb) @@ -929,6 +971,15 @@ func (f *File) Format() ([]byte, error) { // Cleanup cleans out all the cleared entries. func (f *File) Cleanup() { w := 0 + for _, g := range f.Godebug { + if g.Key != "" { + f.Godebug[w] = g + w++ + } + } + f.Godebug = f.Godebug[:w] + + w = 0 for _, r := range f.Require { if r.Mod.Path != "" { f.Require[w] = r @@ -1027,6 +1078,45 @@ func (f *File) AddToolchainStmt(name string) error { return nil } +// AddGodebug sets the first godebug line for key to value, +// preserving any existing comments for that line and removing all +// other godebug lines for key. +// +// If no line currently exists for key, AddGodebug adds a new line +// at the end of the last godebug block. +func (f *File) AddGodebug(key, value string) error { + need := true + for _, g := range f.Godebug { + if g.Key == key { + if need { + g.Value = value + f.Syntax.updateLine(g.Syntax, "godebug", key+"="+value) + need = false + } else { + g.Syntax.markRemoved() + *g = Godebug{} + } + } + } + + if need { + f.addNewGodebug(key, value) + } + return nil +} + +// addNewGodebug adds a new godebug key=value line at the end +// of the last godebug block, regardless of any existing godebug lines for key. +func (f *File) addNewGodebug(key, value string) { + line := f.Syntax.addLine(nil, "godebug", key+"="+value) + g := &Godebug{ + Key: key, + Value: value, + Syntax: line, + } + f.Godebug = append(f.Godebug, g) +} + // AddRequire sets the first require line for path to version vers, // preserving any existing comments for that line and removing all // other lines for path. @@ -1334,6 +1424,16 @@ func (f *File) SetRequireSeparateIndirect(req []*Require) { f.SortBlocks() } +func (f *File) DropGodebug(key string) error { + for _, g := range f.Godebug { + if g.Key == key { + g.Syntax.markRemoved() + *g = Godebug{} + } + } + return nil +} + func (f *File) DropRequire(path string) error { for _, r := range f.Require { if r.Mod.Path == path { diff --git a/vendor/golang.org/x/mod/modfile/work.go b/vendor/golang.org/x/mod/modfile/work.go index d7b99376eb..8f54897cf7 100644 --- a/vendor/golang.org/x/mod/modfile/work.go +++ b/vendor/golang.org/x/mod/modfile/work.go @@ -14,6 +14,7 @@ import ( type WorkFile struct { Go *Go Toolchain *Toolchain + Godebug []*Godebug Use []*Use Replace []*Replace @@ -68,7 +69,7 @@ func ParseWork(file string, data []byte, fix VersionFixer) (*WorkFile, error) { Err: fmt.Errorf("unknown block type: %s", strings.Join(x.Token, " ")), }) continue - case "use", "replace": + case "godebug", "use", "replace": for _, l := range x.Line { f.add(&errs, l, x.Token[0], l.Token, fix) } @@ -184,6 +185,55 @@ func (f *WorkFile) DropToolchainStmt() { } } +// AddGodebug sets the first godebug line for key to value, +// preserving any existing comments for that line and removing all +// other godebug lines for key. +// +// If no line currently exists for key, AddGodebug adds a new line +// at the end of the last godebug block. +func (f *WorkFile) AddGodebug(key, value string) error { + need := true + for _, g := range f.Godebug { + if g.Key == key { + if need { + g.Value = value + f.Syntax.updateLine(g.Syntax, "godebug", key+"="+value) + need = false + } else { + g.Syntax.markRemoved() + *g = Godebug{} + } + } + } + + if need { + f.addNewGodebug(key, value) + } + return nil +} + +// addNewGodebug adds a new godebug key=value line at the end +// of the last godebug block, regardless of any existing godebug lines for key. +func (f *WorkFile) addNewGodebug(key, value string) { + line := f.Syntax.addLine(nil, "godebug", key+"="+value) + g := &Godebug{ + Key: key, + Value: value, + Syntax: line, + } + f.Godebug = append(f.Godebug, g) +} + +func (f *WorkFile) DropGodebug(key string) error { + for _, g := range f.Godebug { + if g.Key == key { + g.Syntax.markRemoved() + *g = Godebug{} + } + } + return nil +} + func (f *WorkFile) AddUse(diskPath, modulePath string) error { need := true for _, d := range f.Use { diff --git a/vendor/golang.org/x/mod/module/module.go b/vendor/golang.org/x/mod/module/module.go index 2a364b229b..cac1a899e9 100644 --- a/vendor/golang.org/x/mod/module/module.go +++ b/vendor/golang.org/x/mod/module/module.go @@ -506,6 +506,7 @@ var badWindowsNames = []string{ "PRN", "AUX", "NUL", + "COM0", "COM1", "COM2", "COM3", @@ -515,6 +516,7 @@ var badWindowsNames = []string{ "COM7", "COM8", "COM9", + "LPT0", "LPT1", "LPT2", "LPT3", diff --git a/vendor/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/reflect.go b/vendor/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/reflect.go index 0048beb1e3..4e9c9aea75 100644 --- a/vendor/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/reflect.go +++ b/vendor/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/reflect.go @@ -132,7 +132,7 @@ func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f panic("too many dependencies") // sanity check } - g.P("var ", goTypesVarName(f), " = []interface{}{") + g.P("var ", goTypesVarName(f), " = []any{") for _, s := range goTypes { g.P(s) } @@ -170,7 +170,7 @@ func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f idx := f.allMessagesByPtr[message] typesVar := messageTypesVarName(f) - g.P(typesVar, "[", idx, "].Exporter = func(v interface{}, i int) interface{} {") + g.P(typesVar, "[", idx, "].Exporter = func(v any, i int) any {") g.P("switch v := v.(*", message.GoIdent, "); i {") for i := 0; i < sf.count; i++ { if name := sf.unexported[i]; name != "" { @@ -191,7 +191,7 @@ func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f typesVar := messageTypesVarName(f) // Associate the wrapper types by directly passing them to the MessageInfo. - g.P(typesVar, "[", idx, "].OneofWrappers = []interface{} {") + g.P(typesVar, "[", idx, "].OneofWrappers = []any {") for _, oneof := range message.Oneofs { if !oneof.Desc.IsSynthetic() { for _, field := range oneof.Fields { diff --git a/vendor/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/well_known_types.go b/vendor/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/well_known_types.go index 47c4fa18f9..9a7b59030b 100644 --- a/vendor/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/well_known_types.go +++ b/vendor/google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo/well_known_types.go @@ -213,11 +213,11 @@ func genPackageKnownComment(f *fileInfo) protogen.Comments { The standard Go "encoding/json" package has functionality to serialize arbitrary types to a large degree. The Value.AsInterface, Struct.AsMap, and ListValue.AsSlice methods can convert the protobuf message representation into - a form represented by interface{}, map[string]interface{}, and []interface{}. + a form represented by any, map[string]any, and []any. This form can be used with other packages that operate on such data structures and also directly with the standard json package. - In order to convert the interface{}, map[string]interface{}, and []interface{} + In order to convert the any, map[string]any, and []any forms back as Value, Struct, and ListValue messages, use the NewStruct, NewList, and NewValue constructor functions. @@ -252,28 +252,28 @@ func genPackageKnownComment(f *fileInfo) protogen.Comments { To construct a Value message representing the above JSON object: - m, err := structpb.NewValue(map[string]interface{}{ + m, err := structpb.NewValue(map[string]any{ "firstName": "John", "lastName": "Smith", "isAlive": true, "age": 27, - "address": map[string]interface{}{ + "address": map[string]any{ "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": "10021-3100", }, - "phoneNumbers": []interface{}{ - map[string]interface{}{ + "phoneNumbers": []any{ + map[string]any{ "type": "home", "number": "212 555-1234", }, - map[string]interface{}{ + map[string]any{ "type": "office", "number": "646 555-4567", }, }, - "children": []interface{}{}, + "children": []any{}, "spouse": nil, }) if err != nil { @@ -634,7 +634,7 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message g.P("// NewStruct constructs a Struct from a general-purpose Go map.") g.P("// The map keys must be valid UTF-8.") g.P("// The map values are converted using NewValue.") - g.P("func NewStruct(v map[string]interface{}) (*Struct, error) {") + g.P("func NewStruct(v map[string]any) (*Struct, error) {") g.P(" x := &Struct{Fields: make(map[string]*Value, len(v))}") g.P(" for k, v := range v {") g.P(" if !", utf8Package.Ident("ValidString"), "(k) {") @@ -652,9 +652,9 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message g.P("// AsMap converts x to a general-purpose Go map.") g.P("// The map values are converted by calling Value.AsInterface.") - g.P("func (x *Struct) AsMap() map[string]interface{} {") + g.P("func (x *Struct) AsMap() map[string]any {") g.P(" f := x.GetFields()") - g.P(" vs := make(map[string]interface{}, len(f))") + g.P(" vs := make(map[string]any, len(f))") g.P(" for k, v := range f {") g.P(" vs[k] = v.AsInterface()") g.P(" }") @@ -675,7 +675,7 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message case genid.ListValue_message_fullname: g.P("// NewList constructs a ListValue from a general-purpose Go slice.") g.P("// The slice elements are converted using NewValue.") - g.P("func NewList(v []interface{}) (*ListValue, error) {") + g.P("func NewList(v []any) (*ListValue, error) {") g.P(" x := &ListValue{Values: make([]*Value, len(v))}") g.P(" for i, v := range v {") g.P(" var err error") @@ -690,9 +690,9 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message g.P("// AsSlice converts x to a general-purpose Go slice.") g.P("// The slice elements are converted by calling Value.AsInterface.") - g.P("func (x *ListValue) AsSlice() []interface{} {") + g.P("func (x *ListValue) AsSlice() []any {") g.P(" vals := x.GetValues()") - g.P(" vs := make([]interface{}, len(vals))") + g.P(" vs := make([]any, len(vals))") g.P(" for i, v := range vals {") g.P(" vs[i] = v.AsInterface()") g.P(" }") @@ -723,13 +723,13 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message g.P("// ║ float32, float64 │ stored as NumberValue ║") g.P("// ║ string │ stored as StringValue; must be valid UTF-8 ║") g.P("// ║ []byte │ stored as StringValue; base64-encoded ║") - g.P("// ║ map[string]interface{} │ stored as StructValue ║") - g.P("// ║ []interface{} │ stored as ListValue ║") + g.P("// ║ map[string]any │ stored as StructValue ║") + g.P("// ║ []any │ stored as ListValue ║") g.P("// ╚════════════════════════╧════════════════════════════════════════════╝") g.P("//") g.P("// When converting an int64 or uint64 to a NumberValue, numeric precision loss") g.P("// is possible since they are stored as a float64.") - g.P("func NewValue(v interface{}) (*Value, error) {") + g.P("func NewValue(v any) (*Value, error) {") g.P(" switch v := v.(type) {") g.P(" case nil:") g.P(" return NewNullValue(), nil") @@ -759,13 +759,13 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message g.P(" case []byte:") g.P(" s := ", base64Package.Ident("StdEncoding"), ".EncodeToString(v)") g.P(" return NewStringValue(s), nil") - g.P(" case map[string]interface{}:") + g.P(" case map[string]any:") g.P(" v2, err := NewStruct(v)") g.P(" if err != nil {") g.P(" return nil, err") g.P(" }") g.P(" return NewStructValue(v2), nil") - g.P(" case []interface{}:") + g.P(" case []any:") g.P(" v2, err := NewList(v)") g.P(" if err != nil {") g.P(" return nil, err") @@ -820,7 +820,7 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message g.P("//") g.P("// Floating-point values (i.e., \"NaN\", \"Infinity\", and \"-Infinity\") are") g.P("// converted as strings to remain compatible with MarshalJSON.") - g.P("func (x *Value) AsInterface() interface{} {") + g.P("func (x *Value) AsInterface() any {") g.P(" switch v := x.GetKind().(type) {") g.P(" case *Value_NumberValue:") g.P(" if v != nil {") diff --git a/vendor/google.golang.org/protobuf/compiler/protogen/protogen.go b/vendor/google.golang.org/protobuf/compiler/protogen/protogen.go index b631914dc2..1024a84e7d 100644 --- a/vendor/google.golang.org/protobuf/compiler/protogen/protogen.go +++ b/vendor/google.golang.org/protobuf/compiler/protogen/protogen.go @@ -955,7 +955,7 @@ func (gen *Plugin) NewGeneratedFile(filename string, goImportPath GoImportPath) // P prints a line to the generated output. It converts each parameter to a // string following the same rules as [fmt.Print]. It never inserts spaces // between parameters. -func (g *GeneratedFile) P(v ...interface{}) { +func (g *GeneratedFile) P(v ...any) { for _, x := range v { switch x := x.(type) { case GoIdent: diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/decode.go b/vendor/google.golang.org/protobuf/encoding/protojson/decode.go index f47902371a..bb2966e3b4 100644 --- a/vendor/google.golang.org/protobuf/encoding/protojson/decode.go +++ b/vendor/google.golang.org/protobuf/encoding/protojson/decode.go @@ -102,7 +102,7 @@ type decoder struct { } // newError returns an error object with position info. -func (d decoder) newError(pos int, f string, x ...interface{}) error { +func (d decoder) newError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("(line %d:%d): ", line, column) return errors.New(head+f, x...) @@ -114,7 +114,7 @@ func (d decoder) unexpectedTokenError(tok json.Token) error { } // syntaxError returns a syntax error for given position. -func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { +func (d decoder) syntaxError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("syntax error (line %d:%d): ", line, column) return errors.New(head+f, x...) diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go index a45f112bce..24bc98ac42 100644 --- a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +++ b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go @@ -84,7 +84,7 @@ type decoder struct { } // newError returns an error object with position info. -func (d decoder) newError(pos int, f string, x ...interface{}) error { +func (d decoder) newError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("(line %d:%d): ", line, column) return errors.New(head+f, x...) @@ -96,7 +96,7 @@ func (d decoder) unexpectedTokenError(tok text.Token) error { } // syntaxError returns a syntax error for given position. -func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { +func (d decoder) syntaxError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("syntax error (line %d:%d): ", line, column) return errors.New(head+f, x...) diff --git a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go index d2b3ac031e..ea1d3e65a5 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go @@ -214,7 +214,7 @@ func (d *Decoder) parseNext() (Token, error) { // newSyntaxError returns an error with line and column information useful for // syntax errors. -func (d *Decoder) newSyntaxError(pos int, f string, x ...interface{}) error { +func (d *Decoder) newSyntaxError(pos int, f string, x ...any) error { e := errors.New(f, x...) line, column := d.Position(pos) return errors.New("syntax error (line %d:%d): %v", line, column, e) diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go index 87853e786d..099b2bf451 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go @@ -601,7 +601,7 @@ func (d *Decoder) consumeToken(kind Kind, size int, attrs uint8) Token { // newSyntaxError returns a syntax error with line and column information for // current position. -func (d *Decoder) newSyntaxError(f string, x ...interface{}) error { +func (d *Decoder) newSyntaxError(f string, x ...any) error { e := errors.New(f, x...) line, column := d.Position(len(d.orig) - len(d.in)) return errors.New("syntax error (line %d:%d): %v", line, column, e) diff --git a/vendor/google.golang.org/protobuf/internal/errors/errors.go b/vendor/google.golang.org/protobuf/internal/errors/errors.go index d96719829c..c2d6bd5265 100644 --- a/vendor/google.golang.org/protobuf/internal/errors/errors.go +++ b/vendor/google.golang.org/protobuf/internal/errors/errors.go @@ -17,7 +17,7 @@ var Error = errors.New("protobuf error") // New formats a string according to the format specifier and arguments and // returns an error that has a "proto" prefix. -func New(f string, x ...interface{}) error { +func New(f string, x ...any) error { return &prefixError{s: format(f, x...)} } @@ -43,7 +43,7 @@ func (e *prefixError) Unwrap() error { // Wrap returns an error that has a "proto" prefix, the formatted string described // by the format specifier and arguments, and a suffix of err. The error wraps err. -func Wrap(err error, f string, x ...interface{}) error { +func Wrap(err error, f string, x ...any) error { return &wrapError{ s: format(f, x...), err: err, @@ -67,7 +67,7 @@ func (e *wrapError) Is(target error) bool { return target == Error } -func format(f string, x ...interface{}) string { +func format(f string, x ...any) string { // avoid "proto: " prefix when chaining for i := 0; i < len(x); i++ { switch e := x[i].(type) { diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go index ece53bea32..df53ff40b2 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go @@ -383,6 +383,10 @@ func (fd *Field) Message() protoreflect.MessageDescriptor { } return fd.L1.Message } +func (fd *Field) IsMapEntry() bool { + parent, ok := fd.L0.Parent.(protoreflect.MessageDescriptor) + return ok && parent.IsMapEntry() +} func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) } func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {} diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go index 3bc3b1cdf8..8a57d60b08 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go @@ -534,7 +534,7 @@ func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protor } var nameBuilderPool = sync.Pool{ - New: func() interface{} { return new(strs.Builder) }, + New: func() any { return new(strs.Builder) }, } func getBuilder() *strs.Builder { diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go index 570181eb48..e56c91a8db 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go @@ -45,6 +45,11 @@ func (file *File) resolveMessages() { case protoreflect.MessageKind, protoreflect.GroupKind: fd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx) depIdx++ + if fd.L1.Kind == protoreflect.GroupKind && (fd.IsMap() || fd.IsMapEntry()) { + // A map field might inherit delimited encoding from a file-wide default feature. + // But maps never actually use delimited encoding. (At least for now...) + fd.L1.Kind = protoreflect.MessageKind + } } // Default is resolved here since it depends on Enum being resolved. diff --git a/vendor/google.golang.org/protobuf/internal/filetype/build.go b/vendor/google.golang.org/protobuf/internal/filetype/build.go index f0e38c4ef4..ba83fea44c 100644 --- a/vendor/google.golang.org/protobuf/internal/filetype/build.go +++ b/vendor/google.golang.org/protobuf/internal/filetype/build.go @@ -68,7 +68,7 @@ type Builder struct { // and for input and output messages referenced by service methods. // Dependencies must come after declarations, but the ordering of // dependencies themselves is unspecified. - GoTypes []interface{} + GoTypes []any // DependencyIndexes is an ordered list of indexes into GoTypes for the // dependencies of messages, extensions, or services. @@ -268,7 +268,7 @@ func (x depIdxs) Get(i, j int32) int32 { type ( resolverByIndex struct { - goTypes []interface{} + goTypes []any depIdxs depIdxs fileRegistry } diff --git a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go index 1447a11987..f30ab6b586 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go @@ -860,11 +860,13 @@ const ( EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated" EnumValueOptions_Features_field_name protoreflect.Name = "features" EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact" + EnumValueOptions_FeatureSupport_field_name protoreflect.Name = "feature_support" EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated" EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features" EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact" + EnumValueOptions_FeatureSupport_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.feature_support" EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option" ) @@ -873,6 +875,7 @@ const ( EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1 EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2 EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3 + EnumValueOptions_FeatureSupport_field_number protoreflect.FieldNumber = 4 EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) diff --git a/vendor/google.golang.org/protobuf/internal/impl/api_export.go b/vendor/google.golang.org/protobuf/internal/impl/api_export.go index a371f98de1..5d5771c2ed 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/api_export.go +++ b/vendor/google.golang.org/protobuf/internal/impl/api_export.go @@ -22,13 +22,13 @@ type Export struct{} // NewError formats a string according to the format specifier and arguments and // returns an error that has a "proto" prefix. -func (Export) NewError(f string, x ...interface{}) error { +func (Export) NewError(f string, x ...any) error { return errors.New(f, x...) } // enum is any enum type generated by protoc-gen-go // and must be a named int32 type. -type enum = interface{} +type enum = any // EnumOf returns the protoreflect.Enum interface over e. // It returns nil if e is nil. @@ -81,7 +81,7 @@ func (Export) EnumStringOf(ed protoreflect.EnumDescriptor, n protoreflect.EnumNu // message is any message type generated by protoc-gen-go // and must be a pointer to a named struct type. -type message = interface{} +type message = any // legacyMessageWrapper wraps a v2 message as a v1 message. type legacyMessageWrapper struct{ m protoreflect.ProtoMessage } diff --git a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go index bff041edc9..f29e6a8fa8 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +++ b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go @@ -68,7 +68,7 @@ func (mi *MessageInfo) isInitExtensions(ext *map[int32]ExtensionField) error { } for _, x := range *ext { ei := getExtensionFieldInfo(x.Type()) - if ei.funcs.isInit == nil { + if ei.funcs.isInit == nil || x.isUnexpandedLazy() { continue } v := x.Value() diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go index 2b8f122c27..4bb0a7a20c 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go @@ -99,6 +99,28 @@ func (f *ExtensionField) canLazy(xt protoreflect.ExtensionType) bool { return false } +// isUnexpandedLazy returns true if the ExensionField is lazy and not +// yet expanded, which means it's present and already checked for +// initialized required fields. +func (f *ExtensionField) isUnexpandedLazy() bool { + return f.lazy != nil && atomic.LoadUint32(&f.lazy.atomicOnce) == 0 +} + +// lazyBuffer retrieves the buffer for a lazy extension if it's not yet expanded. +// +// The returned buffer has to be kept over whatever operation we're planning, +// as re-retrieving it will fail after the message is lazily decoded. +func (f *ExtensionField) lazyBuffer() []byte { + // This function might be in the critical path, so check the atomic without + // taking a look first, then only take the lock if needed. + if !f.isUnexpandedLazy() { + return nil + } + f.lazy.mu.Lock() + defer f.lazy.mu.Unlock() + return f.lazy.b +} + func (f *ExtensionField) lazyInit() { f.lazy.mu.Lock() defer f.lazy.mu.Unlock() diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go b/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go index b7a23faf1e..7a16ec13dd 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go @@ -26,6 +26,15 @@ func sizeMessageSet(mi *MessageInfo, p pointer, opts marshalOptions) (size int) } num, _ := protowire.DecodeTag(xi.wiretag) size += messageset.SizeField(num) + if fullyLazyExtensions(opts) { + // Don't expand the extension, instead use the buffer to calculate size + if lb := x.lazyBuffer(); lb != nil { + // We got hold of the buffer, so it's still lazy. + // Don't count the tag size in the extension buffer, it's already added. + size += protowire.SizeTag(messageset.FieldMessage) + len(lb) - xi.tagsize + continue + } + } size += xi.funcs.size(x.Value(), protowire.SizeTag(messageset.FieldMessage), opts) } @@ -85,6 +94,19 @@ func marshalMessageSetField(mi *MessageInfo, b []byte, x ExtensionField, opts ma xi := getExtensionFieldInfo(x.Type()) num, _ := protowire.DecodeTag(xi.wiretag) b = messageset.AppendFieldStart(b, num) + + if fullyLazyExtensions(opts) { + // Don't expand the extension if it's still in wire format, instead use the buffer content. + if lb := x.lazyBuffer(); lb != nil { + // The tag inside the lazy buffer is a different tag (the extension + // number), but what we need here is the tag for FieldMessage: + b = protowire.AppendVarint(b, protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType)) + b = append(b, lb[xi.tagsize:]...) + b = messageset.AppendFieldEnd(b) + return b, nil + } + } + b, err := xi.funcs.marshal(b, x.Value(), protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType), opts) if err != nil { return b, err diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert.go b/vendor/google.golang.org/protobuf/internal/impl/convert.go index 185ef2efa5..e06ece55a2 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert.go @@ -14,7 +14,7 @@ import ( // unwrapper unwraps the value to the underlying value. // This is implemented by List and Map. type unwrapper interface { - protoUnwrap() interface{} + protoUnwrap() any } // A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types. diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_list.go b/vendor/google.golang.org/protobuf/internal/impl/convert_list.go index f89136516f..18cb96fd70 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert_list.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert_list.go @@ -136,6 +136,6 @@ func (ls *listReflect) NewElement() protoreflect.Value { func (ls *listReflect) IsValid() bool { return !ls.v.IsNil() } -func (ls *listReflect) protoUnwrap() interface{} { +func (ls *listReflect) protoUnwrap() any { return ls.v.Interface() } diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go index f30b0a0576..304244a651 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go @@ -116,6 +116,6 @@ func (ms *mapReflect) NewValue() protoreflect.Value { func (ms *mapReflect) IsValid() bool { return !ms.v.IsNil() } -func (ms *mapReflect) protoUnwrap() interface{} { +func (ms *mapReflect) protoUnwrap() any { return ms.v.Interface() } diff --git a/vendor/google.golang.org/protobuf/internal/impl/encode.go b/vendor/google.golang.org/protobuf/internal/impl/encode.go index 845c67d6e7..febd212247 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/encode.go +++ b/vendor/google.golang.org/protobuf/internal/impl/encode.go @@ -49,8 +49,11 @@ func (mi *MessageInfo) sizePointer(p pointer, opts marshalOptions) (size int) { return 0 } if opts.UseCachedSize() && mi.sizecacheOffset.IsValid() { - if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size >= 0 { - return int(size) + // The size cache contains the size + 1, to allow the + // zero value to be invalid, while also allowing for a + // 0 size to be cached. + if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size > 0 { + return int(size - 1) } } return mi.sizePointerSlow(p, opts) @@ -60,7 +63,7 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int if flags.ProtoLegacy && mi.isMessageSet { size = sizeMessageSet(mi, p, opts) if mi.sizecacheOffset.IsValid() { - atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size)) + atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1)) } return size } @@ -84,13 +87,16 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int } } if mi.sizecacheOffset.IsValid() { - if size > math.MaxInt32 { + if size > (math.MaxInt32 - 1) { // The size is too large for the int32 sizecache field. // We will need to recompute the size when encoding; // unfortunately expensive, but better than invalid output. - atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), -1) + atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), 0) } else { - atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size)) + // The size cache contains the size + 1, to allow the + // zero value to be invalid, while also allowing for a + // 0 size to be cached. + atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1)) } } return size @@ -149,6 +155,14 @@ func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOpt return b, nil } +// fullyLazyExtensions returns true if we should attempt to keep extensions lazy over size and marshal. +func fullyLazyExtensions(opts marshalOptions) bool { + // When deterministic marshaling is requested, force an unmarshal for lazy + // extensions to produce a deterministic result, instead of passing through + // bytes lazily that may or may not match what Go Protobuf would produce. + return opts.flags&piface.MarshalDeterministic == 0 +} + func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) { if ext == nil { return 0 @@ -158,6 +172,14 @@ func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marsha if xi.funcs.size == nil { continue } + if fullyLazyExtensions(opts) { + // Don't expand the extension, instead use the buffer to calculate size + if lb := x.lazyBuffer(); lb != nil { + // We got hold of the buffer, so it's still lazy. + n += len(lb) + continue + } + } n += xi.funcs.size(x.Value(), xi.tagsize, opts) } return n @@ -176,6 +198,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField, var err error for _, x := range *ext { xi := getExtensionFieldInfo(x.Type()) + if fullyLazyExtensions(opts) { + // Don't expand the extension if it's still in wire format, instead use the buffer content. + if lb := x.lazyBuffer(); lb != nil { + b = append(b, lb...) + continue + } + } b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts) } return b, err @@ -191,6 +220,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField, for _, k := range keys { x := (*ext)[int32(k)] xi := getExtensionFieldInfo(x.Type()) + if fullyLazyExtensions(opts) { + // Don't expand the extension if it's still in wire format, instead use the buffer content. + if lb := x.lazyBuffer(); lb != nil { + b = append(b, lb...) + continue + } + } b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts) if err != nil { return b, err diff --git a/vendor/google.golang.org/protobuf/internal/impl/extension.go b/vendor/google.golang.org/protobuf/internal/impl/extension.go index cb25b0bae1..e31249f64f 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/extension.go +++ b/vendor/google.golang.org/protobuf/internal/impl/extension.go @@ -53,7 +53,7 @@ type ExtensionInfo struct { // type returned by InterfaceOf may not be identical. // // Deprecated: Use InterfaceOf(xt.Zero()) instead. - ExtensionType interface{} + ExtensionType any // Field is the field number of the extension. // @@ -95,16 +95,16 @@ func (xi *ExtensionInfo) New() protoreflect.Value { func (xi *ExtensionInfo) Zero() protoreflect.Value { return xi.lazyInit().Zero() } -func (xi *ExtensionInfo) ValueOf(v interface{}) protoreflect.Value { +func (xi *ExtensionInfo) ValueOf(v any) protoreflect.Value { return xi.lazyInit().PBValueOf(reflect.ValueOf(v)) } -func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) interface{} { +func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) any { return xi.lazyInit().GoValueOf(v).Interface() } func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool { return xi.lazyInit().IsValidPB(v) } -func (xi *ExtensionInfo) IsValidInterface(v interface{}) bool { +func (xi *ExtensionInfo) IsValidInterface(v any) bool { return xi.lazyInit().IsValidGo(reflect.ValueOf(v)) } func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor { diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go index c1c33d0057..81b2b1a763 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go @@ -97,7 +97,7 @@ func (e *legacyEnumWrapper) Number() protoreflect.EnumNumber { func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum { return e } -func (e *legacyEnumWrapper) protoUnwrap() interface{} { +func (e *legacyEnumWrapper) protoUnwrap() any { v := reflect.New(e.goTyp).Elem() v.SetInt(int64(e.num)) return v.Interface() diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go index 950e9a1fe7..bf0b6049b4 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go @@ -216,7 +216,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName } for _, fn := range methods { for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { - if vs, ok := v.Interface().([]interface{}); ok { + if vs, ok := v.Interface().([]any); ok { for _, v := range vs { oneofWrappers = append(oneofWrappers, reflect.TypeOf(v)) } @@ -567,6 +567,6 @@ func (m aberrantMessage) IsValid() bool { func (m aberrantMessage) ProtoMethods() *protoiface.Methods { return aberrantProtoMethods } -func (m aberrantMessage) protoUnwrap() interface{} { +func (m aberrantMessage) protoUnwrap() any { return m.v.Interface() } diff --git a/vendor/google.golang.org/protobuf/internal/impl/message.go b/vendor/google.golang.org/protobuf/internal/impl/message.go index 629bacdced..019399d454 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message.go @@ -35,7 +35,7 @@ type MessageInfo struct { Exporter exporter // OneofWrappers is list of pointers to oneof wrapper struct types. - OneofWrappers []interface{} + OneofWrappers []any initMu sync.Mutex // protects all unexported fields initDone uint32 @@ -47,7 +47,7 @@ type MessageInfo struct { // exporter is a function that returns a reference to the ith field of v, // where v is a pointer to a struct. It returns nil if it does not support // exporting the requested field (e.g., already exported). -type exporter func(v interface{}, i int) interface{} +type exporter func(v any, i int) any // getMessageInfo returns the MessageInfo for any message type that // is generated by our implementation of protoc-gen-go (for v2 and on). @@ -201,7 +201,7 @@ fieldLoop: } for _, fn := range methods { for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { - if vs, ok := v.Interface().([]interface{}); ok { + if vs, ok := v.Interface().([]any); ok { oneofWrappers = vs } } @@ -256,7 +256,7 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType { type mapEntryType struct { desc protoreflect.MessageDescriptor - valType interface{} // zero value of enum or message type + valType any // zero value of enum or message type } func (mt mapEntryType) New() protoreflect.Message { diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go index a6f0dbdade..ecb4623d70 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go @@ -20,7 +20,7 @@ type reflectMessageInfo struct { // fieldTypes contains the zero value of an enum or message field. // For lists, it contains the element type. // For maps, it contains the entry value type. - fieldTypes map[protoreflect.FieldNumber]interface{} + fieldTypes map[protoreflect.FieldNumber]any // denseFields is a subset of fields where: // 0 < fieldDesc.Number() < len(denseFields) @@ -28,7 +28,7 @@ type reflectMessageInfo struct { denseFields []*fieldInfo // rangeInfos is a list of all fields (not belonging to a oneof) and oneofs. - rangeInfos []interface{} // either *fieldInfo or *oneofInfo + rangeInfos []any // either *fieldInfo or *oneofInfo getUnknown func(pointer) protoreflect.RawFields setUnknown func(pointer, protoreflect.RawFields) @@ -224,7 +224,7 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) { } if ft != nil { if mi.fieldTypes == nil { - mi.fieldTypes = make(map[protoreflect.FieldNumber]interface{}) + mi.fieldTypes = make(map[protoreflect.FieldNumber]any) } mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface() } @@ -255,6 +255,10 @@ func (m *extensionMap) Has(xd protoreflect.ExtensionTypeDescriptor) (ok bool) { if !ok { return false } + if x.isUnexpandedLazy() { + // Avoid calling x.Value(), which triggers a lazy unmarshal. + return true + } switch { case xd.IsList(): return x.Value().List().Len() > 0 @@ -389,7 +393,7 @@ var ( // MessageOf returns a reflective view over a message. The input must be a // pointer to a named Go struct. If the provided type has a ProtoReflect method, // it must be implemented by calling this method. -func (mi *MessageInfo) MessageOf(m interface{}) protoreflect.Message { +func (mi *MessageInfo) MessageOf(m any) protoreflect.Message { if reflect.TypeOf(m) != mi.GoReflectType { panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType)) } @@ -417,7 +421,7 @@ func (m *messageIfaceWrapper) Reset() { func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message { return (*messageReflectWrapper)(m) } -func (m *messageIfaceWrapper) protoUnwrap() interface{} { +func (m *messageIfaceWrapper) protoUnwrap() any { return m.p.AsIfaceOf(m.mi.GoReflectType.Elem()) } diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go index 29ba6bd355..99dc23c6f0 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go @@ -23,7 +23,7 @@ func (m *messageState) New() protoreflect.Message { func (m *messageState) Interface() protoreflect.ProtoMessage { return m.protoUnwrap().(protoreflect.ProtoMessage) } -func (m *messageState) protoUnwrap() interface{} { +func (m *messageState) protoUnwrap() any { return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) } func (m *messageState) ProtoMethods() *protoiface.Methods { @@ -154,7 +154,7 @@ func (m *messageReflectWrapper) Interface() protoreflect.ProtoMessage { } return (*messageIfaceWrapper)(m) } -func (m *messageReflectWrapper) protoUnwrap() interface{} { +func (m *messageReflectWrapper) protoUnwrap() any { return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) } func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods { diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go index 517e94434c..da685e8a29 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go @@ -16,7 +16,7 @@ import ( const UnsafeEnabled = false // Pointer is an opaque pointer type. -type Pointer interface{} +type Pointer any // offset represents the offset to a struct field, accessible from a pointer. // The offset is the field index into a struct. @@ -62,7 +62,7 @@ func pointerOfValue(v reflect.Value) pointer { } // pointerOfIface returns the pointer portion of an interface. -func pointerOfIface(v interface{}) pointer { +func pointerOfIface(v any) pointer { return pointer{v: reflect.ValueOf(v)} } @@ -93,7 +93,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value { // AsIfaceOf treats p as a pointer to an object of type t and returns the value. // It is equivalent to p.AsValueOf(t).Interface() -func (p pointer) AsIfaceOf(t reflect.Type) interface{} { +func (p pointer) AsIfaceOf(t reflect.Type) any { return p.AsValueOf(t).Interface() } diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go index 4b020e3116..5f20ca5d8a 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go @@ -50,7 +50,7 @@ func pointerOfValue(v reflect.Value) pointer { } // pointerOfIface returns the pointer portion of an interface. -func pointerOfIface(v interface{}) pointer { +func pointerOfIface(v any) pointer { type ifaceHeader struct { Type unsafe.Pointer Data unsafe.Pointer @@ -80,7 +80,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value { // AsIfaceOf treats p as a pointer to an object of type t and returns the value. // It is equivalent to p.AsValueOf(t).Interface() -func (p pointer) AsIfaceOf(t reflect.Type) interface{} { +func (p pointer) AsIfaceOf(t reflect.Type) any { // TODO: Use tricky unsafe magic to directly create ifaceHeader. return p.AsValueOf(t).Interface() } diff --git a/vendor/google.golang.org/protobuf/internal/msgfmt/format.go b/vendor/google.golang.org/protobuf/internal/msgfmt/format.go index a319550f69..17b3f27b8a 100644 --- a/vendor/google.golang.org/protobuf/internal/msgfmt/format.go +++ b/vendor/google.golang.org/protobuf/internal/msgfmt/format.go @@ -86,7 +86,7 @@ func appendMessage(b []byte, m protoreflect.Message) []byte { return b } -var protocmpMessageType = reflect.TypeOf(map[string]interface{}(nil)) +var protocmpMessageType = reflect.TypeOf(map[string]any(nil)) func appendKnownMessage(b []byte, m protoreflect.Message) []byte { md := m.Descriptor() @@ -98,7 +98,7 @@ func appendKnownMessage(b []byte, m protoreflect.Message) []byte { if v := reflect.ValueOf(m); v.Type().ConvertibleTo(protocmpMessageType) { // For protocmp.Message, directly obtain the sub-message value // which is stored in structured form, rather than as raw bytes. - m2 := v.Convert(protocmpMessageType).Interface().(map[string]interface{}) + m2 := v.Convert(protocmpMessageType).Interface().(map[string]any) v, ok := m2[string(genid.Any_Value_field_name)].(proto.Message) if !ok { return nil diff --git a/vendor/google.golang.org/protobuf/internal/order/range.go b/vendor/google.golang.org/protobuf/internal/order/range.go index 1665a68e5b..a1f09162d0 100644 --- a/vendor/google.golang.org/protobuf/internal/order/range.go +++ b/vendor/google.golang.org/protobuf/internal/order/range.go @@ -18,7 +18,7 @@ type messageField struct { } var messageFieldPool = sync.Pool{ - New: func() interface{} { return new([]messageField) }, + New: func() any { return new([]messageField) }, } type ( @@ -69,7 +69,7 @@ type mapEntry struct { } var mapEntryPool = sync.Pool{ - New: func() interface{} { return new([]mapEntry) }, + New: func() any { return new([]mapEntry) }, } type ( diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go index a3cba50802..dbbf1f6862 100644 --- a/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/vendor/google.golang.org/protobuf/internal/version/version.go @@ -52,7 +52,7 @@ import ( const ( Major = 1 Minor = 34 - Patch = 1 + Patch = 2 PreRelease = "" ) diff --git a/vendor/google.golang.org/protobuf/proto/extension.go b/vendor/google.golang.org/protobuf/proto/extension.go index c9c8721a69..d248f29284 100644 --- a/vendor/google.golang.org/protobuf/proto/extension.go +++ b/vendor/google.golang.org/protobuf/proto/extension.go @@ -39,7 +39,7 @@ func ClearExtension(m Message, xt protoreflect.ExtensionType) { // If the field is unpopulated, it returns the default value for // scalars and an immutable, empty value for lists or messages. // It panics if xt does not extend m. -func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { +func GetExtension(m Message, xt protoreflect.ExtensionType) any { // Treat nil message interface as an empty message; return the default. if m == nil { return xt.InterfaceOf(xt.Zero()) @@ -51,7 +51,7 @@ func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { // SetExtension stores the value of an extension field. // It panics if m is invalid, xt does not extend m, or if type of v // is invalid for the specified extension field. -func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { +func SetExtension(m Message, xt protoreflect.ExtensionType, v any) { xd := xt.TypeDescriptor() pv := xt.ValueOf(v) @@ -78,7 +78,7 @@ func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { // It returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current extension field. -func RangeExtensions(m Message, f func(protoreflect.ExtensionType, interface{}) bool) { +func RangeExtensions(m Message, f func(protoreflect.ExtensionType, any) bool) { // Treat nil message interface as an empty message; nothing to range over. if m == nil { return diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go index 254ca58542..f3cebab29c 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go @@ -46,6 +46,11 @@ func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*desc if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName()), f.IsWeak()); err != nil { return errors.New("message field %q cannot resolve type: %v", f.FullName(), err) } + if f.L1.Kind == protoreflect.GroupKind && (f.IsMap() || f.IsMapEntry()) { + // A map field might inherit delimited encoding from a file-wide default feature. + // But maps never actually use delimited encoding. (At least for now...) + f.L1.Kind = protoreflect.MessageKind + } if fd.DefaultValue != nil { v, ev, err := unmarshalDefault(fd.GetDefaultValue(), f, r.allowUnresolvable) if err != nil { diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go index c629308675..6de31c2ebd 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go @@ -116,18 +116,6 @@ func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds if m.ExtensionRanges().Len() > 0 { return errors.New("message %q using proto3 semantics cannot have extension ranges", m.FullName()) } - // Verify that field names in proto3 do not conflict if lowercased - // with all underscores removed. - // See protoc v3.8.0: src/google/protobuf/descriptor.cc:5830-5847 - names := map[string]protoreflect.FieldDescriptor{} - for i := 0; i < m.Fields().Len(); i++ { - f1 := m.Fields().Get(i) - s := strings.Replace(strings.ToLower(string(f1.Name())), "_", "", -1) - if f2, ok := names[s]; ok { - return errors.New("message %q using proto3 semantics has conflict: %q with %q", m.FullName(), f1.Name(), f2.Name()) - } - names[s] = f1 - } } for j, fd := range md.GetField() { diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go index 00102d3117..ea154eec44 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go @@ -485,6 +485,8 @@ func (p *SourcePath) appendEnumValueOptions(b []byte) []byte { b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) case 3: b = p.appendSingularField(b, "debug_redact", nil) + case 4: + b = p.appendSingularField(b, "feature_support", (*SourcePath).appendFieldOptions_FeatureSupport) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go index 5b80afe520..cd8fadbaf8 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go @@ -510,7 +510,7 @@ type ExtensionType interface { // // ValueOf is more extensive than protoreflect.ValueOf for a given field's // value as it has more type information available. - ValueOf(interface{}) Value + ValueOf(any) Value // InterfaceOf completely unwraps the Value to the underlying Go type. // InterfaceOf panics if the input is nil or does not represent the @@ -519,13 +519,13 @@ type ExtensionType interface { // // InterfaceOf is able to unwrap the Value further than Value.Interface // as it has more type information available. - InterfaceOf(Value) interface{} + InterfaceOf(Value) any // IsValidValue reports whether the Value is valid to assign to the field. IsValidValue(Value) bool // IsValidInterface reports whether the input is valid to assign to the field. - IsValidInterface(interface{}) bool + IsValidInterface(any) bool } // EnumDescriptor describes an enum and diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go index 7ced876f4e..75f83a2af0 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go @@ -32,11 +32,11 @@ const ( type value struct { pragma.DoNotCompare // 0B - typ valueType // 8B - num uint64 // 8B - str string // 16B - bin []byte // 24B - iface interface{} // 16B + typ valueType // 8B + num uint64 // 8B + str string // 16B + bin []byte // 24B + iface any // 16B } func valueOfString(v string) Value { @@ -45,7 +45,7 @@ func valueOfString(v string) Value { func valueOfBytes(v []byte) Value { return Value{typ: bytesType, bin: v} } -func valueOfIface(v interface{}) Value { +func valueOfIface(v any) Value { return Value{typ: ifaceType, iface: v} } @@ -55,6 +55,6 @@ func (v Value) getString() string { func (v Value) getBytes() []byte { return v.bin } -func (v Value) getIface() interface{} { +func (v Value) getIface() any { return v.iface } diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go index 1603097311..9fe83cef5a 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go @@ -69,8 +69,8 @@ import ( // composite Value. Modifying an empty, read-only value panics. type Value value -// The protoreflect API uses a custom Value union type instead of interface{} -// to keep the future open for performance optimizations. Using an interface{} +// The protoreflect API uses a custom Value union type instead of any +// to keep the future open for performance optimizations. Using an any // always incurs an allocation for primitives (e.g., int64) since it needs to // be boxed on the heap (as interfaces can only contain pointers natively). // Instead, we represent the Value union as a flat struct that internally keeps @@ -85,7 +85,7 @@ type Value value // ValueOf returns a Value initialized with the concrete value stored in v. // This panics if the type does not match one of the allowed types in the // Value union. -func ValueOf(v interface{}) Value { +func ValueOf(v any) Value { switch v := v.(type) { case nil: return Value{} @@ -192,10 +192,10 @@ func (v Value) IsValid() bool { return v.typ != nilType } -// Interface returns v as an interface{}. +// Interface returns v as an any. // // Invariant: v == ValueOf(v).Interface() -func (v Value) Interface() interface{} { +func (v Value) Interface() any { switch v.typ { case nilType: return nil @@ -406,8 +406,8 @@ func (k MapKey) IsValid() bool { return Value(k).IsValid() } -// Interface returns k as an interface{}. -func (k MapKey) Interface() interface{} { +// Interface returns k as an any. +func (k MapKey) Interface() any { return Value(k).Interface() } diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go index b1fdbe3e8e..7f3583ead8 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go @@ -45,7 +45,7 @@ var ( // typeOf returns a pointer to the Go type information. // The pointer is comparable and equal if and only if the types are identical. -func typeOf(t interface{}) unsafe.Pointer { +func typeOf(t any) unsafe.Pointer { return (*ifaceHeader)(unsafe.Pointer(&t)).Type } @@ -80,7 +80,7 @@ func valueOfBytes(v []byte) Value { p := (*sliceHeader)(unsafe.Pointer(&v)) return Value{typ: bytesType, ptr: p.Data, num: uint64(len(v))} } -func valueOfIface(v interface{}) Value { +func valueOfIface(v any) Value { p := (*ifaceHeader)(unsafe.Pointer(&v)) return Value{typ: p.Type, ptr: p.Data} } @@ -93,7 +93,7 @@ func (v Value) getBytes() (x []byte) { *(*sliceHeader)(unsafe.Pointer(&x)) = sliceHeader{Data: v.ptr, Len: int(v.num), Cap: int(v.num)} return x } -func (v Value) getIface() (x interface{}) { +func (v Value) getIface() (x any) { *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} return x } diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go index 4354701117..f7d386990a 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go @@ -15,7 +15,7 @@ import ( type ( ifaceHeader struct { - _ [0]interface{} // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. + _ [0]any // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. Type unsafe.Pointer Data unsafe.Pointer } @@ -37,7 +37,7 @@ var ( // typeOf returns a pointer to the Go type information. // The pointer is comparable and equal if and only if the types are identical. -func typeOf(t interface{}) unsafe.Pointer { +func typeOf(t any) unsafe.Pointer { return (*ifaceHeader)(unsafe.Pointer(&t)).Type } @@ -70,7 +70,7 @@ func valueOfString(v string) Value { func valueOfBytes(v []byte) Value { return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))} } -func valueOfIface(v interface{}) Value { +func valueOfIface(v any) Value { p := (*ifaceHeader)(unsafe.Pointer(&v)) return Value{typ: p.Type, ptr: p.Data} } @@ -81,7 +81,7 @@ func (v Value) getString() string { func (v Value) getBytes() []byte { return unsafe.Slice((*byte)(v.ptr), v.num) } -func (v Value) getIface() (x interface{}) { +func (v Value) getIface() (x any) { *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} return x } diff --git a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go index 6267dc52a6..de17773391 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +++ b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go @@ -95,7 +95,7 @@ type Files struct { // multiple files. Only top-level declarations are registered. // Note that enum values are in the top-level since that are in the same // scope as the parent enum. - descsByName map[protoreflect.FullName]interface{} + descsByName map[protoreflect.FullName]any filesByPath map[string][]protoreflect.FileDescriptor numFiles int } @@ -117,7 +117,7 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error { defer globalMutex.Unlock() } if r.descsByName == nil { - r.descsByName = map[protoreflect.FullName]interface{}{ + r.descsByName = map[protoreflect.FullName]any{ "": &packageDescriptor{}, } r.filesByPath = make(map[string][]protoreflect.FileDescriptor) @@ -485,7 +485,7 @@ type Types struct { } type ( - typesByName map[protoreflect.FullName]interface{} + typesByName map[protoreflect.FullName]any extensionsByMessage map[protoreflect.FullName]extensionsByNumber extensionsByNumber map[protoreflect.FieldNumber]protoreflect.ExtensionType ) @@ -570,7 +570,7 @@ func (r *Types) RegisterExtension(xt protoreflect.ExtensionType) error { return nil } -func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interface{}) error { +func (r *Types) register(kind string, desc protoreflect.Descriptor, typ any) error { name := desc.FullName() prev := r.typesByName[name] if prev != nil { @@ -841,7 +841,7 @@ func (r *Types) RangeExtensionsByMessage(message protoreflect.FullName, f func(p } } -func typeName(t interface{}) string { +func typeName(t any) string { switch t.(type) { case protoreflect.EnumType: return "enum" @@ -854,7 +854,7 @@ func typeName(t interface{}) string { } } -func amendErrorWithCaller(err error, prev, curr interface{}) error { +func amendErrorWithCaller(err error, prev, curr any) error { prevPkg := goPackage(prev) currPkg := goPackage(curr) if prevPkg == "" || currPkg == "" || prevPkg == currPkg { @@ -863,7 +863,7 @@ func amendErrorWithCaller(err error, prev, curr interface{}) error { return errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", err, prevPkg, currPkg) } -func goPackage(v interface{}) string { +func goPackage(v any) string { switch d := v.(type) { case protoreflect.EnumType: v = d.Descriptor() diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go index 10c9030eb0..9403eb0750 100644 --- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go @@ -3012,6 +3012,8 @@ type EnumValueOptions struct { // out when using debug formats, e.g. when the field contains sensitive // credentials. DebugRedact *bool `protobuf:"varint,3,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"` + // Information about the support window of a feature value. + FeatureSupport *FieldOptions_FeatureSupport `protobuf:"bytes,4,opt,name=feature_support,json=featureSupport" json:"feature_support,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } @@ -3075,6 +3077,13 @@ func (x *EnumValueOptions) GetDebugRedact() bool { return Default_EnumValueOptions_DebugRedact } +func (x *EnumValueOptions) GetFeatureSupport() *FieldOptions_FeatureSupport { + if x != nil { + return x.FeatureSupport + } + return nil +} + func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -4706,7 +4715,7 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x67, 0x12, 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x69, 0x6e, 0x67, 0x22, 0x97, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x69, 0x6e, 0x67, 0x22, 0xad, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, @@ -4779,438 +4788,445 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, - 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xf4, 0x03, - 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, - 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, - 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, - 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, - 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, - 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, - 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, - 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, - 0x08, 0x09, 0x10, 0x0a, 0x22, 0x9d, 0x0d, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, - 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, - 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, - 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, - 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, - 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, - 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, - 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, - 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, - 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, - 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, - 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, - 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, - 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, - 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x0f, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, - 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, - 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, - 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x02, 0x0a, 0x0e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, - 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x61, 0x72, 0x6e, 0x69, - 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0f, - 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, - 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, - 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, - 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, - 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, - 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, - 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, - 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, - 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, - 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, - 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, - 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, - 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, - 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, - 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, - 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, - 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, - 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, - 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, - 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, - 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, - 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, - 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, - 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, - 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, - 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, - 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, - 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, - 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, - 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, + 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x52, 0x14, 0x70, + 0x68, 0x70, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x22, 0xf4, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, + 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, + 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, + 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, + 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, - 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, - 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, + 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, + 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x9d, 0x0d, 0x0a, 0x0c, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, + 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, + 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, + 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, + 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, + 0x55, 0x0a, 0x0f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, - 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, - 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x02, 0x0a, + 0x0e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, + 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, + 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, + 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, + 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, + 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, + 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, + 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, + 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, + 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, + 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, + 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, + 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, + 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, + 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, + 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, + 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, - 0x80, 0x80, 0x02, 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, - 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, - 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, - 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, - 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, - 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, - 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, - 0x54, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, - 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, - 0x9a, 0x03, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, - 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, - 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x10, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x1a, 0x4a, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, - 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, - 0x0b, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x0a, 0x0a, - 0x0a, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0e, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, - 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, - 0x3f, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, - 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, - 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, - 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, - 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, - 0x6c, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, - 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, - 0x07, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, - 0x08, 0xe8, 0x07, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x98, 0x01, - 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, - 0x6e, 0x67, 0x42, 0x2d, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, - 0x12, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0b, - 0x12, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, - 0x07, 0x52, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, - 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, - 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x88, - 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, - 0x45, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, - 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, - 0x26, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, - 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, - 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, - 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, - 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, - 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, - 0x0a, 0x12, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, - 0x07, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, - 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, - 0x0a, 0x16, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, - 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, - 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, - 0x49, 0x43, 0x49, 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, - 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, - 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, - 0x0a, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, - 0x45, 0x44, 0x10, 0x02, 0x22, 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, - 0x1f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, - 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, - 0x0a, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x43, 0x0a, 0x0e, - 0x55, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, - 0x0a, 0x17, 0x55, 0x54, 0x46, 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, - 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, - 0x03, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, - 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, - 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, 0x4d, - 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, - 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, 0x41, - 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, 0x02, - 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0xe9, 0x07, 0x2a, 0x06, 0x08, 0xe9, 0x07, 0x10, 0xea, 0x07, - 0x2a, 0x06, 0x08, 0xea, 0x07, 0x10, 0xeb, 0x07, 0x2a, 0x06, 0x08, 0x86, 0x4e, 0x10, 0x87, 0x4e, - 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, 0x10, 0x91, 0x4e, - 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, 0x07, 0x22, 0xd9, 0x03, 0x0a, 0x12, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, - 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, - 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, - 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, - 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, - 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0f, - 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, - 0xe2, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, - 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, + 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, + 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, + 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xd8, 0x02, + 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, + 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, + 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x55, 0x0a, 0x0f, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, + 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x4e, 0x0a, 0x14, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, + 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, + 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, 0x65, + 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x22, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, + 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, + 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, 0x08, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x13, 0x6f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x12, 0x42, 0x0a, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, - 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, - 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, - 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, - 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, - 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, - 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, - 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd0, - 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, - 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, - 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, - 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, - 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, - 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, - 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, - 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, - 0x02, 0x2a, 0xa7, 0x02, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, - 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, - 0x47, 0x41, 0x43, 0x59, 0x10, 0x84, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, 0x0e, - 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, 0xe7, - 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, 0x32, - 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, - 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, 0x45, - 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, - 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, - 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, - 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, 0x0a, 0x13, 0x63, - 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, - 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, - 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, + 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, + 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, + 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, + 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, + 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, + 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, + 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, + 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, + 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x0a, 0x0a, 0x0a, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0e, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x3f, 0x88, 0x01, + 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0d, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x09, + 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, + 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, + 0x09, 0x12, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, + 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x17, 0x72, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, + 0x2d, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, + 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x15, + 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, + 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0xe6, + 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0xb2, + 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x26, 0x88, 0x01, + 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, + 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xb2, 0x01, + 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x42, 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, 0x98, 0x01, + 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, + 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, + 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0a, + 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, + 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, + 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, + 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, + 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, + 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, + 0x02, 0x22, 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, + 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, + 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, + 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x49, 0x0a, 0x0e, 0x55, 0x74, 0x66, + 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, + 0x54, 0x46, 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, + 0x46, 0x59, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x04, + 0x08, 0x01, 0x10, 0x01, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, + 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, + 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, + 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, + 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, + 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, + 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, + 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x8b, 0x4e, 0x2a, 0x06, 0x08, 0x8b, 0x4e, + 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, + 0x10, 0xe8, 0x07, 0x22, 0xef, 0x03, 0x0a, 0x12, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xf8, 0x01, 0x0a, 0x18, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x14, 0x6f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, + 0x62, 0x6c, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, + 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, + 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, + 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, + 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, + 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, + 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, + 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, + 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, + 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, + 0x10, 0x02, 0x2a, 0xa7, 0x02, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, + 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, + 0x45, 0x47, 0x41, 0x43, 0x59, 0x10, 0x84, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, + 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, + 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, + 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, + 0x01, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, + 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, + 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, + 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, + 0x4e, 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, 0x0a, 0x13, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, + 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, } var ( @@ -5227,7 +5243,7 @@ func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte { var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 17) var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 33) -var file_google_protobuf_descriptor_proto_goTypes = []interface{}{ +var file_google_protobuf_descriptor_proto_goTypes = []any{ (Edition)(0), // 0: google.protobuf.Edition (ExtensionRangeOptions_VerificationState)(0), // 1: google.protobuf.ExtensionRangeOptions.VerificationState (FieldDescriptorProto_Type)(0), // 2: google.protobuf.FieldDescriptorProto.Type @@ -5329,38 +5345,39 @@ var file_google_protobuf_descriptor_proto_depIdxs = []int32{ 36, // 46: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet 35, // 47: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 36, // 48: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 49: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 36, // 50: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 51: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 9, // 52: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel - 36, // 53: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 54: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 46, // 55: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart - 10, // 56: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence - 11, // 57: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType - 12, // 58: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding - 13, // 59: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation - 14, // 60: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding - 15, // 61: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat - 47, // 62: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - 0, // 63: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition - 0, // 64: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition - 48, // 65: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location - 49, // 66: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation - 20, // 67: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions - 0, // 68: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition - 0, // 69: google.protobuf.FieldOptions.FeatureSupport.edition_introduced:type_name -> google.protobuf.Edition - 0, // 70: google.protobuf.FieldOptions.FeatureSupport.edition_deprecated:type_name -> google.protobuf.Edition - 0, // 71: google.protobuf.FieldOptions.FeatureSupport.edition_removed:type_name -> google.protobuf.Edition - 0, // 72: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition - 36, // 73: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features:type_name -> google.protobuf.FeatureSet - 36, // 74: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features:type_name -> google.protobuf.FeatureSet - 16, // 75: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic - 76, // [76:76] is the sub-list for method output_type - 76, // [76:76] is the sub-list for method input_type - 76, // [76:76] is the sub-list for extension type_name - 76, // [76:76] is the sub-list for extension extendee - 0, // [0:76] is the sub-list for field type_name + 45, // 49: google.protobuf.EnumValueOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport + 35, // 50: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 51: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 52: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 9, // 53: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel + 36, // 54: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 55: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 46, // 56: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart + 10, // 57: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence + 11, // 58: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType + 12, // 59: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding + 13, // 60: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation + 14, // 61: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding + 15, // 62: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat + 47, // 63: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + 0, // 64: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition + 0, // 65: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition + 48, // 66: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location + 49, // 67: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation + 20, // 68: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions + 0, // 69: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition + 0, // 70: google.protobuf.FieldOptions.FeatureSupport.edition_introduced:type_name -> google.protobuf.Edition + 0, // 71: google.protobuf.FieldOptions.FeatureSupport.edition_deprecated:type_name -> google.protobuf.Edition + 0, // 72: google.protobuf.FieldOptions.FeatureSupport.edition_removed:type_name -> google.protobuf.Edition + 0, // 73: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition + 36, // 74: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features:type_name -> google.protobuf.FeatureSet + 36, // 75: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features:type_name -> google.protobuf.FeatureSet + 16, // 76: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic + 77, // [77:77] is the sub-list for method output_type + 77, // [77:77] is the sub-list for method input_type + 77, // [77:77] is the sub-list for extension type_name + 77, // [77:77] is the sub-list for extension extendee + 0, // [0:77] is the sub-list for field type_name } func init() { file_google_protobuf_descriptor_proto_init() } @@ -5369,7 +5386,7 @@ func file_google_protobuf_descriptor_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FileDescriptorSet); i { case 0: return &v.state @@ -5381,7 +5398,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FileDescriptorProto); i { case 0: return &v.state @@ -5393,7 +5410,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*DescriptorProto); i { case 0: return &v.state @@ -5405,7 +5422,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ExtensionRangeOptions); i { case 0: return &v.state @@ -5419,7 +5436,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*FieldDescriptorProto); i { case 0: return &v.state @@ -5431,7 +5448,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*OneofDescriptorProto); i { case 0: return &v.state @@ -5443,7 +5460,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*EnumDescriptorProto); i { case 0: return &v.state @@ -5455,7 +5472,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*EnumValueDescriptorProto); i { case 0: return &v.state @@ -5467,7 +5484,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*ServiceDescriptorProto); i { case 0: return &v.state @@ -5479,7 +5496,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*MethodDescriptorProto); i { case 0: return &v.state @@ -5491,7 +5508,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*FileOptions); i { case 0: return &v.state @@ -5505,7 +5522,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*MessageOptions); i { case 0: return &v.state @@ -5519,7 +5536,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*FieldOptions); i { case 0: return &v.state @@ -5533,7 +5550,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*OneofOptions); i { case 0: return &v.state @@ -5547,7 +5564,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*EnumOptions); i { case 0: return &v.state @@ -5561,7 +5578,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*EnumValueOptions); i { case 0: return &v.state @@ -5575,7 +5592,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*ServiceOptions); i { case 0: return &v.state @@ -5589,7 +5606,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*MethodOptions); i { case 0: return &v.state @@ -5603,7 +5620,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*UninterpretedOption); i { case 0: return &v.state @@ -5615,7 +5632,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*FeatureSet); i { case 0: return &v.state @@ -5629,7 +5646,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*FeatureSetDefaults); i { case 0: return &v.state @@ -5641,7 +5658,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*SourceCodeInfo); i { case 0: return &v.state @@ -5653,7 +5670,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*GeneratedCodeInfo); i { case 0: return &v.state @@ -5665,7 +5682,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*DescriptorProto_ExtensionRange); i { case 0: return &v.state @@ -5677,7 +5694,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*DescriptorProto_ReservedRange); i { case 0: return &v.state @@ -5689,7 +5706,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*ExtensionRangeOptions_Declaration); i { case 0: return &v.state @@ -5701,7 +5718,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*EnumDescriptorProto_EnumReservedRange); i { case 0: return &v.state @@ -5713,7 +5730,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*FieldOptions_EditionDefault); i { case 0: return &v.state @@ -5725,7 +5742,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v any, i int) any { switch v := v.(*FieldOptions_FeatureSupport); i { case 0: return &v.state @@ -5737,7 +5754,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*UninterpretedOption_NamePart); i { case 0: return &v.state @@ -5749,7 +5766,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*FeatureSetDefaults_FeatureSetEditionDefault); i { case 0: return &v.state @@ -5761,7 +5778,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*SourceCodeInfo_Location); i { case 0: return &v.state @@ -5773,7 +5790,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*GeneratedCodeInfo_Annotation); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go b/vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go index 39b024b46b..1ba1dfa5ad 100644 --- a/vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go +++ b/vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go @@ -294,7 +294,7 @@ func (m *Message) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { case fd.IsMap(): return protoreflect.ValueOfMap(&dynamicMap{ desc: fd, - mapv: make(map[interface{}]protoreflect.Value), + mapv: make(map[any]protoreflect.Value), }) case fd.IsList(): return protoreflect.ValueOfList(&dynamicList{desc: fd}) @@ -450,7 +450,7 @@ func (x *dynamicList) IsValid() bool { type dynamicMap struct { desc protoreflect.FieldDescriptor - mapv map[interface{}]protoreflect.Value + mapv map[any]protoreflect.Value } func (x *dynamicMap) Get(k protoreflect.MapKey) protoreflect.Value { return x.mapv[k.Interface()] } @@ -634,11 +634,11 @@ func newListEntry(fd protoreflect.FieldDescriptor) protoreflect.Value { // // The InterfaceOf and ValueOf methods of the extension type are defined as: // -// func (xt extensionType) ValueOf(iv interface{}) protoreflect.Value { +// func (xt extensionType) ValueOf(iv any) protoreflect.Value { // return protoreflect.ValueOf(iv) // } // -// func (xt extensionType) InterfaceOf(v protoreflect.Value) interface{} { +// func (xt extensionType) InterfaceOf(v protoreflect.Value) any { // return v.Interface() // } // @@ -658,7 +658,7 @@ func (xt extensionType) New() protoreflect.Value { case xt.desc.IsMap(): return protoreflect.ValueOfMap(&dynamicMap{ desc: xt.desc, - mapv: make(map[interface{}]protoreflect.Value), + mapv: make(map[any]protoreflect.Value), }) case xt.desc.IsList(): return protoreflect.ValueOfList(&dynamicList{desc: xt.desc}) @@ -686,18 +686,18 @@ func (xt extensionType) TypeDescriptor() protoreflect.ExtensionTypeDescriptor { return xt.desc } -func (xt extensionType) ValueOf(iv interface{}) protoreflect.Value { +func (xt extensionType) ValueOf(iv any) protoreflect.Value { v := protoreflect.ValueOf(iv) typecheck(xt.desc, v) return v } -func (xt extensionType) InterfaceOf(v protoreflect.Value) interface{} { +func (xt extensionType) InterfaceOf(v protoreflect.Value) any { typecheck(xt.desc, v) return v.Interface() } -func (xt extensionType) IsValidInterface(iv interface{}) bool { +func (xt extensionType) IsValidInterface(iv any) bool { return typeIsValid(xt.desc, protoreflect.ValueOf(iv)) == nil } diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go index b0df3fb334..a2ca940c50 100644 --- a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go +++ b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go @@ -90,27 +90,27 @@ var file_google_protobuf_go_features_proto_rawDesc = []byte{ 0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x01, 0x0a, 0x0a, 0x47, 0x6f, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xba, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67, + 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x0a, 0x47, 0x6f, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xbe, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x6a, 0x73, - 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x7d, 0x88, - 0x01, 0x01, 0x98, 0x01, 0x06, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, 0x75, 0x65, 0x18, 0x84, - 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, 0xe7, 0x07, 0xb2, 0x01, - 0x5b, 0x08, 0xe8, 0x07, 0x10, 0xe8, 0x07, 0x1a, 0x53, 0x54, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x67, - 0x61, 0x63, 0x79, 0x20, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x4a, 0x53, 0x4f, - 0x4e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x66, 0x75, 0x74, - 0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x17, 0x6c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x4a, 0x73, 0x6f, - 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, 0x1b, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, - 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, - 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x70, 0x62, + 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x80, 0x01, + 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, + 0x75, 0x65, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, + 0xe7, 0x07, 0xb2, 0x01, 0x5b, 0x08, 0xe8, 0x07, 0x10, 0xe8, 0x07, 0x1a, 0x53, 0x54, 0x68, 0x65, + 0x20, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x20, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, + 0x6c, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, + 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, + 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, + 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, + 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x62, } var ( @@ -126,7 +126,7 @@ func file_google_protobuf_go_features_proto_rawDescGZIP() []byte { } var file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_go_features_proto_goTypes = []interface{}{ +var file_google_protobuf_go_features_proto_goTypes = []any{ (*GoFeatures)(nil), // 0: pb.GoFeatures (*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet } @@ -146,7 +146,7 @@ func file_google_protobuf_go_features_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GoFeatures); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go index 9de51be540..7172b43d38 100644 --- a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go @@ -445,7 +445,7 @@ func file_google_protobuf_any_proto_rawDescGZIP() []byte { } var file_google_protobuf_any_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_any_proto_goTypes = []interface{}{ +var file_google_protobuf_any_proto_goTypes = []any{ (*Any)(nil), // 0: google.protobuf.Any } var file_google_protobuf_any_proto_depIdxs = []int32{ @@ -462,7 +462,7 @@ func file_google_protobuf_any_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Any); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go index df709a8dd4..1b71bcd910 100644 --- a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go @@ -323,7 +323,7 @@ func file_google_protobuf_duration_proto_rawDescGZIP() []byte { } var file_google_protobuf_duration_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_duration_proto_goTypes = []interface{}{ +var file_google_protobuf_duration_proto_goTypes = []any{ (*Duration)(nil), // 0: google.protobuf.Duration } var file_google_protobuf_duration_proto_depIdxs = []int32{ @@ -340,7 +340,7 @@ func file_google_protobuf_duration_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Duration); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go b/vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go index 9a7277ba39..d87b4fb828 100644 --- a/vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go @@ -115,7 +115,7 @@ func file_google_protobuf_empty_proto_rawDescGZIP() []byte { } var file_google_protobuf_empty_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_empty_proto_goTypes = []interface{}{ +var file_google_protobuf_empty_proto_goTypes = []any{ (*Empty)(nil), // 0: google.protobuf.Empty } var file_google_protobuf_empty_proto_depIdxs = []int32{ @@ -132,7 +132,7 @@ func file_google_protobuf_empty_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_empty_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_empty_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Empty); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go b/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go index e8789cb331..ac1e91bb6d 100644 --- a/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go @@ -537,7 +537,7 @@ func file_google_protobuf_field_mask_proto_rawDescGZIP() []byte { } var file_google_protobuf_field_mask_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_field_mask_proto_goTypes = []interface{}{ +var file_google_protobuf_field_mask_proto_goTypes = []any{ (*FieldMask)(nil), // 0: google.protobuf.FieldMask } var file_google_protobuf_field_mask_proto_depIdxs = []int32{ @@ -554,7 +554,7 @@ func file_google_protobuf_field_mask_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_field_mask_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_field_mask_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FieldMask); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go index d2bac8b88e..d45361cbc7 100644 --- a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go @@ -49,11 +49,11 @@ // The standard Go "encoding/json" package has functionality to serialize // arbitrary types to a large degree. The Value.AsInterface, Struct.AsMap, and // ListValue.AsSlice methods can convert the protobuf message representation into -// a form represented by interface{}, map[string]interface{}, and []interface{}. +// a form represented by any, map[string]any, and []any. // This form can be used with other packages that operate on such data structures // and also directly with the standard json package. // -// In order to convert the interface{}, map[string]interface{}, and []interface{} +// In order to convert the any, map[string]any, and []any // forms back as Value, Struct, and ListValue messages, use the NewStruct, // NewList, and NewValue constructor functions. // @@ -88,28 +88,28 @@ // // To construct a Value message representing the above JSON object: // -// m, err := structpb.NewValue(map[string]interface{}{ +// m, err := structpb.NewValue(map[string]any{ // "firstName": "John", // "lastName": "Smith", // "isAlive": true, // "age": 27, -// "address": map[string]interface{}{ +// "address": map[string]any{ // "streetAddress": "21 2nd Street", // "city": "New York", // "state": "NY", // "postalCode": "10021-3100", // }, -// "phoneNumbers": []interface{}{ -// map[string]interface{}{ +// "phoneNumbers": []any{ +// map[string]any{ // "type": "home", // "number": "212 555-1234", // }, -// map[string]interface{}{ +// map[string]any{ // "type": "office", // "number": "646 555-4567", // }, // }, -// "children": []interface{}{}, +// "children": []any{}, // "spouse": nil, // }) // if err != nil { @@ -197,7 +197,7 @@ type Struct struct { // NewStruct constructs a Struct from a general-purpose Go map. // The map keys must be valid UTF-8. // The map values are converted using NewValue. -func NewStruct(v map[string]interface{}) (*Struct, error) { +func NewStruct(v map[string]any) (*Struct, error) { x := &Struct{Fields: make(map[string]*Value, len(v))} for k, v := range v { if !utf8.ValidString(k) { @@ -214,9 +214,9 @@ func NewStruct(v map[string]interface{}) (*Struct, error) { // AsMap converts x to a general-purpose Go map. // The map values are converted by calling Value.AsInterface. -func (x *Struct) AsMap() map[string]interface{} { +func (x *Struct) AsMap() map[string]any { f := x.GetFields() - vs := make(map[string]interface{}, len(f)) + vs := make(map[string]any, len(f)) for k, v := range f { vs[k] = v.AsInterface() } @@ -306,13 +306,13 @@ type Value struct { // ║ float32, float64 │ stored as NumberValue ║ // ║ string │ stored as StringValue; must be valid UTF-8 ║ // ║ []byte │ stored as StringValue; base64-encoded ║ -// ║ map[string]interface{} │ stored as StructValue ║ -// ║ []interface{} │ stored as ListValue ║ +// ║ map[string]any │ stored as StructValue ║ +// ║ []any │ stored as ListValue ║ // ╚════════════════════════╧════════════════════════════════════════════╝ // // When converting an int64 or uint64 to a NumberValue, numeric precision loss // is possible since they are stored as a float64. -func NewValue(v interface{}) (*Value, error) { +func NewValue(v any) (*Value, error) { switch v := v.(type) { case nil: return NewNullValue(), nil @@ -342,13 +342,13 @@ func NewValue(v interface{}) (*Value, error) { case []byte: s := base64.StdEncoding.EncodeToString(v) return NewStringValue(s), nil - case map[string]interface{}: + case map[string]any: v2, err := NewStruct(v) if err != nil { return nil, err } return NewStructValue(v2), nil - case []interface{}: + case []any: v2, err := NewList(v) if err != nil { return nil, err @@ -396,7 +396,7 @@ func NewListValue(v *ListValue) *Value { // // Floating-point values (i.e., "NaN", "Infinity", and "-Infinity") are // converted as strings to remain compatible with MarshalJSON. -func (x *Value) AsInterface() interface{} { +func (x *Value) AsInterface() any { switch v := x.GetKind().(type) { case *Value_NumberValue: if v != nil { @@ -580,7 +580,7 @@ type ListValue struct { // NewList constructs a ListValue from a general-purpose Go slice. // The slice elements are converted using NewValue. -func NewList(v []interface{}) (*ListValue, error) { +func NewList(v []any) (*ListValue, error) { x := &ListValue{Values: make([]*Value, len(v))} for i, v := range v { var err error @@ -594,9 +594,9 @@ func NewList(v []interface{}) (*ListValue, error) { // AsSlice converts x to a general-purpose Go slice. // The slice elements are converted by calling Value.AsInterface. -func (x *ListValue) AsSlice() []interface{} { +func (x *ListValue) AsSlice() []any { vals := x.GetValues() - vs := make([]interface{}, len(vals)) + vs := make([]any, len(vals)) for i, v := range vals { vs[i] = v.AsInterface() } @@ -716,7 +716,7 @@ func file_google_protobuf_struct_proto_rawDescGZIP() []byte { var file_google_protobuf_struct_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_google_protobuf_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_google_protobuf_struct_proto_goTypes = []interface{}{ +var file_google_protobuf_struct_proto_goTypes = []any{ (NullValue)(0), // 0: google.protobuf.NullValue (*Struct)(nil), // 1: google.protobuf.Struct (*Value)(nil), // 2: google.protobuf.Value @@ -743,7 +743,7 @@ func file_google_protobuf_struct_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_struct_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Struct); i { case 0: return &v.state @@ -755,7 +755,7 @@ func file_google_protobuf_struct_proto_init() { return nil } } - file_google_protobuf_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_struct_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Value); i { case 0: return &v.state @@ -767,7 +767,7 @@ func file_google_protobuf_struct_proto_init() { return nil } } - file_google_protobuf_struct_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_struct_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListValue); i { case 0: return &v.state @@ -780,7 +780,7 @@ func file_google_protobuf_struct_proto_init() { } } } - file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []any{ (*Value_NullValue)(nil), (*Value_NumberValue)(nil), (*Value_StringValue)(nil), diff --git a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go index 81511a3363..83a5a645b0 100644 --- a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go @@ -332,7 +332,7 @@ func file_google_protobuf_timestamp_proto_rawDescGZIP() []byte { } var file_google_protobuf_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_timestamp_proto_goTypes = []interface{}{ +var file_google_protobuf_timestamp_proto_goTypes = []any{ (*Timestamp)(nil), // 0: google.protobuf.Timestamp } var file_google_protobuf_timestamp_proto_depIdxs = []int32{ @@ -349,7 +349,7 @@ func file_google_protobuf_timestamp_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Timestamp); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go b/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go index 762a87130f..e473f826aa 100644 --- a/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go @@ -605,7 +605,7 @@ func file_google_protobuf_wrappers_proto_rawDescGZIP() []byte { } var file_google_protobuf_wrappers_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_google_protobuf_wrappers_proto_goTypes = []interface{}{ +var file_google_protobuf_wrappers_proto_goTypes = []any{ (*DoubleValue)(nil), // 0: google.protobuf.DoubleValue (*FloatValue)(nil), // 1: google.protobuf.FloatValue (*Int64Value)(nil), // 2: google.protobuf.Int64Value @@ -630,7 +630,7 @@ func file_google_protobuf_wrappers_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_wrappers_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*DoubleValue); i { case 0: return &v.state @@ -642,7 +642,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FloatValue); i { case 0: return &v.state @@ -654,7 +654,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Int64Value); i { case 0: return &v.state @@ -666,7 +666,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*UInt64Value); i { case 0: return &v.state @@ -678,7 +678,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Int32Value); i { case 0: return &v.state @@ -690,7 +690,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*UInt32Value); i { case 0: return &v.state @@ -702,7 +702,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*BoolValue); i { case 0: return &v.state @@ -714,7 +714,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*StringValue); i { case 0: return &v.state @@ -726,7 +726,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*BytesValue); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/pluginpb/plugin.pb.go b/vendor/google.golang.org/protobuf/types/pluginpb/plugin.pb.go index 620728f8cc..9066bcc7f3 100644 --- a/vendor/google.golang.org/protobuf/types/pluginpb/plugin.pb.go +++ b/vendor/google.golang.org/protobuf/types/pluginpb/plugin.pb.go @@ -591,7 +591,7 @@ func file_google_protobuf_compiler_plugin_proto_rawDescGZIP() []byte { var file_google_protobuf_compiler_plugin_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_google_protobuf_compiler_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_google_protobuf_compiler_plugin_proto_goTypes = []interface{}{ +var file_google_protobuf_compiler_plugin_proto_goTypes = []any{ (CodeGeneratorResponse_Feature)(0), // 0: google.protobuf.compiler.CodeGeneratorResponse.Feature (*Version)(nil), // 1: google.protobuf.compiler.Version (*CodeGeneratorRequest)(nil), // 2: google.protobuf.compiler.CodeGeneratorRequest @@ -619,7 +619,7 @@ func file_google_protobuf_compiler_plugin_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_compiler_plugin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_compiler_plugin_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Version); i { case 0: return &v.state @@ -631,7 +631,7 @@ func file_google_protobuf_compiler_plugin_proto_init() { return nil } } - file_google_protobuf_compiler_plugin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_compiler_plugin_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CodeGeneratorRequest); i { case 0: return &v.state @@ -643,7 +643,7 @@ func file_google_protobuf_compiler_plugin_proto_init() { return nil } } - file_google_protobuf_compiler_plugin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_compiler_plugin_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*CodeGeneratorResponse); i { case 0: return &v.state @@ -655,7 +655,7 @@ func file_google_protobuf_compiler_plugin_proto_init() { return nil } } - file_google_protobuf_compiler_plugin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_compiler_plugin_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*CodeGeneratorResponse_File); i { case 0: return &v.state diff --git a/vendor/modules.txt b/vendor/modules.txt index dd092dd162..c6e2062538 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -101,7 +101,7 @@ github.com/chai2010/gettext-go/po # github.com/containerd/cgroups/v3 v3.0.3 ## explicit; go 1.18 github.com/containerd/cgroups/v3/cgroup1/stats -# github.com/containerd/containerd v1.7.17 +# github.com/containerd/containerd v1.7.18 ## explicit; go 1.21 github.com/containerd/containerd/api/events github.com/containerd/containerd/api/runtime/sandbox/v1 @@ -162,13 +162,13 @@ github.com/containerd/ttrpc # github.com/containerd/typeurl/v2 v2.1.1 ## explicit; go 1.13 github.com/containerd/typeurl/v2 -# github.com/containers/common v0.59.0 +# github.com/containers/common v0.59.1 ## explicit; go 1.21 github.com/containers/common/pkg/auth github.com/containers/common/pkg/capabilities github.com/containers/common/pkg/completion github.com/containers/common/pkg/password -# github.com/containers/image/v5 v5.31.0 +# github.com/containers/image/v5 v5.31.1 ## explicit; go 1.21 github.com/containers/image/v5/docker github.com/containers/image/v5/docker/policyconfiguration @@ -242,7 +242,7 @@ github.com/davecgh/go-spew/spew # github.com/distribution/reference v0.6.0 ## explicit; go 1.20 github.com/distribution/reference -# github.com/docker/cli v26.1.3+incompatible +# github.com/docker/cli v27.0.2+incompatible ## explicit github.com/docker/cli/cli/config github.com/docker/cli/cli/config/configfile @@ -266,7 +266,6 @@ github.com/docker/docker/api/types/filters github.com/docker/docker/api/types/registry github.com/docker/docker/api/types/versions github.com/docker/docker/errdefs -github.com/docker/docker/pkg/homedir github.com/docker/docker/pkg/ioutils github.com/docker/docker/registry # github.com/docker/docker-credential-helpers v0.8.1 @@ -825,7 +824,7 @@ github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/stor github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/version github.com/operator-framework/operator-lifecycle-manager/pkg/version github.com/operator-framework/operator-lifecycle-manager/util/cpb -# github.com/operator-framework/operator-registry v1.43.1 => ./staging/operator-registry +# github.com/operator-framework/operator-registry v1.44.0 => ./staging/operator-registry ## explicit; go 1.22.0 github.com/operator-framework/operator-registry/alpha/action github.com/operator-framework/operator-registry/alpha/declcfg @@ -1129,7 +1128,7 @@ golang.org/x/exp/slices ## explicit; go 1.11 golang.org/x/lint golang.org/x/lint/golint -# golang.org/x/mod v0.17.0 +# golang.org/x/mod v0.18.0 ## explicit; go 1.18 golang.org/x/mod/internal/lazyregexp golang.org/x/mod/modfile @@ -1316,8 +1315,8 @@ google.golang.org/grpc/tap # google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 ## explicit; go 1.17 google.golang.org/grpc/cmd/protoc-gen-go-grpc -# google.golang.org/protobuf v1.34.1 -## explicit; go 1.17 +# google.golang.org/protobuf v1.34.2 +## explicit; go 1.20 google.golang.org/protobuf/cmd/protoc-gen-go google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo google.golang.org/protobuf/compiler/protogen From 473ad6c9b9b4553dab19f3dd4798e3d060432e38 Mon Sep 17 00:00:00 2001 From: Per Goncalves da Silva Date: Tue, 2 Jul 2024 16:24:57 +0200 Subject: [PATCH 04/29] mark flaky tests (#3333) Signed-off-by: Per Goncalves da Silva Co-authored-by: Per Goncalves da Silva Upstream-repository: operator-lifecycle-manager Upstream-commit: 25aa03958865dc80693621b37e32405b7b3d4ce0 --- .../test/e2e/fail_forward_e2e_test.go | 2 +- .../test/e2e/installplan_e2e_test.go | 2 +- .../test/e2e/operator_condition_e2e_test.go | 2 +- .../test/e2e/subscription_e2e_test.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/staging/operator-lifecycle-manager/test/e2e/fail_forward_e2e_test.go b/staging/operator-lifecycle-manager/test/e2e/fail_forward_e2e_test.go index 592da29e8b..123952ab7d 100644 --- a/staging/operator-lifecycle-manager/test/e2e/fail_forward_e2e_test.go +++ b/staging/operator-lifecycle-manager/test/e2e/fail_forward_e2e_test.go @@ -412,7 +412,7 @@ var _ = Describe("Fail Forward Upgrades", func() { Expect(err).Should(BeNil()) }) - It("eventually reports a successful state when using replaces", func() { + It("[FLAKE] eventually reports a successful state when using replaces", func() { By("patching the catalog with a fixed version") cleanup, deployError := updateCatalogSource(generatedNamespace.GetName(), catalogSourceName, "v0.1.0", "v0.2.0-invalid-deployment", "v0.3.0-replaces-invalid-deployment") Expect(deployError).To(BeNil()) diff --git a/staging/operator-lifecycle-manager/test/e2e/installplan_e2e_test.go b/staging/operator-lifecycle-manager/test/e2e/installplan_e2e_test.go index df4ab35ec9..2315794a8e 100644 --- a/staging/operator-lifecycle-manager/test/e2e/installplan_e2e_test.go +++ b/staging/operator-lifecycle-manager/test/e2e/installplan_e2e_test.go @@ -1435,7 +1435,7 @@ var _ = Describe("Install Plan", func() { // excluded: new CRD, same version, same schema - won't trigger a CRD update tableEntries := []TableEntry{ - Entry("upgrade CRD with deprecated version", schemaPayload{ + Entry("[FLAKE] upgrade CRD with deprecated version", schemaPayload{ name: "upgrade CRD with deprecated version", expectedPhase: operatorsv1alpha1.InstallPlanPhaseComplete, oldCRD: func() *apiextensionsv1.CustomResourceDefinition { diff --git a/staging/operator-lifecycle-manager/test/e2e/operator_condition_e2e_test.go b/staging/operator-lifecycle-manager/test/e2e/operator_condition_e2e_test.go index adeee170e5..bc53ca2acd 100644 --- a/staging/operator-lifecycle-manager/test/e2e/operator_condition_e2e_test.go +++ b/staging/operator-lifecycle-manager/test/e2e/operator_condition_e2e_test.go @@ -32,7 +32,7 @@ var _ = Describe("Operator Condition", func() { TeardownNamespace(generatedNamespace.GetName()) }) - It("OperatorCondition Upgradeable type and overrides", func() { + It("[FLAKE] OperatorCondition Upgradeable type and overrides", func() { By("This test proves that an operator can upgrade successfully when" + " Upgrade condition type is set in OperatorCondition spec. Plus, an operator" + " chooses not to use OperatorCondition, the upgrade process will proceed as" + diff --git a/staging/operator-lifecycle-manager/test/e2e/subscription_e2e_test.go b/staging/operator-lifecycle-manager/test/e2e/subscription_e2e_test.go index 9f8d225ab4..7886f9d91a 100644 --- a/staging/operator-lifecycle-manager/test/e2e/subscription_e2e_test.go +++ b/staging/operator-lifecycle-manager/test/e2e/subscription_e2e_test.go @@ -1408,7 +1408,7 @@ var _ = Describe("Subscription", func() { }) - It("creation with dependencies", func() { + It("[FLAKE] creation with dependencies", func() { kubeClient := newKubeClient() crClient := newCRClient() @@ -2567,7 +2567,7 @@ var _ = Describe("Subscription", func() { Expect(err).Should(BeNil()) }) - It("should report only package and channel deprecation conditions when bundle is no longer deprecated", func() { + It("[FLAKE] should report only package and channel deprecation conditions when bundle is no longer deprecated", func() { By("patching the OperatorGroup to reduce the bundle unpacking timeout") ogNN := types.NamespacedName{Name: operatorGroup.GetName(), Namespace: generatedNamespace.GetName()} addBundleUnpackTimeoutOGAnnotation(context.Background(), ctx.Ctx().Client(), ogNN, "5m") From 7f156e85f9520f29f7bacb4a1be4c08a5b213e18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 08:05:29 +0000 Subject: [PATCH 05/29] Bump sigs.k8s.io/controller-runtime from 0.18.2 to 0.18.3 (#1326) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.18.2 to 0.18.3. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.18.2...v0.18.3) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: c4170c0d2eb458121d386f9ba6de77ee0e96560b --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 8786d4b521..65a7449f26 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -51,7 +51,7 @@ require ( k8s.io/apimachinery v0.30.1 k8s.io/client-go v0.30.1 k8s.io/kubectl v0.30.0 - sigs.k8s.io/controller-runtime v0.18.2 + sigs.k8s.io/controller-runtime v0.18.3 sigs.k8s.io/kind v0.23.0 sigs.k8s.io/yaml v1.4.0 ) diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index c02fa957cb..2e49506e32 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -587,8 +587,8 @@ k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCf k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 h1:/U5vjBbQn3RChhv7P11uhYvCSm5G2GaIi5AIGBS6r4c= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0/go.mod h1:z7+wmGM2dfIiLRfrC6jb5kV2Mq/sK1ZP303cxzkV5Y4= -sigs.k8s.io/controller-runtime v0.18.2 h1:RqVW6Kpeaji67CY5nPEfRz6ZfFMk0lWQlNrLqlNpx+Q= -sigs.k8s.io/controller-runtime v0.18.2/go.mod h1:tuAt1+wbVsXIT8lPtk5RURxqAnq7xkpv2Mhttslg7Hw= +sigs.k8s.io/controller-runtime v0.18.3 h1:B5Wmmo8WMWK7izei+2LlXLVDGzMwAHBNLX68lwtlSR4= +sigs.k8s.io/controller-runtime v0.18.3/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kind v0.23.0 h1:8fyDGWbWTeCcCTwA04v4Nfr45KKxbSPH1WO9K+jVrBg= From c2c0dfa021761b3856754fdcaba93b4b45b829dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 08:54:26 +0200 Subject: [PATCH 06/29] Bump github.com/onsi/ginkgo/v2 from 2.18.0 to 2.19.0 (#1327) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.18.0 to 2.19.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.18.0...v2.19.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: da4828d472d560b529d8dc243436a9e0cb2e84d4 --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 65a7449f26..c43c61e98f 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -23,7 +23,7 @@ require ( github.com/joelanford/ignore v0.1.0 github.com/mattn/go-sqlite3 v1.14.22 github.com/maxbrunsfeld/counterfeiter/v6 v6.8.1 - github.com/onsi/ginkgo/v2 v2.18.0 + github.com/onsi/ginkgo/v2 v2.19.0 github.com/onsi/gomega v1.33.1 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.0 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 2e49506e32..40d2ef2123 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -281,8 +281,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/onsi/ginkgo/v2 v2.18.0 h1:W9Y7IWXxPUpAit9ieMOLI7PJZGaW22DTKgiVAuhDTLc= -github.com/onsi/ginkgo/v2 v2.18.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= From 581538c2e60b48638043a862f790bf5b910f97fe Mon Sep 17 00:00:00 2001 From: Joe Lanford Date: Wed, 29 May 2024 11:44:30 -0400 Subject: [PATCH 07/29] Makefile: avoid ?= shell executions (#1328) Signed-off-by: Joe Lanford Upstream-repository: operator-registry Upstream-commit: 04863125a01e22235fcb7c2b4c4b856d6ba69e88 --- staging/operator-registry/Makefile | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/staging/operator-registry/Makefile b/staging/operator-registry/Makefile index fb5e9e692e..7ef96c13df 100644 --- a/staging/operator-registry/Makefile +++ b/staging/operator-registry/Makefile @@ -113,8 +113,8 @@ e2e: ginkgo .PHONY: release export OPM_IMAGE_REPO ?= quay.io/operator-framework/opm export IMAGE_TAG ?= $(OPM_VERSION) -export MAJ_MIN_IMAGE_OR_EMPTY ?= $(call tagged-or-empty,$(shell echo $(OPM_VERSION) | grep -Eo 'v[0-9]+\.[0-9]+')) -export MAJ_IMAGE_OR_EMPTY ?= $(call tagged-or-empty,$(shell echo $(OPM_VERSION) | grep -Eo 'v[0-9]+')) +export MAJ_MIN_IMAGE_OR_EMPTY := $(call tagged-or-empty,$(shell echo $(OPM_VERSION) | grep -Eo 'v[0-9]+\.[0-9]+')) +export MAJ_IMAGE_OR_EMPTY := $(call tagged-or-empty,$(shell echo $(OPM_VERSION) | grep -Eo 'v[0-9]+')) # LATEST_TAG is the latest semver tag in HEAD. Used to deduce whether # OPM_VERSION is the new latest tag, or a prior minor/patch tag, below. # NOTE: this can only be relied upon if full git history is present. @@ -124,11 +124,12 @@ LATEST_TAG := $(shell git tag -l | tr - \~ | sort -V | tr \~ - | tail -n1) # is not a prerelase tag and == LATEST_TAG, otherwise the empty string. # An empty string causes goreleaser to skip building the manifest image for latest, # which we do not want when cutting a non-latest release (old minor/patch tag). -export LATEST_IMAGE_OR_EMPTY ?= $(shell \ +export LATEST_IMAGE_OR_EMPTY := $(shell \ echo $(OPM_VERSION) | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$$' \ && [ "$(shell echo -e "$(OPM_VERSION)\n$(LATEST_TAG)" | sort -rV | head -n1)" == "$(OPM_VERSION)" ] \ && echo "$(OPM_IMAGE_REPO):latest" || echo "") -release: RELEASE_ARGS ?= release --rm-dist --snapshot -f release/goreleaser.$(shell go env GOOS).yaml +RELEASE_GOOS := $(shell go env GOOS) +release: RELEASE_ARGS ?= release --rm-dist --snapshot -f release/goreleaser.$(RELEASE_GOOS).yaml release: goreleaser $(GORELEASER) $(RELEASE_ARGS) @@ -147,22 +148,22 @@ endef # Hack / Tools # ################ -GO_INSTALL_OPTS ?= "-mod=mod" +GO_INSTALL_OPTS := "-mod=mod" ## Location to install dependencies to -LOCALBIN ?= $(shell pwd)/bin +LOCALBIN := $(shell pwd)/bin $(LOCALBIN): mkdir -p $(LOCALBIN) ## Tool Binaries -GORELEASER ?= $(LOCALBIN)/goreleaser -GINKGO ?= $(LOCALBIN)/ginkgo -PROTOC_VERSION ?= $(LOCALBIN)/protoc-gen-go-grpc +GORELEASER := $(LOCALBIN)/goreleaser +GINKGO := $(LOCALBIN)/ginkgo +PROTOC_VERSION := $(LOCALBIN)/protoc-gen-go-grpc ## Tool Versions -GORELEASER_VERSION ?= v1.8.3 -GINKGO_VERSION ?= v2.1.3 -PROTOC_VERSION ?= v1.3.0 +GORELEASER_VERSION := v1.8.3 +GINKGO_VERSION := v2.1.3 +PROTOC_VERSION := v1.3.0 .PHONY: goreleaser goreleaser: $(GORELEASER) ## Download goreleaser locally if necessary. From 3b437efb820d6eba7a93a9ecc6cd867a35672fea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:46:23 +0200 Subject: [PATCH 08/29] Bump google.golang.org/grpc/cmd/protoc-gen-go-grpc from 1.3.0 to 1.4.0 (#1340) Bumps [google.golang.org/grpc/cmd/protoc-gen-go-grpc](https://github.com/grpc/grpc-go) from 1.3.0 to 1.4.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.3.0...v1.4.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc/cmd/protoc-gen-go-grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: eb32d18f0785d99b5bb29e2f528d6a90754b004f --- go.mod | 2 +- go.sum | 4 +- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 +- .../grpc/cmd/protoc-gen-go-grpc/README.md | 4 +- .../grpc/cmd/protoc-gen-go-grpc/grpc.go | 138 ++++++++++++++---- .../grpc/cmd/protoc-gen-go-grpc/main.go | 4 +- .../protoc-gen-go-grpc_test.sh | 50 +++++++ vendor/modules.txt | 4 +- 9 files changed, 176 insertions(+), 36 deletions(-) create mode 100644 vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/protoc-gen-go-grpc_test.sh diff --git a/go.mod b/go.mod index 303112c0c8..e28ff0e129 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 helm.sh/helm/v3 v3.14.4 diff --git a/go.sum b/go.sum index 39e8c5e852..defcccb433 100644 --- a/go.sum +++ b/go.sum @@ -3076,8 +3076,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go. google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 h1:9SxA29VM43MF5Z9dQu694wmY5t8E/Gxr7s+RSxiIDmc= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0/go.mod h1:yZOK5zhQMiALmuweVdIVoQPa6eIJyXn2B9g5dJDhqX4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index c43c61e98f..e3b11941a3 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -43,7 +43,7 @@ require ( golang.org/x/sys v0.20.0 golang.org/x/text v0.15.0 google.golang.org/grpc v1.64.0 - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 google.golang.org/protobuf v1.34.1 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.30.1 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 40d2ef2123..aa40469637 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -528,8 +528,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 h1:9SxA29VM43MF5Z9dQu694wmY5t8E/Gxr7s+RSxiIDmc= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0/go.mod h1:yZOK5zhQMiALmuweVdIVoQPa6eIJyXn2B9g5dJDhqX4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/README.md b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/README.md index 4758125de0..95635ce768 100644 --- a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/README.md +++ b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/README.md @@ -13,8 +13,8 @@ change from the grpc code generator previously included with `protoc-gen-go`. To restore this behavior, set the option `require_unimplemented_servers=false`. E.g.: -``` - protoc --go-grpc_out=require_unimplemented_servers=false[,other options...]:. \ +```sh + protoc --go-grpc_out=. --go-grpc_opt=require_unimplemented_servers=false[,other options...] \ ``` Note that this is not recommended, and the option is only provided to restore diff --git a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/grpc.go b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/grpc.go index 9e15d2d8da..9088bc2a17 100644 --- a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/grpc.go +++ b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/grpc.go @@ -52,6 +52,10 @@ func (serviceGenerateHelper) formatFullMethodSymbol(service *protogen.Service, m } func (serviceGenerateHelper) genFullMethods(g *protogen.GeneratedFile, service *protogen.Service) { + if len(service.Methods) == 0 { + return + } + g.P("const (") for _, method := range service.Methods { fmSymbol := helper.formatFullMethodSymbol(service, method) @@ -170,14 +174,30 @@ func generateFileContent(gen *protogen.Plugin, file *protogen.File, g *protogen. g.P("// This is a compile-time assertion to ensure that this generated file") g.P("// is compatible with the grpc package it is being compiled against.") - g.P("// Requires gRPC-Go v1.32.0 or later.") - g.P("const _ = ", grpcPackage.Ident("SupportPackageIsVersion7")) // When changing, update version number above. + if *useGenericStreams { + g.P("// Requires gRPC-Go v1.64.0 or later.") + g.P("const _ = ", grpcPackage.Ident("SupportPackageIsVersion9")) + } else { + g.P("// Requires gRPC-Go v1.62.0 or later.") + g.P("const _ = ", grpcPackage.Ident("SupportPackageIsVersion8")) // When changing, update version number above. + } g.P() for _, service := range file.Services { genService(gen, file, g, service) } } +// genServiceComments copies the comments from the RPC proto definitions +// to the corresponding generated interface file. +func genServiceComments(g *protogen.GeneratedFile, service *protogen.Service) { + if service.Comments.Leading != "" { + // Add empty comment line to attach this service's comments to + // the godoc comments previously output for all services. + g.P("//") + g.P(strings.TrimSpace(service.Comments.Leading.String())) + } +} + func genService(gen *protogen.Plugin, file *protogen.File, g *protogen.GeneratedFile, service *protogen.Service) { // Full methods constants. helper.genFullMethods(g, service) @@ -189,14 +209,17 @@ func genService(gen *protogen.Plugin, file *protogen.File, g *protogen.Generated g.P("//") g.P("// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.") + // Copy comments from proto file. + genServiceComments(g, service) + if service.Desc.Options().(*descriptorpb.ServiceOptions).GetDeprecated() { g.P("//") g.P(deprecationComment) } - g.Annotate(clientName, service.Location) + g.AnnotateSymbol(clientName, protogen.Annotation{Location: service.Location}) g.P("type ", clientName, " interface {") for _, method := range service.Methods { - g.Annotate(clientName+"."+method.GoName, method.Location) + g.AnnotateSymbol(clientName+"."+method.GoName, protogen.Annotation{Location: method.Location}) if method.Desc.Options().(*descriptorpb.MethodOptions).GetDeprecated() { g.P(deprecationComment) } @@ -242,14 +265,18 @@ func genService(gen *protogen.Plugin, file *protogen.File, g *protogen.Generated g.P("// ", serverType, " is the server API for ", service.GoName, " service.") g.P("// All implementations ", mustOrShould, " embed Unimplemented", serverType) g.P("// for forward compatibility") + + // Copy comments from proto file. + genServiceComments(g, service) + if service.Desc.Options().(*descriptorpb.ServiceOptions).GetDeprecated() { g.P("//") g.P(deprecationComment) } - g.Annotate(serverType, service.Location) + g.AnnotateSymbol(serverType, protogen.Annotation{Location: service.Location}) g.P("type ", serverType, " interface {") for _, method := range service.Methods { - g.Annotate(serverType+"."+method.GoName, method.Location) + g.AnnotateSymbol(serverType+"."+method.GoName, protogen.Annotation{Location: method.Location}) if method.Desc.Options().(*descriptorpb.MethodOptions).GetDeprecated() { g.P(deprecationComment) } @@ -295,12 +322,27 @@ func clientSignature(g *protogen.GeneratedFile, method *protogen.Method) string if !method.Desc.IsStreamingClient() && !method.Desc.IsStreamingServer() { s += "*" + g.QualifiedGoIdent(method.Output.GoIdent) } else { - s += method.Parent.GoName + "_" + method.GoName + "Client" + if *useGenericStreams { + s += clientStreamInterface(g, method) + } else { + s += method.Parent.GoName + "_" + method.GoName + "Client" + } } s += ", error)" return s } +func clientStreamInterface(g *protogen.GeneratedFile, method *protogen.Method) string { + typeParam := g.QualifiedGoIdent(method.Input.GoIdent) + ", " + g.QualifiedGoIdent(method.Output.GoIdent) + if method.Desc.IsStreamingClient() && method.Desc.IsStreamingServer() { + return g.QualifiedGoIdent(grpcPackage.Ident("BidiStreamingClient")) + "[" + typeParam + "]" + } else if method.Desc.IsStreamingClient() { + return g.QualifiedGoIdent(grpcPackage.Ident("ClientStreamingClient")) + "[" + typeParam + "]" + } else { // i.e. if method.Desc.IsStreamingServer() + return g.QualifiedGoIdent(grpcPackage.Ident("ServerStreamingClient")) + "[" + g.QualifiedGoIdent(method.Output.GoIdent) + "]" + } +} + func genClientMethod(gen *protogen.Plugin, file *protogen.File, g *protogen.GeneratedFile, method *protogen.Method, index int) { service := method.Parent fmSymbol := helper.formatFullMethodSymbol(service, method) @@ -309,20 +351,27 @@ func genClientMethod(gen *protogen.Plugin, file *protogen.File, g *protogen.Gene g.P(deprecationComment) } g.P("func (c *", unexport(service.GoName), "Client) ", clientSignature(g, method), "{") + g.P("cOpts := append([]", grpcPackage.Ident("CallOption"), "{", grpcPackage.Ident("StaticMethod()"), "}, opts...)") if !method.Desc.IsStreamingServer() && !method.Desc.IsStreamingClient() { g.P("out := new(", method.Output.GoIdent, ")") - g.P(`err := c.cc.Invoke(ctx, `, fmSymbol, `, in, out, opts...)`) + g.P(`err := c.cc.Invoke(ctx, `, fmSymbol, `, in, out, cOpts...)`) g.P("if err != nil { return nil, err }") g.P("return out, nil") g.P("}") g.P() return } - streamType := unexport(service.GoName) + method.GoName + "Client" + + streamImpl := unexport(service.GoName) + method.GoName + "Client" + if *useGenericStreams { + typeParam := g.QualifiedGoIdent(method.Input.GoIdent) + ", " + g.QualifiedGoIdent(method.Output.GoIdent) + streamImpl = g.QualifiedGoIdent(grpcPackage.Ident("GenericClientStream")) + "[" + typeParam + "]" + } + serviceDescVar := service.GoName + "_ServiceDesc" - g.P("stream, err := c.cc.NewStream(ctx, &", serviceDescVar, ".Streams[", index, `], `, fmSymbol, `, opts...)`) + g.P("stream, err := c.cc.NewStream(ctx, &", serviceDescVar, ".Streams[", index, `], `, fmSymbol, `, cOpts...)`) g.P("if err != nil { return nil, err }") - g.P("x := &", streamType, "{stream}") + g.P("x := &", streamImpl, "{ClientStream: stream}") if !method.Desc.IsStreamingClient() { g.P("if err := x.ClientStream.SendMsg(in); err != nil { return nil, err }") g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") @@ -331,11 +380,20 @@ func genClientMethod(gen *protogen.Plugin, file *protogen.File, g *protogen.Gene g.P("}") g.P() + // Auxiliary types aliases, for backwards compatibility. + if *useGenericStreams { + g.P("// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.") + g.P("type ", service.GoName, "_", method.GoName, "Client = ", clientStreamInterface(g, method)) + g.P() + return + } + + // Stream auxiliary types and methods, if we're not taking advantage of the + // pre-implemented generic types and their methods. genSend := method.Desc.IsStreamingClient() genRecv := method.Desc.IsStreamingServer() genCloseAndRecv := !method.Desc.IsStreamingServer() - // Stream auxiliary types and methods. g.P("type ", service.GoName, "_", method.GoName, "Client interface {") if genSend { g.P("Send(*", method.Input.GoIdent, ") error") @@ -350,19 +408,19 @@ func genClientMethod(gen *protogen.Plugin, file *protogen.File, g *protogen.Gene g.P("}") g.P() - g.P("type ", streamType, " struct {") + g.P("type ", streamImpl, " struct {") g.P(grpcPackage.Ident("ClientStream")) g.P("}") g.P() if genSend { - g.P("func (x *", streamType, ") Send(m *", method.Input.GoIdent, ") error {") + g.P("func (x *", streamImpl, ") Send(m *", method.Input.GoIdent, ") error {") g.P("return x.ClientStream.SendMsg(m)") g.P("}") g.P() } if genRecv { - g.P("func (x *", streamType, ") Recv() (*", method.Output.GoIdent, ", error) {") + g.P("func (x *", streamImpl, ") Recv() (*", method.Output.GoIdent, ", error) {") g.P("m := new(", method.Output.GoIdent, ")") g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") g.P("return m, nil") @@ -370,7 +428,7 @@ func genClientMethod(gen *protogen.Plugin, file *protogen.File, g *protogen.Gene g.P() } if genCloseAndRecv { - g.P("func (x *", streamType, ") CloseAndRecv() (*", method.Output.GoIdent, ", error) {") + g.P("func (x *", streamImpl, ") CloseAndRecv() (*", method.Output.GoIdent, ", error) {") g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") g.P("m := new(", method.Output.GoIdent, ")") g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") @@ -391,7 +449,11 @@ func serverSignature(g *protogen.GeneratedFile, method *protogen.Method) string reqArgs = append(reqArgs, "*"+g.QualifiedGoIdent(method.Input.GoIdent)) } if method.Desc.IsStreamingClient() || method.Desc.IsStreamingServer() { - reqArgs = append(reqArgs, method.Parent.GoName+"_"+method.GoName+"Server") + if *useGenericStreams { + reqArgs = append(reqArgs, serverStreamInterface(g, method)) + } else { + reqArgs = append(reqArgs, method.Parent.GoName+"_"+method.GoName+"Server") + } } return method.GoName + "(" + strings.Join(reqArgs, ", ") + ") " + ret } @@ -437,6 +499,17 @@ func genServiceDesc(file *protogen.File, g *protogen.GeneratedFile, serviceDescV g.P() } +func serverStreamInterface(g *protogen.GeneratedFile, method *protogen.Method) string { + typeParam := g.QualifiedGoIdent(method.Input.GoIdent) + ", " + g.QualifiedGoIdent(method.Output.GoIdent) + if method.Desc.IsStreamingClient() && method.Desc.IsStreamingServer() { + return g.QualifiedGoIdent(grpcPackage.Ident("BidiStreamingServer")) + "[" + typeParam + "]" + } else if method.Desc.IsStreamingClient() { + return g.QualifiedGoIdent(grpcPackage.Ident("ClientStreamingServer")) + "[" + typeParam + "]" + } else { // i.e. if method.Desc.IsStreamingServer() + return g.QualifiedGoIdent(grpcPackage.Ident("ServerStreamingServer")) + "[" + g.QualifiedGoIdent(method.Output.GoIdent) + "]" + } +} + func genServerMethod(gen *protogen.Plugin, file *protogen.File, g *protogen.GeneratedFile, method *protogen.Method, hnameFuncNameFormatter func(string) string) string { service := method.Parent hname := fmt.Sprintf("_%s_%s_Handler", service.GoName, method.GoName) @@ -459,23 +532,38 @@ func genServerMethod(gen *protogen.Plugin, file *protogen.File, g *protogen.Gene g.P() return hname } - streamType := unexport(service.GoName) + method.GoName + "Server" + + streamImpl := unexport(service.GoName) + method.GoName + "Server" + if *useGenericStreams { + typeParam := g.QualifiedGoIdent(method.Input.GoIdent) + ", " + g.QualifiedGoIdent(method.Output.GoIdent) + streamImpl = g.QualifiedGoIdent(grpcPackage.Ident("GenericServerStream")) + "[" + typeParam + "]" + } + g.P("func ", hnameFuncNameFormatter(hname), "(srv interface{}, stream ", grpcPackage.Ident("ServerStream"), ") error {") if !method.Desc.IsStreamingClient() { g.P("m := new(", method.Input.GoIdent, ")") g.P("if err := stream.RecvMsg(m); err != nil { return err }") - g.P("return srv.(", service.GoName, "Server).", method.GoName, "(m, &", streamType, "{stream})") + g.P("return srv.(", service.GoName, "Server).", method.GoName, "(m, &", streamImpl, "{ServerStream: stream})") } else { - g.P("return srv.(", service.GoName, "Server).", method.GoName, "(&", streamType, "{stream})") + g.P("return srv.(", service.GoName, "Server).", method.GoName, "(&", streamImpl, "{ServerStream: stream})") } g.P("}") g.P() + // Auxiliary types aliases, for backwards compatibility. + if *useGenericStreams { + g.P("// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.") + g.P("type ", service.GoName, "_", method.GoName, "Server = ", serverStreamInterface(g, method)) + g.P() + return hname + } + + // Stream auxiliary types and methods, if we're not taking advantage of the + // pre-implemented generic types and their methods. genSend := method.Desc.IsStreamingServer() genSendAndClose := !method.Desc.IsStreamingServer() genRecv := method.Desc.IsStreamingClient() - // Stream auxiliary types and methods. g.P("type ", service.GoName, "_", method.GoName, "Server interface {") if genSend { g.P("Send(*", method.Output.GoIdent, ") error") @@ -490,25 +578,25 @@ func genServerMethod(gen *protogen.Plugin, file *protogen.File, g *protogen.Gene g.P("}") g.P() - g.P("type ", streamType, " struct {") + g.P("type ", streamImpl, " struct {") g.P(grpcPackage.Ident("ServerStream")) g.P("}") g.P() if genSend { - g.P("func (x *", streamType, ") Send(m *", method.Output.GoIdent, ") error {") + g.P("func (x *", streamImpl, ") Send(m *", method.Output.GoIdent, ") error {") g.P("return x.ServerStream.SendMsg(m)") g.P("}") g.P() } if genSendAndClose { - g.P("func (x *", streamType, ") SendAndClose(m *", method.Output.GoIdent, ") error {") + g.P("func (x *", streamImpl, ") SendAndClose(m *", method.Output.GoIdent, ") error {") g.P("return x.ServerStream.SendMsg(m)") g.P("}") g.P() } if genRecv { - g.P("func (x *", streamType, ") Recv() (*", method.Input.GoIdent, ", error) {") + g.P("func (x *", streamImpl, ") Recv() (*", method.Input.GoIdent, ", error) {") g.P("m := new(", method.Input.GoIdent, ")") g.P("if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err }") g.P("return m, nil") diff --git a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/main.go b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/main.go index 340eaf3ee7..0cb6a0212c 100644 --- a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/main.go +++ b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/main.go @@ -41,9 +41,10 @@ import ( "google.golang.org/protobuf/types/pluginpb" ) -const version = "1.3.0" +const version = "1.4.0" var requireUnimplemented *bool +var useGenericStreams *bool func main() { showVersion := flag.Bool("version", false, "print the version and exit") @@ -55,6 +56,7 @@ func main() { var flags flag.FlagSet requireUnimplemented = flags.Bool("require_unimplemented_servers", true, "set to false to match legacy behavior") + useGenericStreams = flags.Bool("use_generic_streams_experimental", false, "set to true to use generic types for streaming client and server objects; this flag is EXPERIMENTAL and may be changed or removed in a future release") protogen.Options{ ParamFunc: flags.Set, diff --git a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/protoc-gen-go-grpc_test.sh b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/protoc-gen-go-grpc_test.sh new file mode 100644 index 0000000000..32e8e26ecd --- /dev/null +++ b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/protoc-gen-go-grpc_test.sh @@ -0,0 +1,50 @@ +#!/bin/bash -e + +# Copyright 2024 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Uncomment to enable debugging. +# set -x + +WORKDIR="$(dirname $0)" +TEMPDIR=$(mktemp -d) + +trap "rm -rf ${TEMPDIR}" EXIT + +# Build protoc-gen-go-grpc binary and add to $PATH. +pushd "${WORKDIR}" +go build -o "${TEMPDIR}" . +PATH="${TEMPDIR}:${PATH}" +popd + +protoc \ + --go-grpc_out="${TEMPDIR}" \ + --go-grpc_opt=paths=source_relative,use_generic_streams_experimental=true \ + "examples/route_guide/routeguide/route_guide.proto" + +GOLDENFILE="examples/route_guide/routeguide/route_guide_grpc.pb.go" +GENFILE="${TEMPDIR}/examples/route_guide/routeguide/route_guide_grpc.pb.go" + +# diff is piped to [[ $? == 1 ]] to avoid exiting on diff but exit on error +# (like if the file was not found). See man diff for more info. +DIFF=$(diff "${GOLDENFILE}" "${GENFILE}" || [[ $? == 1 ]]) +if [[ -n "${DIFF}" ]]; then + echo -e "ERROR: Generated file differs from golden file:\n${DIFF}" + echo -e "If you have made recent changes to protoc-gen-go-grpc," \ + "please regenerate the golden files by running:" \ + "\n\t go generate google.golang.org/grpc/..." >&2 + exit 1 +fi + +echo SUCCESS diff --git a/vendor/modules.txt b/vendor/modules.txt index c6e2062538..5f3374a00d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1312,8 +1312,8 @@ google.golang.org/grpc/serviceconfig google.golang.org/grpc/stats google.golang.org/grpc/status google.golang.org/grpc/tap -# google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 -## explicit; go 1.17 +# google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 +## explicit; go 1.21 google.golang.org/grpc/cmd/protoc-gen-go-grpc # google.golang.org/protobuf v1.34.2 ## explicit; go 1.20 From 812177d7a4dd6ac984add1e7ff52f9cd954d5414 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 09:00:45 +0200 Subject: [PATCH 09/29] Bump golang.org/x/sys from 0.20.0 to 0.21.0 (#1345) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.20.0 to 0.21.0. - [Commits](https://github.com/golang/sys/compare/v0.20.0...v0.21.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: 00d8865b01887e6abf906b2189dbc8bdc6a64eaa --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index e3b11941a3..70ce9dca86 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -40,7 +40,7 @@ require ( golang.org/x/mod v0.17.0 golang.org/x/net v0.25.0 golang.org/x/sync v0.7.0 - golang.org/x/sys v0.20.0 + golang.org/x/sys v0.21.0 golang.org/x/text v0.15.0 google.golang.org/grpc v1.64.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index aa40469637..380eff6e9b 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -484,8 +484,8 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= From 16b251d49e15ce23d1578a10ea0e6a45d5ac8c8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 09:01:42 +0200 Subject: [PATCH 10/29] Bump github.com/containerd/containerd from 1.7.17 to 1.7.18 (#1343) Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.7.17 to 1.7.18. - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](https://github.com/containerd/containerd/compare/v1.7.17...v1.7.18) --- updated-dependencies: - dependency-name: github.com/containerd/containerd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: 52b8fad7ff4c5aaefaa1ecf65a9bbd2babf5883f --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 70ce9dca86..64bb1a6a01 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -7,7 +7,7 @@ toolchain go1.22.2 require ( github.com/akrylysov/pogreb v0.10.2 github.com/blang/semver/v4 v4.0.0 - github.com/containerd/containerd v1.7.17 + github.com/containerd/containerd v1.7.18 github.com/containers/common v0.59.0 github.com/containers/image/v5 v5.31.0 github.com/distribution/distribution/v3 v3.0.0-alpha.1 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 380eff6e9b..20b0ba471c 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -46,8 +46,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= -github.com/containerd/containerd v1.7.17 h1:KjNnn0+tAVQHAoaWRjmdak9WlvnFR/8rU1CHHy8Rm2A= -github.com/containerd/containerd v1.7.17/go.mod h1:vK+hhT4TIv2uejlcDlbVIc8+h/BqtKLIyNrtCZol8lI= +github.com/containerd/containerd v1.7.18 h1:jqjZTQNfXGoEaZdW1WwPU0RqSn1Bm2Ay/KJPUuO8nao= +github.com/containerd/containerd v1.7.18/go.mod h1:IYEk9/IO6wAPUz2bCMVUbsfXjzw5UNP5fLz4PsUygQ4= github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM= github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= From 374b62ebf87947a6da62d2269618f861c75d9a49 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 07:49:38 +0200 Subject: [PATCH 11/29] Bump golang.org/x/text from 0.15.0 to 0.16.0 (#1341) Bumps [golang.org/x/text](https://github.com/golang/text) from 0.15.0 to 0.16.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.15.0...v0.16.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: f709da36c94fdd7511d30d7b98a7ec60f06dad07 --- staging/operator-registry/go.mod | 4 ++-- staging/operator-registry/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 64bb1a6a01..fdeccd81f0 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -41,7 +41,7 @@ require ( golang.org/x/net v0.25.0 golang.org/x/sync v0.7.0 golang.org/x/sys v0.21.0 - golang.org/x/text v0.15.0 + golang.org/x/text v0.16.0 google.golang.org/grpc v1.64.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 google.golang.org/protobuf v1.34.1 @@ -175,7 +175,7 @@ require ( golang.org/x/oauth2 v0.20.0 // indirect golang.org/x/term v0.20.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.21.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 20b0ba471c..a7f965a843 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -491,8 +491,8 @@ golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -504,8 +504,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 132ac0b329daa04d1e5885454068f297d4a20c74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 07:49:58 +0200 Subject: [PATCH 12/29] Bump github.com/containers/common from 0.59.0 to 0.59.1 (#1342) Bumps [github.com/containers/common](https://github.com/containers/common) from 0.59.0 to 0.59.1. - [Release notes](https://github.com/containers/common/releases) - [Commits](https://github.com/containers/common/compare/v0.59.0...v0.59.1) --- updated-dependencies: - dependency-name: github.com/containers/common dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: 2a6b03e087aeef495b8b1e4aa10a6dce378bf2a5 --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index fdeccd81f0..e87626363e 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -8,7 +8,7 @@ require ( github.com/akrylysov/pogreb v0.10.2 github.com/blang/semver/v4 v4.0.0 github.com/containerd/containerd v1.7.18 - github.com/containers/common v0.59.0 + github.com/containers/common v0.59.1 github.com/containers/image/v5 v5.31.0 github.com/distribution/distribution/v3 v3.0.0-alpha.1 github.com/distribution/reference v0.6.0 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index a7f965a843..2f9995439a 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -58,8 +58,8 @@ github.com/containerd/ttrpc v1.2.4 h1:eQCQK4h9dxDmpOb9QOOMh2NHTfzroH1IkmHiKZi05O github.com/containerd/ttrpc v1.2.4/go.mod h1:ojvb8SJBSch0XkqNO0L0YX/5NxR3UnVk2LzFKBK0upc= github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= -github.com/containers/common v0.59.0 h1:fy9Jz0B7Qs1C030bm73YJtVddaiFSZD3558EV1tgN2g= -github.com/containers/common v0.59.0/go.mod h1:53VicJCZ2AD0O+Br7VVoyrS7viXF4YmwlTIocWUT8XE= +github.com/containers/common v0.59.1 h1:7VkmJN3YvD0jLFwaUjLHSRJ98JLffydiyOJjYr0dUTo= +github.com/containers/common v0.59.1/go.mod h1:53VicJCZ2AD0O+Br7VVoyrS7viXF4YmwlTIocWUT8XE= github.com/containers/image/v5 v5.31.0 h1:eDFVlz5XaYICxe9dXpf23htEKvyosgkl62mJlIATXE4= github.com/containers/image/v5 v5.31.0/go.mod h1:5QfOqSackPkSbF7Qxc1DnVNnPJKQ+KWLkfEfDpK590Q= github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA= From e43f8a49713ebb88df5a7a1d08587962be887391 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 07:50:19 +0200 Subject: [PATCH 13/29] Bump golang.org/x/net from 0.25.0 to 0.26.0 (#1344) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.25.0 to 0.26.0. - [Commits](https://github.com/golang/net/compare/v0.25.0...v0.26.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: 7735d2222f03575f0d9599b081b7af6d69a27311 --- staging/operator-registry/go.mod | 6 +++--- staging/operator-registry/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index e87626363e..49897b0d99 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -38,7 +38,7 @@ require ( github.com/tidwall/btree v1.7.0 go.etcd.io/bbolt v1.3.10 golang.org/x/mod v0.17.0 - golang.org/x/net v0.25.0 + golang.org/x/net v0.26.0 golang.org/x/sync v0.7.0 golang.org/x/sys v0.21.0 golang.org/x/text v0.16.0 @@ -170,10 +170,10 @@ require ( go.opentelemetry.io/otel/sdk/metric v1.21.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect go.opentelemetry.io/proto/otlp v1.1.0 // indirect - golang.org/x/crypto v0.23.0 // indirect + golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/oauth2 v0.20.0 // indirect - golang.org/x/term v0.20.0 // indirect + golang.org/x/term v0.21.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 2f9995439a..b696860f75 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -431,8 +431,8 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= @@ -456,8 +456,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= @@ -487,8 +487,8 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= From e765ec292b6475339a937342ac05ffe02c6b8be2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 07:50:41 +0200 Subject: [PATCH 14/29] Bump sigs.k8s.io/controller-runtime from 0.18.3 to 0.18.4 (#1346) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.18.3 to 0.18.4. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.18.3...v0.18.4) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: 633c1d036917ee4bf13b4b42fc26235c47f3b8f8 --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 49897b0d99..3713c240ab 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -51,7 +51,7 @@ require ( k8s.io/apimachinery v0.30.1 k8s.io/client-go v0.30.1 k8s.io/kubectl v0.30.0 - sigs.k8s.io/controller-runtime v0.18.3 + sigs.k8s.io/controller-runtime v0.18.4 sigs.k8s.io/kind v0.23.0 sigs.k8s.io/yaml v1.4.0 ) diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index b696860f75..219d35ada9 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -587,8 +587,8 @@ k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCf k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 h1:/U5vjBbQn3RChhv7P11uhYvCSm5G2GaIi5AIGBS6r4c= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0/go.mod h1:z7+wmGM2dfIiLRfrC6jb5kV2Mq/sK1ZP303cxzkV5Y4= -sigs.k8s.io/controller-runtime v0.18.3 h1:B5Wmmo8WMWK7izei+2LlXLVDGzMwAHBNLX68lwtlSR4= -sigs.k8s.io/controller-runtime v0.18.3/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= +sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= +sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kind v0.23.0 h1:8fyDGWbWTeCcCTwA04v4Nfr45KKxbSPH1WO9K+jVrBg= From eb7b1373e3252b738f899e1b8cf559d08404aa63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 08:01:31 +0200 Subject: [PATCH 15/29] Bump github.com/docker/cli (#1348) Bumps [github.com/docker/cli](https://github.com/docker/cli) from 26.1.3+incompatible to 26.1.4+incompatible. - [Commits](https://github.com/docker/cli/compare/v26.1.3...v26.1.4) --- updated-dependencies: - dependency-name: github.com/docker/cli dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: a2a48db694592f9de2c5f077d686fdfab66387a4 --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 3713c240ab..0e4a4bd04b 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -12,7 +12,7 @@ require ( github.com/containers/image/v5 v5.31.0 github.com/distribution/distribution/v3 v3.0.0-alpha.1 github.com/distribution/reference v0.6.0 - github.com/docker/cli v26.1.3+incompatible + github.com/docker/cli v26.1.4+incompatible github.com/golang-migrate/migrate/v4 v4.17.1 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 219d35ada9..4a022745f0 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -85,8 +85,8 @@ github.com/distribution/distribution/v3 v3.0.0-alpha.1 h1:jn7I1gvjOvmLztH1+1cLiU github.com/distribution/distribution/v3 v3.0.0-alpha.1/go.mod h1:LCp4JZp1ZalYg0W/TN05jarCQu+h4w7xc7ZfQF4Y/cY= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v26.1.3+incompatible h1:bUpXT/N0kDE3VUHI2r5VMsYQgi38kYuoC0oL9yt3lqc= -github.com/docker/cli v26.1.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v26.1.4+incompatible h1:I8PHdc0MtxEADqYJZvhBrW9bo8gawKwwenxRM7/rLu8= +github.com/docker/cli v26.1.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v26.1.3+incompatible h1:lLCzRbrVZrljpVNobJu1J2FHk8V0s4BawoZippkc+xo= From fd159217e99f3c8125df14aa0be5f54a63035b3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 08:02:01 +0200 Subject: [PATCH 16/29] Bump golang.org/x/mod from 0.17.0 to 0.18.0 (#1347) Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.17.0 to 0.18.0. - [Commits](https://github.com/golang/mod/compare/v0.17.0...v0.18.0) --- updated-dependencies: - dependency-name: golang.org/x/mod dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: b8dfb7b5e124d0f780ba6d6c3210d6a4a24013ce --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 0e4a4bd04b..506c230470 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -37,7 +37,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/tidwall/btree v1.7.0 go.etcd.io/bbolt v1.3.10 - golang.org/x/mod v0.17.0 + golang.org/x/mod v0.18.0 golang.org/x/net v0.26.0 golang.org/x/sync v0.7.0 golang.org/x/sys v0.21.0 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 4a022745f0..81071f6149 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -442,8 +442,8 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= From 23bfaeeb82a23b975e709294cc711052fcfb6d77 Mon Sep 17 00:00:00 2001 From: Jordan Keister Date: Tue, 11 Jun 2024 08:46:09 -0500 Subject: [PATCH 17/29] deprecate composite template (#1339) Signed-off-by: Jordan Keister Upstream-repository: operator-registry Upstream-commit: 44bb1f4d188066cbf3a7b4e953c84a0e0a96e0e3 --- .../alpha/template/composite/builder.go | 363 ---- .../alpha/template/composite/builder_test.go | 1862 ----------------- .../alpha/template/composite/composite.go | 261 --- .../template/composite/composite_test.go | 615 ------ .../alpha/template/composite/config.go | 42 - .../alpha/template/composite/types.go | 62 - .../cmd/opm/alpha/template/cmd.go | 1 - .../cmd/opm/alpha/template/composite.go | 83 - .../alpha/template/composite/builder.go | 363 ---- .../alpha/template/composite/composite.go | 261 --- .../alpha/template/composite/config.go | 42 - .../alpha/template/composite/types.go | 62 - .../cmd/opm/alpha/template/cmd.go | 1 - .../cmd/opm/alpha/template/composite.go | 83 - vendor/modules.txt | 1 - 15 files changed, 4102 deletions(-) delete mode 100644 staging/operator-registry/alpha/template/composite/builder.go delete mode 100644 staging/operator-registry/alpha/template/composite/builder_test.go delete mode 100644 staging/operator-registry/alpha/template/composite/composite.go delete mode 100644 staging/operator-registry/alpha/template/composite/composite_test.go delete mode 100644 staging/operator-registry/alpha/template/composite/config.go delete mode 100644 staging/operator-registry/alpha/template/composite/types.go delete mode 100644 staging/operator-registry/cmd/opm/alpha/template/composite.go delete mode 100644 vendor/github.com/operator-framework/operator-registry/alpha/template/composite/builder.go delete mode 100644 vendor/github.com/operator-framework/operator-registry/alpha/template/composite/composite.go delete mode 100644 vendor/github.com/operator-framework/operator-registry/alpha/template/composite/config.go delete mode 100644 vendor/github.com/operator-framework/operator-registry/alpha/template/composite/types.go delete mode 100644 vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/composite.go diff --git a/staging/operator-registry/alpha/template/composite/builder.go b/staging/operator-registry/alpha/template/composite/builder.go deleted file mode 100644 index e22b5e49c7..0000000000 --- a/staging/operator-registry/alpha/template/composite/builder.go +++ /dev/null @@ -1,363 +0,0 @@ -package composite - -import ( - "bytes" - "context" - "fmt" - "io" - "os" - "os/exec" - "path" - "path/filepath" - "strings" - - "sigs.k8s.io/yaml" - - "github.com/operator-framework/operator-registry/alpha/declcfg" - basictemplate "github.com/operator-framework/operator-registry/alpha/template/basic" - semvertemplate "github.com/operator-framework/operator-registry/alpha/template/semver" - "github.com/operator-framework/operator-registry/pkg/image" - "github.com/operator-framework/operator-registry/pkg/lib/config" -) - -const ( - BasicBuilderSchema = "olm.builder.basic" - SemverBuilderSchema = "olm.builder.semver" - RawBuilderSchema = "olm.builder.raw" - CustomBuilderSchema = "olm.builder.custom" -) - -type BuilderConfig struct { - WorkingDir string - OutputType string - ContributionPath string -} - -type Builder interface { - Build(ctx context.Context, reg image.Registry, dir string, td TemplateDefinition) error - Validate(ctx context.Context, dir string) error -} - -type BasicBuilder struct { - builderCfg BuilderConfig -} - -var _ Builder = &BasicBuilder{} - -func NewBasicBuilder(builderCfg BuilderConfig) *BasicBuilder { - return &BasicBuilder{ - builderCfg: builderCfg, - } -} - -func (bb *BasicBuilder) Build(ctx context.Context, reg image.Registry, dir string, td TemplateDefinition) error { - if td.Schema != BasicBuilderSchema { - return fmt.Errorf("schema %q does not match the basic template builder schema %q", td.Schema, BasicBuilderSchema) - } - // Parse out the basic template configuration - basicConfig := &BasicConfig{} - err := yaml.UnmarshalStrict(td.Config, basicConfig) - if err != nil { - return fmt.Errorf("unmarshalling basic template config: %w", err) - } - - // validate the basic config fields - valid := true - validationErrs := []string{} - if basicConfig.Input == "" { - valid = false - validationErrs = append(validationErrs, "basic template config must have a non-empty input (templateDefinition.config.input)") - } - - if basicConfig.Output == "" { - valid = false - validationErrs = append(validationErrs, "basic template config must have a non-empty output (templateDefinition.config.output)") - } - - if !valid { - return fmt.Errorf("basic template configuration is invalid: %s", strings.Join(validationErrs, ",")) - } - - b := basictemplate.Template{Registry: reg} - reader, err := os.Open(basicConfig.Input) - if err != nil { - if os.IsNotExist(err) && bb.builderCfg.ContributionPath != "" { - reader, err = os.Open(path.Join(bb.builderCfg.ContributionPath, basicConfig.Input)) - if err != nil { - return fmt.Errorf("error reading basic template: %v (tried contribution-local path: %q)", err, bb.builderCfg.ContributionPath) - } - } else { - return fmt.Errorf("error reading basic template: %v", err) - } - } - defer reader.Close() - - dcfg, err := b.Render(ctx, reader) - if err != nil { - return fmt.Errorf("error rendering basic template: %v", err) - } - - destPath := path.Join(bb.builderCfg.WorkingDir, dir, basicConfig.Output) - - return build(dcfg, destPath, bb.builderCfg.OutputType) -} - -func (bb *BasicBuilder) Validate(ctx context.Context, dir string) error { - return validate(ctx, bb.builderCfg, dir) -} - -type SemverBuilder struct { - builderCfg BuilderConfig -} - -var _ Builder = &SemverBuilder{} - -func NewSemverBuilder(builderCfg BuilderConfig) *SemverBuilder { - return &SemverBuilder{ - builderCfg: builderCfg, - } -} - -func (sb *SemverBuilder) Build(ctx context.Context, reg image.Registry, dir string, td TemplateDefinition) error { - if td.Schema != SemverBuilderSchema { - return fmt.Errorf("schema %q does not match the semver template builder schema %q", td.Schema, SemverBuilderSchema) - } - // Parse out the semver template configuration - semverConfig := &SemverConfig{} - err := yaml.UnmarshalStrict(td.Config, semverConfig) - if err != nil { - return fmt.Errorf("unmarshalling semver template config: %w", err) - } - - // validate the semver config fields - valid := true - validationErrs := []string{} - if semverConfig.Input == "" { - valid = false - validationErrs = append(validationErrs, "semver template config must have a non-empty input (templateDefinition.config.input)") - } - - if semverConfig.Output == "" { - valid = false - validationErrs = append(validationErrs, "semver template config must have a non-empty output (templateDefinition.config.output)") - } - - if !valid { - return fmt.Errorf("semver template configuration is invalid: %s", strings.Join(validationErrs, ",")) - } - - reader, err := os.Open(semverConfig.Input) - if err != nil { - if os.IsNotExist(err) && sb.builderCfg.ContributionPath != "" { - reader, err = os.Open(path.Join(sb.builderCfg.ContributionPath, semverConfig.Input)) - if err != nil { - return fmt.Errorf("error reading semver template: %v (tried contribution-local path: %q)", err, sb.builderCfg.ContributionPath) - } - } else { - return fmt.Errorf("error reading semver template: %v", err) - } - } - defer reader.Close() - - s := semvertemplate.Template{Registry: reg, Data: reader} - - dcfg, err := s.Render(ctx) - if err != nil { - return fmt.Errorf("error rendering semver template: %v", err) - } - - destPath := path.Join(sb.builderCfg.WorkingDir, dir, semverConfig.Output) - - return build(dcfg, destPath, sb.builderCfg.OutputType) -} - -func (sb *SemverBuilder) Validate(ctx context.Context, dir string) error { - return validate(ctx, sb.builderCfg, dir) -} - -type RawBuilder struct { - builderCfg BuilderConfig -} - -var _ Builder = &RawBuilder{} - -func NewRawBuilder(builderCfg BuilderConfig) *RawBuilder { - return &RawBuilder{ - builderCfg: builderCfg, - } -} - -func (rb *RawBuilder) Build(ctx context.Context, _ image.Registry, dir string, td TemplateDefinition) error { - if td.Schema != RawBuilderSchema { - return fmt.Errorf("schema %q does not match the raw template builder schema %q", td.Schema, RawBuilderSchema) - } - // Parse out the raw template configuration - rawConfig := &RawConfig{} - err := yaml.UnmarshalStrict(td.Config, rawConfig) - if err != nil { - return fmt.Errorf("unmarshalling raw template config: %w", err) - } - - // validate the raw config fields - valid := true - validationErrs := []string{} - if rawConfig.Input == "" { - valid = false - validationErrs = append(validationErrs, "raw template config must have a non-empty input (templateDefinition.config.input)") - } - - if rawConfig.Output == "" { - valid = false - validationErrs = append(validationErrs, "raw template config must have a non-empty output (templateDefinition.config.output)") - } - - if !valid { - return fmt.Errorf("raw template configuration is invalid: %s", strings.Join(validationErrs, ",")) - } - - reader, err := os.Open(rawConfig.Input) - if err != nil { - if os.IsNotExist(err) && rb.builderCfg.ContributionPath != "" { - reader, err = os.Open(path.Join(rb.builderCfg.ContributionPath, rawConfig.Input)) - if err != nil { - return fmt.Errorf("error reading raw input file: %v (tried contribution-local path: %q)", err, rb.builderCfg.ContributionPath) - } - } else { - return fmt.Errorf("error reading raw input file: %v", err) - } - } - defer reader.Close() - - dcfg, err := declcfg.LoadReader(reader) - if err != nil { - return fmt.Errorf("error parsing raw input file: %s, %v", rawConfig.Input, err) - } - - destPath := path.Join(rb.builderCfg.WorkingDir, dir, rawConfig.Output) - - return build(dcfg, destPath, rb.builderCfg.OutputType) -} - -func (rb *RawBuilder) Validate(ctx context.Context, dir string) error { - return validate(ctx, rb.builderCfg, dir) -} - -type CustomBuilder struct { - builderCfg BuilderConfig -} - -var _ Builder = &CustomBuilder{} - -func NewCustomBuilder(builderCfg BuilderConfig) *CustomBuilder { - return &CustomBuilder{ - builderCfg: builderCfg, - } -} - -func (cb *CustomBuilder) Build(ctx context.Context, reg image.Registry, dir string, td TemplateDefinition) error { - if td.Schema != CustomBuilderSchema { - return fmt.Errorf("schema %q does not match the custom template builder schema %q", td.Schema, CustomBuilderSchema) - } - // Parse out the raw template configuration - customConfig := &CustomConfig{} - err := yaml.UnmarshalStrict(td.Config, customConfig) - if err != nil { - return fmt.Errorf("unmarshalling custom template config: %w", err) - } - - // validate the custom config fields - valid := true - validationErrs := []string{} - if customConfig.Command == "" { - valid = false - validationErrs = append(validationErrs, "custom template config must have a non-empty command (templateDefinition.config.command)") - } - - if customConfig.Output == "" { - valid = false - validationErrs = append(validationErrs, "custom template config must have a non-empty output (templateDefinition.config.output)") - } - - if !valid { - return fmt.Errorf("custom template configuration is invalid: %s", strings.Join(validationErrs, ",")) - } - // build the command to execute - cmd := exec.Command(customConfig.Command, customConfig.Args...) - - // custom template should output a valid FBC to STDOUT so we can - // build the FBC just like all the other templates. - v, err := cmd.Output() - if err != nil { - return fmt.Errorf("running command %q: %v: %v", cmd.String(), err, v) - } - - reader := bytes.NewReader(v) - - dcfg, err := declcfg.LoadReader(reader) - cmdString := []string{customConfig.Command} - cmdString = append(cmdString, customConfig.Args...) - if err != nil { - return fmt.Errorf("error parsing custom command output: %s, %v", strings.Join(cmdString, "'"), err) - } - - destPath := path.Join(cb.builderCfg.WorkingDir, dir, customConfig.Output) - - // custom template should output a valid FBC to STDOUT so we can - // build the FBC just like all the other templates. - return build(dcfg, destPath, cb.builderCfg.OutputType) -} - -func (cb *CustomBuilder) Validate(ctx context.Context, dir string) error { - return validate(ctx, cb.builderCfg, dir) -} - -func writeDeclCfg(dcfg declcfg.DeclarativeConfig, w io.Writer, output string) error { - switch output { - case "yaml": - return declcfg.WriteYAML(dcfg, w) - case "json": - return declcfg.WriteJSON(dcfg, w) - default: - return fmt.Errorf("invalid --output value %q, expected (json|yaml)", output) - } -} - -func validate(ctx context.Context, builderCfg BuilderConfig, dir string) error { - - path := path.Join(builderCfg.WorkingDir, dir) - s, err := os.Stat(path) - if err != nil { - return fmt.Errorf("directory not found. validation path needs to be composed of BuilderConfig.WorkingDir+Component[].Destination.Path: %q: %v", path, err) - } - if !s.IsDir() { - return fmt.Errorf("%q is not a directory", path) - } - - if err := config.Validate(ctx, os.DirFS(path)); err != nil { - return fmt.Errorf("validation failure in path %q: %v", path, err) - } - return nil -} - -func build(dcfg *declcfg.DeclarativeConfig, outPath string, outType string) error { - // create the destination for output, if it does not exist - outDir := filepath.Dir(outPath) - err := os.MkdirAll(outDir, 0o777) - if err != nil { - return fmt.Errorf("creating output directory %q: %v", outPath, err) - } - - // write the dcfg - file, err := os.Create(outPath) - if err != nil { - return fmt.Errorf("creating output file %q: %v", outPath, err) - } - defer file.Close() - - err = writeDeclCfg(*dcfg, file, outType) - if err != nil { - return fmt.Errorf("writing to output file %q: %v", outPath, err) - } - - return nil -} diff --git a/staging/operator-registry/alpha/template/composite/builder_test.go b/staging/operator-registry/alpha/template/composite/builder_test.go deleted file mode 100644 index 4a70c30670..0000000000 --- a/staging/operator-registry/alpha/template/composite/builder_test.go +++ /dev/null @@ -1,1862 +0,0 @@ -package composite - -import ( - "context" - "fmt" - "io" - "os" - "path" - "path/filepath" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/operator-framework/operator-registry/pkg/image/containerdregistry" -) - -// TODO: Should we consolidate all these tests into a singular test function? -// It was intentional to keep them separate for now, but it would significantly reduce code replication to combine into one function -func TestBasicBuilder(t *testing.T) { - type testCase struct { - name string - validate bool - basicBuilder *BasicBuilder - templateDefinition TemplateDefinition - files map[string]string - buildAssertions func(t *testing.T, dir string, buildErr error) - validateAssertions func(t *testing.T, validateErr error) - } - - testDir := t.TempDir() - validConfigTemplate := `{ - "input": "%s", - "output": "%s" - }` - - testCases := []testCase{ - { - name: "successful basic build yaml output", - validate: true, - basicBuilder: NewBasicBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: BasicBuilderSchema, - Config: []byte(fmt.Sprintf(validConfigTemplate, path.Join(testDir, "components/basic.yaml"), "catalog.yaml")), - }, - files: map[string]string{ - "components/basic.yaml": basicYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.NoError(t, buildErr) - // check if the catalog.yaml file exists in the correct place - filePath := path.Join(dir, "catalog.yaml") - _, err := os.Stat(filePath) - require.NoError(t, err) - file, err := os.Open(filePath) - require.NoError(t, err) - defer file.Close() - fileData, err := io.ReadAll(file) - require.NoError(t, err) - require.Equal(t, string(fileData), basicBuiltFbcYaml) - }, - validateAssertions: func(t *testing.T, validateErr error) { - require.NoError(t, validateErr) - }, - }, - { - name: "successful basic build json output", - validate: true, - basicBuilder: NewBasicBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "json", - }), - templateDefinition: TemplateDefinition{ - Schema: BasicBuilderSchema, - Config: []byte(fmt.Sprintf(validConfigTemplate, path.Join(testDir, "components/basic.yaml"), "catalog.json")), - }, - files: map[string]string{ - "components/basic.yaml": basicYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.NoError(t, buildErr) - // check if the catalog.yaml file exists in the correct place - filePath := path.Join(dir, "catalog.json") - _, err := os.Stat(filePath) - require.NoError(t, err) - file, err := os.Open(filePath) - require.NoError(t, err) - defer file.Close() - fileData, err := io.ReadAll(file) - require.NoError(t, err) - require.Equal(t, string(fileData), basicBuiltFbcJson) - }, - validateAssertions: func(t *testing.T, validateErr error) { - require.NoError(t, validateErr) - }, - }, - { - name: "invalid template configuration", - validate: false, - basicBuilder: NewBasicBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: BasicBuilderSchema, - Config: []byte(`{ - "invalid": "components/basic.yaml", - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Contains(t, buildErr.Error(), "unmarshalling basic template config:") - }, - }, - { - name: "invalid output type", - validate: false, - basicBuilder: NewBasicBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "invalid", - }), - templateDefinition: TemplateDefinition{ - Schema: BasicBuilderSchema, - Config: []byte(fmt.Sprintf(validConfigTemplate, path.Join(testDir, "components/basic.yaml"), "catalog.yaml")), - }, - files: map[string]string{ - "components/basic.yaml": basicYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Contains(t, buildErr.Error(), fmt.Sprintf("invalid --output value %q, expected (json|yaml)", "invalid")) - }, - }, - { - name: "invalid schema", - validate: false, - basicBuilder: NewBasicBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: "olm.invalid", - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Contains(t, buildErr.Error(), fmt.Sprintf("schema %q does not match the basic template builder schema %q", "olm.invalid", BasicBuilderSchema)) - }, - }, - { - name: "template config has empty input", - validate: false, - basicBuilder: NewBasicBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: BasicBuilderSchema, - Config: []byte(`{ - "output": "catalog.yaml" - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Equal(t, - buildErr.Error(), - "basic template configuration is invalid: basic template config must have a non-empty input (templateDefinition.config.input)") - }, - }, - { - name: "template config has empty output", - validate: false, - basicBuilder: NewBasicBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: BasicBuilderSchema, - Config: []byte(`{ - "input": "components/basic.yaml" - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Equal(t, - buildErr.Error(), - "basic template configuration is invalid: basic template config must have a non-empty output (templateDefinition.config.output)") - }, - }, - { - name: "template config has empty input & output", - validate: false, - basicBuilder: NewBasicBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: BasicBuilderSchema, - Config: []byte(`{}`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Equal(t, - buildErr.Error(), - "basic template configuration is invalid: basic template config must have a non-empty input (templateDefinition.config.input),basic template config must have a non-empty output (templateDefinition.config.output)") - }, - }, - { - name: "successful basic build yaml output using contribution cwd to find inputs", - validate: true, - basicBuilder: NewBasicBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - ContributionPath: filepath.Join(testDir, "components"), - }), - templateDefinition: TemplateDefinition{ - Schema: BasicBuilderSchema, - Config: []byte(fmt.Sprintf(validConfigTemplate, "basic.yaml", "catalog.yaml")), - }, - files: map[string]string{ - "components/basic.yaml": basicYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.NoError(t, buildErr) - // check if the catalog.yaml file exists in the correct place - filePath := path.Join(dir, "catalog.yaml") - _, err := os.Stat(filePath) - require.NoError(t, err) - file, err := os.Open(filePath) - require.NoError(t, err) - defer file.Close() - fileData, err := io.ReadAll(file) - require.NoError(t, err) - require.Equal(t, string(fileData), basicBuiltFbcYaml) - }, - validateAssertions: func(t *testing.T, validateErr error) { - require.NoError(t, validateErr) - }, - }, - } - - for i, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - outDir := fmt.Sprintf("basic-%d", i) - outPath := path.Join(testDir, outDir) - err := os.MkdirAll(outPath, 0o777) - require.NoError(t, err) - - // create files in temp dir - for fileName, fileContents := range tc.files { - err := os.MkdirAll(path.Join(testDir, path.Dir(fileName)), 0o777) - require.NoError(t, err) - file, err := os.Create(path.Join(testDir, fileName)) - require.NoError(t, err) - _, err = file.WriteString(fileContents) - require.NoError(t, err) - } - - cacheDir, err := os.MkdirTemp("", "opm-registry-") - require.NoError(t, err) - - reg, err := containerdregistry.NewRegistry( - containerdregistry.WithCacheDir(cacheDir), - ) - defer reg.Destroy() - require.NoError(t, err) - - buildErr := tc.basicBuilder.Build(context.Background(), reg, outDir, tc.templateDefinition) - tc.buildAssertions(t, outPath, buildErr) - - if tc.validate { - validateErr := tc.basicBuilder.Validate(context.Background(), outDir) - tc.validateAssertions(t, validateErr) - } - }) - } -} - -const basicYaml = `--- -defaultChannel: preview -name: webhook-operator -schema: olm.package ---- -image: quay.io/olmtest/webhook-operator-bundle:0.0.3 -name: webhook-operator.v0.0.1 -schema: olm.bundle ---- -schema: olm.channel -package: webhook-operator -name: preview -entries: - - name: webhook-operator.v0.0.1 -` - -const basicBuiltFbcYaml = `--- -defaultChannel: preview -name: webhook-operator -schema: olm.package ---- -entries: -- name: webhook-operator.v0.0.1 -name: preview -package: webhook-operator -schema: olm.channel ---- -image: quay.io/olmtest/webhook-operator-bundle:0.0.3 -name: webhook-operator.v0.0.1 -package: webhook-operator -properties: -- type: olm.gvk - value: - group: webhook.operators.coreos.io - kind: WebhookTest - version: v1 -- type: olm.gvk - value: - group: webhook.operators.coreos.io - kind: WebhookTest - version: v2 -- type: olm.package - value: - packageName: webhook-operator - version: 0.0.1 -- type: olm.csv.metadata - value: - annotations: - alm-examples: |- - [ - { - "apiVersion": "webhook.operators.coreos.io/v1", - "kind": "WebhookTest", - "metadata": { - "name": "webhooktest-sample", - "namespace": "webhook-operator-system" - }, - "spec": { - "valid": true - } - } - ] - capabilities: Basic Install - operators.operatorframework.io/builder: operator-sdk-v1.0.0 - operators.operatorframework.io/project_layout: go - apiServiceDefinitions: {} - crdDescriptions: - owned: - - kind: WebhookTest - name: webhooktests.webhook.operators.coreos.io - version: v1 - description: Webhook Operator description. TODO. - displayName: Webhook Operator - installModes: - - supported: false - type: OwnNamespace - - supported: false - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: true - type: AllNamespaces - keywords: - - webhook-operator - links: - - name: Webhook Operator - url: https://webhook-operator.domain - maintainers: - - email: your@email.com - name: Maintainer Name - maturity: alpha - provider: - name: Provider Name - url: https://your.domain -relatedImages: -- image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 - name: "" -- image: quay.io/olmtest/webhook-operator-bundle:0.0.3 - name: "" -- image: quay.io/olmtest/webhook-operator:0.0.3 - name: "" -schema: olm.bundle -` - -const basicBuiltFbcJson = `{ - "schema": "olm.package", - "name": "webhook-operator", - "defaultChannel": "preview" -} -{ - "schema": "olm.channel", - "name": "preview", - "package": "webhook-operator", - "entries": [ - { - "name": "webhook-operator.v0.0.1" - } - ] -} -{ - "schema": "olm.bundle", - "name": "webhook-operator.v0.0.1", - "package": "webhook-operator", - "image": "quay.io/olmtest/webhook-operator-bundle:0.0.3", - "properties": [ - { - "type": "olm.gvk", - "value": { - "group": "webhook.operators.coreos.io", - "kind": "WebhookTest", - "version": "v1" - } - }, - { - "type": "olm.gvk", - "value": { - "group": "webhook.operators.coreos.io", - "kind": "WebhookTest", - "version": "v2" - } - }, - { - "type": "olm.package", - "value": { - "packageName": "webhook-operator", - "version": "0.0.1" - } - }, - { - "type": "olm.csv.metadata", - "value": { - "annotations": { - "alm-examples": "[\n {\n \"apiVersion\": \"webhook.operators.coreos.io/v1\",\n \"kind\": \"WebhookTest\",\n \"metadata\": {\n \"name\": \"webhooktest-sample\",\n \"namespace\": \"webhook-operator-system\"\n },\n \"spec\": {\n \"valid\": true\n }\n }\n]", - "capabilities": "Basic Install", - "operators.operatorframework.io/builder": "operator-sdk-v1.0.0", - "operators.operatorframework.io/project_layout": "go" - }, - "apiServiceDefinitions": {}, - "crdDescriptions": { - "owned": [ - { - "name": "webhooktests.webhook.operators.coreos.io", - "version": "v1", - "kind": "WebhookTest" - } - ] - }, - "description": "Webhook Operator description. TODO.", - "displayName": "Webhook Operator", - "installModes": [ - { - "type": "OwnNamespace", - "supported": false - }, - { - "type": "SingleNamespace", - "supported": false - }, - { - "type": "MultiNamespace", - "supported": false - }, - { - "type": "AllNamespaces", - "supported": true - } - ], - "keywords": [ - "webhook-operator" - ], - "links": [ - { - "name": "Webhook Operator", - "url": "https://webhook-operator.domain" - } - ], - "maintainers": [ - { - "name": "Maintainer Name", - "email": "your@email.com" - } - ], - "maturity": "alpha", - "provider": { - "name": "Provider Name", - "url": "https://your.domain" - } - } - } - ], - "relatedImages": [ - { - "name": "", - "image": "gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0" - }, - { - "name": "", - "image": "quay.io/olmtest/webhook-operator-bundle:0.0.3" - }, - { - "name": "", - "image": "quay.io/olmtest/webhook-operator:0.0.3" - } - ] -} -` - -func TestSemverBuilder(t *testing.T) { - type testCase struct { - name string - validate bool - semverBuilder *SemverBuilder - templateDefinition TemplateDefinition - files map[string]string - buildAssertions func(t *testing.T, dir string, buildErr error) - validateAssertions func(t *testing.T, validateErr error) - } - - testDir := t.TempDir() - validConfigTemplate := `{ - "input": "%s", - "output": "%s" - }` - - testCases := []testCase{ - { - name: "successful semver build yaml output", - validate: true, - semverBuilder: NewSemverBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: SemverBuilderSchema, - Config: []byte(fmt.Sprintf(validConfigTemplate, path.Join(testDir, "components/semver.yaml"), "catalog.yaml")), - }, - files: map[string]string{ - "components/semver.yaml": semverYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.NoError(t, buildErr) - // check if the catalog.yaml file exists in the correct place - filePath := path.Join(dir, "catalog.yaml") - _, err := os.Stat(filePath) - require.NoError(t, err) - file, err := os.Open(filePath) - require.NoError(t, err) - defer file.Close() - fileData, err := io.ReadAll(file) - require.NoError(t, err) - require.Equal(t, semverBuiltFbcYaml, string(fileData)) - }, - validateAssertions: func(t *testing.T, validateErr error) { - require.NoError(t, validateErr) - }, - }, - { - name: "successful semver build json output", - validate: true, - semverBuilder: NewSemverBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "json", - }), - templateDefinition: TemplateDefinition{ - Schema: SemverBuilderSchema, - Config: []byte(fmt.Sprintf(validConfigTemplate, path.Join(testDir, "components/semver.yaml"), "catalog.json")), - }, - files: map[string]string{ - "components/semver.yaml": semverYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.NoError(t, buildErr) - // check if the catalog.yaml file exists in the correct place - filePath := path.Join(dir, "catalog.json") - _, err := os.Stat(filePath) - require.NoError(t, err) - file, err := os.Open(filePath) - require.NoError(t, err) - defer file.Close() - fileData, err := io.ReadAll(file) - require.NoError(t, err) - require.Equal(t, semverBuiltFbcJson, string(fileData)) - }, - validateAssertions: func(t *testing.T, validateErr error) { - require.NoError(t, validateErr) - }, - }, - { - name: "invalid template configuration", - validate: false, - semverBuilder: NewSemverBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: SemverBuilderSchema, - Config: []byte(`{ - "invalid": "components/semver.yaml", - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Contains(t, buildErr.Error(), "unmarshalling semver template config:") - }, - }, - { - name: "invalid output type", - validate: false, - semverBuilder: NewSemverBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "invalid", - }), - templateDefinition: TemplateDefinition{ - Schema: SemverBuilderSchema, - Config: []byte(fmt.Sprintf(validConfigTemplate, path.Join(testDir, "components/semver.yaml"), "catalog.yaml")), - }, - files: map[string]string{ - "components/semver.yaml": semverYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Contains(t, buildErr.Error(), fmt.Sprintf("invalid --output value %q, expected (json|yaml)", "invalid")) - }, - }, - { - name: "invalid schema", - validate: false, - semverBuilder: NewSemverBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: "olm.invalid", - Config: []byte(fmt.Sprintf(validConfigTemplate, path.Join(testDir, "components/semver.yaml"), "catalog.yaml")), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Contains(t, buildErr.Error(), fmt.Sprintf("schema %q does not match the semver template builder schema %q", "olm.invalid", SemverBuilderSchema)) - }, - }, - { - name: "template config has empty input", - validate: false, - semverBuilder: NewSemverBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: SemverBuilderSchema, - Config: []byte(`{ - "output": "catalog.yaml" - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Equal(t, - buildErr.Error(), - "semver template configuration is invalid: semver template config must have a non-empty input (templateDefinition.config.input)") - }, - }, - { - name: "template config has empty output", - validate: false, - semverBuilder: NewSemverBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: SemverBuilderSchema, - Config: []byte(`{ - "input": "components/semver.yaml" - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Equal(t, - "semver template configuration is invalid: semver template config must have a non-empty output (templateDefinition.config.output)", - buildErr.Error()) - }, - }, - { - name: "template config has empty input & output", - validate: false, - semverBuilder: NewSemverBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: SemverBuilderSchema, - Config: []byte(`{}`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Equal(t, - "semver template configuration is invalid: semver template config must have a non-empty input (templateDefinition.config.input),semver template config must have a non-empty output (templateDefinition.config.output)", - buildErr.Error(), - ) - }, - }, - { - name: "successful semver build json output using contribution cwd to find inputs", - validate: true, - semverBuilder: NewSemverBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "json", - ContributionPath: filepath.Join(testDir, "components"), - }), - templateDefinition: TemplateDefinition{ - Schema: SemverBuilderSchema, - Config: []byte(fmt.Sprintf(validConfigTemplate, "semver.yaml", "catalog.json")), - }, - files: map[string]string{ - "components/semver.yaml": semverYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.NoError(t, buildErr) - // check if the catalog.yaml file exists in the correct place - filePath := path.Join(dir, "catalog.json") - _, err := os.Stat(filePath) - require.NoError(t, err) - file, err := os.Open(filePath) - require.NoError(t, err) - defer file.Close() - fileData, err := io.ReadAll(file) - require.NoError(t, err) - require.Equal(t, semverBuiltFbcJson, string(fileData)) - }, - validateAssertions: func(t *testing.T, validateErr error) { - require.NoError(t, validateErr) - }, - }, - } - - for i, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - outDir := fmt.Sprintf("semver-%d", i) - outPath := path.Join(testDir, outDir) - err := os.MkdirAll(outPath, 0o777) - require.NoError(t, err) - - // create files in temp dir - for fileName, fileContents := range tc.files { - err := os.MkdirAll(path.Join(testDir, path.Dir(fileName)), 0o777) - require.NoError(t, err) - file, err := os.Create(path.Join(testDir, fileName)) - require.NoError(t, err) - _, err = file.WriteString(fileContents) - require.NoError(t, err) - // fmt.Printf("wrote file: %q\n", path.Join(testDir, fileName)) - } - - cacheDir, err := os.MkdirTemp("", "opm-registry-") - require.NoError(t, err) - - reg, err := containerdregistry.NewRegistry( - containerdregistry.WithCacheDir(cacheDir), - ) - defer reg.Destroy() - require.NoError(t, err) - - buildErr := tc.semverBuilder.Build(context.Background(), reg, outDir, tc.templateDefinition) - tc.buildAssertions(t, outPath, buildErr) - - if tc.validate { - validateErr := tc.semverBuilder.Validate(context.Background(), outDir) - tc.validateAssertions(t, validateErr) - } - }) - } -} - -const semverYaml = `--- -Schema: olm.semver -GenerateMajorChannels: true -GenerateMinorChannels: true -Stable: - Bundles: - - Image: quay.io/olmtest/webhook-operator-bundle:0.0.3 -` - -const semverBuiltFbcYaml = `--- -defaultChannel: stable-v0.0 -name: webhook-operator -schema: olm.package ---- -entries: -- name: webhook-operator.v0.0.1 -name: stable-v0 -package: webhook-operator -schema: olm.channel ---- -entries: -- name: webhook-operator.v0.0.1 -name: stable-v0.0 -package: webhook-operator -schema: olm.channel ---- -image: quay.io/olmtest/webhook-operator-bundle:0.0.3 -name: webhook-operator.v0.0.1 -package: webhook-operator -properties: -- type: olm.gvk - value: - group: webhook.operators.coreos.io - kind: WebhookTest - version: v1 -- type: olm.gvk - value: - group: webhook.operators.coreos.io - kind: WebhookTest - version: v2 -- type: olm.package - value: - packageName: webhook-operator - version: 0.0.1 -- type: olm.csv.metadata - value: - annotations: - alm-examples: |- - [ - { - "apiVersion": "webhook.operators.coreos.io/v1", - "kind": "WebhookTest", - "metadata": { - "name": "webhooktest-sample", - "namespace": "webhook-operator-system" - }, - "spec": { - "valid": true - } - } - ] - capabilities: Basic Install - operators.operatorframework.io/builder: operator-sdk-v1.0.0 - operators.operatorframework.io/project_layout: go - apiServiceDefinitions: {} - crdDescriptions: - owned: - - kind: WebhookTest - name: webhooktests.webhook.operators.coreos.io - version: v1 - description: Webhook Operator description. TODO. - displayName: Webhook Operator - installModes: - - supported: false - type: OwnNamespace - - supported: false - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: true - type: AllNamespaces - keywords: - - webhook-operator - links: - - name: Webhook Operator - url: https://webhook-operator.domain - maintainers: - - email: your@email.com - name: Maintainer Name - maturity: alpha - provider: - name: Provider Name - url: https://your.domain -relatedImages: -- image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 - name: "" -- image: quay.io/olmtest/webhook-operator-bundle:0.0.3 - name: "" -- image: quay.io/olmtest/webhook-operator:0.0.3 - name: "" -schema: olm.bundle -` - -const semverBuiltFbcJson = `{ - "schema": "olm.package", - "name": "webhook-operator", - "defaultChannel": "stable-v0.0" -} -{ - "schema": "olm.channel", - "name": "stable-v0", - "package": "webhook-operator", - "entries": [ - { - "name": "webhook-operator.v0.0.1" - } - ] -} -{ - "schema": "olm.channel", - "name": "stable-v0.0", - "package": "webhook-operator", - "entries": [ - { - "name": "webhook-operator.v0.0.1" - } - ] -} -{ - "schema": "olm.bundle", - "name": "webhook-operator.v0.0.1", - "package": "webhook-operator", - "image": "quay.io/olmtest/webhook-operator-bundle:0.0.3", - "properties": [ - { - "type": "olm.gvk", - "value": { - "group": "webhook.operators.coreos.io", - "kind": "WebhookTest", - "version": "v1" - } - }, - { - "type": "olm.gvk", - "value": { - "group": "webhook.operators.coreos.io", - "kind": "WebhookTest", - "version": "v2" - } - }, - { - "type": "olm.package", - "value": { - "packageName": "webhook-operator", - "version": "0.0.1" - } - }, - { - "type": "olm.csv.metadata", - "value": { - "annotations": { - "alm-examples": "[\n {\n \"apiVersion\": \"webhook.operators.coreos.io/v1\",\n \"kind\": \"WebhookTest\",\n \"metadata\": {\n \"name\": \"webhooktest-sample\",\n \"namespace\": \"webhook-operator-system\"\n },\n \"spec\": {\n \"valid\": true\n }\n }\n]", - "capabilities": "Basic Install", - "operators.operatorframework.io/builder": "operator-sdk-v1.0.0", - "operators.operatorframework.io/project_layout": "go" - }, - "apiServiceDefinitions": {}, - "crdDescriptions": { - "owned": [ - { - "name": "webhooktests.webhook.operators.coreos.io", - "version": "v1", - "kind": "WebhookTest" - } - ] - }, - "description": "Webhook Operator description. TODO.", - "displayName": "Webhook Operator", - "installModes": [ - { - "type": "OwnNamespace", - "supported": false - }, - { - "type": "SingleNamespace", - "supported": false - }, - { - "type": "MultiNamespace", - "supported": false - }, - { - "type": "AllNamespaces", - "supported": true - } - ], - "keywords": [ - "webhook-operator" - ], - "links": [ - { - "name": "Webhook Operator", - "url": "https://webhook-operator.domain" - } - ], - "maintainers": [ - { - "name": "Maintainer Name", - "email": "your@email.com" - } - ], - "maturity": "alpha", - "provider": { - "name": "Provider Name", - "url": "https://your.domain" - } - } - } - ], - "relatedImages": [ - { - "name": "", - "image": "gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0" - }, - { - "name": "", - "image": "quay.io/olmtest/webhook-operator-bundle:0.0.3" - }, - { - "name": "", - "image": "quay.io/olmtest/webhook-operator:0.0.3" - } - ] -} -` - -func TestRawBuilder(t *testing.T) { - type testCase struct { - name string - validate bool - rawBuilder *RawBuilder - templateDefinition TemplateDefinition - files map[string]string - buildAssertions func(t *testing.T, dir string, buildErr error) - validateAssertions func(t *testing.T, validateErr error) - } - - testDir := t.TempDir() - validConfigTemplate := `{ - "input": "%s", - "output": "%s" - }` - - testCases := []testCase{ - { - name: "successful raw build yaml output", - validate: true, - rawBuilder: NewRawBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: RawBuilderSchema, - Config: []byte(fmt.Sprintf(validConfigTemplate, path.Join(testDir, "components/raw.yaml"), "catalog.yaml")), - }, - files: map[string]string{ - "components/raw.yaml": rawYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.NoError(t, buildErr) - // check if the catalog.yaml file exists in the correct place - filePath := path.Join(dir, "catalog.yaml") - _, err := os.Stat(filePath) - require.NoError(t, err) - file, err := os.Open(filePath) - require.NoError(t, err) - defer file.Close() - fileData, err := io.ReadAll(file) - require.NoError(t, err) - require.Equal(t, string(fileData), rawBuiltFbcYaml) - }, - validateAssertions: func(t *testing.T, validateErr error) { - require.NoError(t, validateErr) - }, - }, - { - name: "successful raw build json output", - validate: true, - rawBuilder: NewRawBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "json", - }), - templateDefinition: TemplateDefinition{ - Schema: RawBuilderSchema, - Config: []byte(fmt.Sprintf(validConfigTemplate, path.Join(testDir, "components/raw.yaml"), "catalog.json")), - }, - files: map[string]string{ - "components/raw.yaml": rawYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.NoError(t, buildErr) - // check if the catalog.yaml file exists in the correct place - filePath := path.Join(dir, "catalog.json") - _, err := os.Stat(filePath) - require.NoError(t, err) - file, err := os.Open(filePath) - require.NoError(t, err) - defer file.Close() - fileData, err := io.ReadAll(file) - require.NoError(t, err) - require.Equal(t, string(fileData), rawBuiltFbcJson) - }, - validateAssertions: func(t *testing.T, validateErr error) { - require.NoError(t, validateErr) - }, - }, - { - name: "invalid template configuration", - validate: false, - rawBuilder: NewRawBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: RawBuilderSchema, - Config: []byte(`{ - "invalid": "components/raw.yaml", - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Contains(t, buildErr.Error(), "unmarshalling raw template config:") - }, - }, - { - name: "invalid output type", - validate: false, - rawBuilder: NewRawBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "invalid", - }), - templateDefinition: TemplateDefinition{ - Schema: RawBuilderSchema, - Config: []byte(fmt.Sprintf(validConfigTemplate, path.Join(testDir, "components/raw.yaml"), "catalog.yaml")), - }, - files: map[string]string{ - "components/raw.yaml": semverYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Contains(t, buildErr.Error(), fmt.Sprintf("invalid --output value %q, expected (json|yaml)", "invalid")) - }, - }, - { - name: "invalid schema", - validate: false, - rawBuilder: NewRawBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: "olm.invalid", - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Contains(t, buildErr.Error(), fmt.Sprintf("schema %q does not match the raw template builder schema %q", "olm.invalid", RawBuilderSchema)) - }, - }, - { - name: "template config has empty input", - validate: false, - rawBuilder: NewRawBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: RawBuilderSchema, - Config: []byte(`{ - "output": "catalog.yaml" - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Equal(t, - buildErr.Error(), - "raw template configuration is invalid: raw template config must have a non-empty input (templateDefinition.config.input)") - }, - }, - { - name: "template config has empty output", - validate: false, - rawBuilder: NewRawBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: RawBuilderSchema, - Config: []byte(`{ - "input": "components/raw.yaml" - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Equal(t, - buildErr.Error(), - "raw template configuration is invalid: raw template config must have a non-empty output (templateDefinition.config.output)") - }, - }, - { - name: "template config has empty input & output", - validate: false, - rawBuilder: NewRawBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: RawBuilderSchema, - Config: []byte(`{}`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Equal(t, - buildErr.Error(), - "raw template configuration is invalid: raw template config must have a non-empty input (templateDefinition.config.input),raw template config must have a non-empty output (templateDefinition.config.output)") - }, - }, - { - name: "successful raw build json output using contribution cwd to find inputs", - validate: true, - rawBuilder: NewRawBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "json", - ContributionPath: filepath.Join(testDir, "components"), - }), - templateDefinition: TemplateDefinition{ - Schema: RawBuilderSchema, - Config: []byte(fmt.Sprintf(validConfigTemplate, "raw.yaml", "catalog.json")), - }, - files: map[string]string{ - "components/raw.yaml": rawYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.NoError(t, buildErr) - // check if the catalog.yaml file exists in the correct place - filePath := path.Join(dir, "catalog.json") - _, err := os.Stat(filePath) - require.NoError(t, err) - file, err := os.Open(filePath) - require.NoError(t, err) - defer file.Close() - fileData, err := io.ReadAll(file) - require.NoError(t, err) - require.Equal(t, string(fileData), rawBuiltFbcJson) - }, - validateAssertions: func(t *testing.T, validateErr error) { - require.NoError(t, validateErr) - }, - }, - } - - for i, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - outDir := fmt.Sprintf("raw-%d", i) - outPath := path.Join(testDir, outDir) - err := os.MkdirAll(outPath, 0o777) - require.NoError(t, err) - - // create files in temp dir - for fileName, fileContents := range tc.files { - err := os.MkdirAll(path.Join(testDir, path.Dir(fileName)), 0o777) - require.NoError(t, err) - file, err := os.Create(path.Join(testDir, fileName)) - require.NoError(t, err) - _, err = file.WriteString(fileContents) - require.NoError(t, err) - } - - cacheDir, err := os.MkdirTemp("", "opm-registry-") - require.NoError(t, err) - - reg, err := containerdregistry.NewRegistry( - containerdregistry.WithCacheDir(cacheDir), - ) - defer reg.Destroy() - require.NoError(t, err) - - buildErr := tc.rawBuilder.Build(context.Background(), reg, outDir, tc.templateDefinition) - tc.buildAssertions(t, outPath, buildErr) - - if tc.validate { - validateErr := tc.rawBuilder.Validate(context.Background(), outDir) - tc.validateAssertions(t, validateErr) - } - }) - } -} - -const rawYaml = `--- -defaultChannel: preview -name: webhook-operator-412 -schema: olm.package ---- -image: quay.io/olmtest/webhook-operator-bundle:0.0.3 -name: webhook-operator.v0.0.1 -package: webhook-operator-412 -properties: -- type: olm.gvk - value: - group: webhook.operators.coreos.io - kind: WebhookTest - version: v1 -- type: olm.gvk - value: - group: webhook.operators.coreos.io - kind: WebhookTest - version: v2 -- type: olm.package - value: - packageName: webhook-operator-412 - version: 0.0.1 -- type: olm.bundle.object - value: - data: eyJhcGlWZXJzaW9uIjoicmJhYy5hdXRob3JpemF0aW9uLms4cy5pby92MWJldGExIiwia2luZCI6IkNsdXN0ZXJSb2xlIiwibWV0YWRhdGEiOnsiY3JlYXRpb25UaW1lc3RhbXAiOm51bGwsIm5hbWUiOiJ3ZWJob29rLW9wZXJhdG9yLW1ldHJpY3MtcmVhZGVyIn0sInJ1bGVzIjpbeyJub25SZXNvdXJjZVVSTHMiOlsiL21ldHJpY3MiXSwidmVyYnMiOlsiZ2V0Il19XX0= -- type: olm.bundle.object - value: - data: eyJhcGlWZXJzaW9uIjoib3BlcmF0b3JzLmNvcmVvcy5jb20vdjFhbHBoYTEiLCJraW5kIjoiQ2x1c3RlclNlcnZpY2VWZXJzaW9uIiwibWV0YWRhdGEiOnsiYW5ub3RhdGlvbnMiOnsiYWxtLWV4YW1wbGVzIjoiW1xuICB7XG4gICAgXCJhcGlWZXJzaW9uXCI6IFwid2ViaG9vay5vcGVyYXRvcnMuY29yZW9zLmlvL3YxXCIsXG4gICAgXCJraW5kXCI6IFwiV2ViaG9va1Rlc3RcIixcbiAgICBcIm1ldGFkYXRhXCI6IHtcbiAgICAgIFwibmFtZVwiOiBcIndlYmhvb2t0ZXN0LXNhbXBsZVwiLFxuICAgICAgXCJuYW1lc3BhY2VcIjogXCJ3ZWJob29rLW9wZXJhdG9yLXN5c3RlbVwiXG4gICAgfSxcbiAgICBcInNwZWNcIjoge1xuICAgICAgXCJ2YWxpZFwiOiB0cnVlXG4gICAgfVxuICB9XG5dIiwiY2FwYWJpbGl0aWVzIjoiQmFzaWMgSW5zdGFsbCIsIm9wZXJhdG9ycy5vcGVyYXRvcmZyYW1ld29yay5pby9idWlsZGVyIjoib3BlcmF0b3Itc2RrLXYxLjAuMCIsIm9wZXJhdG9ycy5vcGVyYXRvcmZyYW1ld29yay5pby9wcm9qZWN0X2xheW91dCI6ImdvIn0sIm5hbWUiOiJ3ZWJob29rLW9wZXJhdG9y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ZSI6Im9iamVjdCJ9fSwic2VydmVkIjp0cnVlLCJzdG9yYWdlIjpmYWxzZX1dfSwic3RhdHVzIjp7ImFjY2VwdGVkTmFtZXMiOnsia2luZCI6IiIsInBsdXJhbCI6IiJ9LCJjb25kaXRpb25zIjpbXSwic3RvcmVkVmVyc2lvbnMiOltdfX0= -relatedImages: -- image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 - name: "" -- image: quay.io/olmtest/webhook-operator-bundle:0.0.3 - name: "" -- image: quay.io/olmtest/webhook-operator:0.0.3 - name: "" -schema: olm.bundle ---- -schema: olm.channel -package: webhook-operator-412 -name: preview -entries: - - name: webhook-operator.v0.0.1 -` - -const rawBuiltFbcYaml = `--- -defaultChannel: preview -name: webhook-operator-412 -schema: olm.package ---- -entries: -- name: webhook-operator.v0.0.1 -name: preview -package: webhook-operator-412 -schema: olm.channel ---- -image: quay.io/olmtest/webhook-operator-bundle:0.0.3 -name: webhook-operator.v0.0.1 -package: webhook-operator-412 -properties: -- type: olm.gvk - value: - group: webhook.operators.coreos.io - kind: WebhookTest - version: v1 -- type: olm.gvk - value: - group: webhook.operators.coreos.io - kind: WebhookTest - version: v2 -- type: olm.package - value: - packageName: webhook-operator-412 - version: 0.0.1 -- type: olm.bundle.object - value: - data: eyJhcGlWZXJzaW9uIjoicmJhYy5hdXRob3JpemF0aW9uLms4cy5pby92MWJldGExIiwia2luZCI6IkNsdXN0ZXJSb2xlIiwibWV0YWRhdGEiOnsiY3JlYXRpb25UaW1lc3RhbXAiOm51bGwsIm5hbWUiOiJ3ZWJob29rLW9wZXJhdG9yLW1ldHJpY3MtcmVhZGVyIn0sInJ1bGVzIjpbeyJub25SZXNvdXJjZVVSTHMiOlsiL21ldHJpY3MiXSwidmVyYnMiOlsiZ2V0Il19XX0= -- type: olm.bundle.object - value: - data: eyJhcGlWZXJzaW9uIjoib3BlcmF0b3JzLmNvcmVvcy5jb20vdjFhbHBoYTEiLCJraW5kIjoiQ2x1c3RlclNlcnZpY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1Rlc3QuIEVkaXQgV2ViaG9va1Rlc3RfdHlwZXMuZ28gdG8gcmVtb3ZlL3VwZGF0ZSIsInByb3BlcnRpZXMiOnsibXV0YXRlIjp7ImRlc2NyaXB0aW9uIjoiTXV0YXRlIGlzIGEgZmllbGQgdGhhdCB3aWxsIGJlIHNldCB0byB0cnVlIGJ5IHRoZSBtdXRhdGluZyB3ZWJob29rLiIsInR5cGUiOiJib29sZWFuIn0sInZhbGlkIjp7ImRlc2NyaXB0aW9uIjoiVmFsaWQgbXVzdCBiZSBzZXQgdG8gdHJ1ZSBvciB0aGUgdmFsaWRhdGlvbiB3ZWJob29rIHdpbGwgcmVqZWN0IHRoZSByZXNvdXJjZS4iLCJ0eXBlIjoiYm9vbGVhbiJ9fSwicmVxdWlyZWQiOlsidmFsaWQiXSwidHlwZSI6Im9iamVjdCJ9fSwicmVxdWlyZWQiOlsiY29udmVyc2lvbiJdLCJ0eXBlIjoib2JqZWN0In0sInN0YXR1cyI6eyJkZXNjcmlwdGlvbiI6IldlYmhvb2tUZXN0U3RhdHVzIGRlZmluZXMgdGhlIG9ic2VydmVkIHN0YXRlIG9mIFdlYmhvb2tUZXN0IiwidHlwZSI6Im9iamVjdCJ9fSwidHlwZSI6Im9iamVjdCJ9fSwic2VydmVkIjp0cnVlLCJzdG9yYWdlIjpmYWxzZX1dfSwic3RhdHVzIjp7ImFjY2VwdGVkTmFtZXMiOnsia2luZCI6IiIsInBsdXJhbCI6IiJ9LCJjb25kaXRpb25zIjpbXSwic3RvcmVkVmVyc2lvbnMiOltdfX0= -relatedImages: -- image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 - name: "" -- image: quay.io/olmtest/webhook-operator-bundle:0.0.3 - name: "" -- image: quay.io/olmtest/webhook-operator:0.0.3 - name: "" -schema: olm.bundle -` - -const rawBuiltFbcJson = `{ - "schema": "olm.package", - "name": "webhook-operator-412", - "defaultChannel": "preview" -} -{ - "schema": "olm.channel", - "name": "preview", - "package": "webhook-operator-412", - "entries": [ - { - "name": "webhook-operator.v0.0.1" - } - ] -} -{ - "schema": "olm.bundle", - "name": "webhook-operator.v0.0.1", - "package": "webhook-operator-412", - "image": "quay.io/olmtest/webhook-operator-bundle:0.0.3", - "properties": [ - { - "type": "olm.gvk", - "value": { - "group": "webhook.operators.coreos.io", - "kind": "WebhookTest", - "version": "v1" - } - }, - { - "type": "olm.gvk", - "value": { - "group": "webhook.operators.coreos.io", - "kind": "WebhookTest", - "version": "v2" - } - }, - { - "type": "olm.package", - "value": { - "packageName": "webhook-operator-412", - "version": "0.0.1" - } - }, - { - "type": "olm.bundle.object", - "value": { - "data": "eyJhcGlWZXJzaW9uIjoicmJhYy5hdXRob3JpemF0aW9uLms4cy5pby92MWJldGExIiwia2luZCI6IkNsdXN0ZXJSb2xlIiwibWV0YWRhdGEiOnsiY3JlYXRpb25UaW1lc3RhbXAiOm51bGwsIm5hbWUiOiJ3ZWJob29rLW9wZXJhdG9yLW1ldHJpY3MtcmVhZGVyIn0sInJ1bGVzIjpbeyJub25SZXNvdXJjZVVSTHMiOlsiL21ldHJpY3MiXSwidmVyYnMiOlsiZ2V0Il19XX0=" - } - }, - { - "type": "olm.bundle.object", - "value": { - "data": "eyJhcGlWZXJzaW9uIjoib3BlcmF0b3JzLmNvcmVvcy5jb20vdjFhbHBoYTEiLCJraW5kIjoiQ2x1c3RlclNlcnZpY2VWZXJzaW9uIiwibWV0YWRhdGEiOnsiYW5ub3RhdGlvbnMiOnsiYWxtLWV4YW1wbGVzIjoiW1xuICB7XG4gICAgXCJhcGlWZXJzaW9uXCI6IFwid2ViaG9vay5vcGVyYXRvcnMuY29yZW9zLmlvL3YxXCIsXG4gICAgXCJraW5kXCI6IFwiV2ViaG9va1Rlc3RcIixcbiAgICBcIm1ldGFkYXRhXCI6IHtcbiAgICAgIFwibmFtZVwiOiBcIndlYmhvb2t0ZXN0LXNhbXBsZVwiLFxuICAgICAgXCJuYW1lc3BhY2VcIjogXCJ3ZWJob29rLW9wZXJhdG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dmFsaWRhdGlvbiB3ZWJob29rIHdpbGwgcmVqZWN0IHRoZSByZXNvdXJjZS4iLCJ0eXBlIjoiYm9vbGVhbiJ9fSwicmVxdWlyZWQiOlsidmFsaWQiXSwidHlwZSI6Im9iamVjdCJ9fSwicmVxdWlyZWQiOlsiY29udmVyc2lvbiJdLCJ0eXBlIjoib2JqZWN0In0sInN0YXR1cyI6eyJkZXNjcmlwdGlvbiI6IldlYmhvb2tUZXN0U3RhdHVzIGRlZmluZXMgdGhlIG9ic2VydmVkIHN0YXRlIG9mIFdlYmhvb2tUZXN0IiwidHlwZSI6Im9iamVjdCJ9fSwidHlwZSI6Im9iamVjdCJ9fSwic2VydmVkIjp0cnVlLCJzdG9yYWdlIjpmYWxzZX1dfSwic3RhdHVzIjp7ImFjY2VwdGVkTmFtZXMiOnsia2luZCI6IiIsInBsdXJhbCI6IiJ9LCJjb25kaXRpb25zIjpbXSwic3RvcmVkVmVyc2lvbnMiOltdfX0=" - } - } - ], - "relatedImages": [ - { - "name": "", - "image": "gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0" - }, - { - "name": "", - "image": "quay.io/olmtest/webhook-operator-bundle:0.0.3" - }, - { - "name": "", - "image": "quay.io/olmtest/webhook-operator:0.0.3" - } - ] -} -` - -func TestCustomBuilder(t *testing.T) { - type testCase struct { - name string - validate bool - customBuilder *CustomBuilder - templateDefinition TemplateDefinition - files map[string]string - buildAssertions func(t *testing.T, dir string, buildErr error) - validateAssertions func(t *testing.T, validateErr error) - } - - testDir := t.TempDir() - validTemplateConfig := `{ - "command": "%s", - "args": ["%s"], - "output": "%s" - }` - - testCases := []testCase{ - { - name: "successful custom build yaml output", - validate: true, - customBuilder: NewCustomBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: CustomBuilderSchema, - Config: []byte(fmt.Sprintf(validTemplateConfig, "cat", path.Join(testDir, "components/custom.yaml"), "catalog.yaml")), - }, - files: map[string]string{ - "components/custom.yaml": customYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.NoError(t, buildErr) - // check if the catalog.yaml file exists in the correct place - filePath := path.Join(dir, "catalog.yaml") - _, err := os.Stat(filePath) - require.NoError(t, err) - file, err := os.Open(filePath) - require.NoError(t, err) - defer file.Close() - fileData, err := io.ReadAll(file) - require.NoError(t, err) - require.Equal(t, string(fileData), customBuiltFbcYaml) - }, - validateAssertions: func(t *testing.T, validateErr error) { - require.NoError(t, validateErr) - }, - }, - { - name: "successful custom build json output", - validate: true, - customBuilder: NewCustomBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "json", - }), - templateDefinition: TemplateDefinition{ - Schema: CustomBuilderSchema, - Config: []byte(fmt.Sprintf(validTemplateConfig, "cat", path.Join(testDir, "components/custom.yaml"), "catalog.json")), - }, - files: map[string]string{ - "components/custom.yaml": customYaml, - }, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.NoError(t, buildErr) - // check if the catalog.yaml file exists in the correct place - filePath := path.Join(dir, "catalog.json") - _, err := os.Stat(filePath) - require.NoError(t, err) - file, err := os.Open(filePath) - require.NoError(t, err) - defer file.Close() - fileData, err := io.ReadAll(file) - require.NoError(t, err) - require.Equal(t, string(fileData), customBuiltFbcJson) - }, - validateAssertions: func(t *testing.T, validateErr error) { - require.NoError(t, validateErr) - }, - }, - { - name: "invalid template configuration", - validate: false, - customBuilder: NewCustomBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: CustomBuilderSchema, - Config: []byte(`{ - "invalid": "components/custom.yaml", - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Contains(t, buildErr.Error(), "unmarshalling custom template config:") - }, - }, - { - name: "invalid schema", - validate: false, - customBuilder: NewCustomBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: "olm.invalid", - Config: []byte(`{ - "input": "components/custom.yaml", - "output": "catalog.yaml" - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Contains(t, buildErr.Error(), fmt.Sprintf("schema %q does not match the custom template builder schema %q", "olm.invalid", CustomBuilderSchema)) - }, - }, - { - name: "template config has empty command", - validate: false, - customBuilder: NewCustomBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: CustomBuilderSchema, - Config: []byte(`{ - "output": "catalog.yaml" - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Equal(t, - "custom template configuration is invalid: custom template config must have a non-empty command (templateDefinition.config.command)", - buildErr.Error(), - ) - }, - }, - { - name: "template config has empty output", - validate: false, - customBuilder: NewCustomBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: CustomBuilderSchema, - Config: []byte(`{ - "command": "ls" - }`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Equal(t, - "custom template configuration is invalid: custom template config must have a non-empty output (templateDefinition.config.output)", - buildErr.Error(), - ) - }, - }, - { - name: "template config has empty command & output", - validate: false, - customBuilder: NewCustomBuilder(BuilderConfig{ - WorkingDir: testDir, - OutputType: "yaml", - }), - templateDefinition: TemplateDefinition{ - Schema: CustomBuilderSchema, - Config: []byte(`{}`), - }, - files: map[string]string{}, - buildAssertions: func(t *testing.T, dir string, buildErr error) { - require.Error(t, buildErr) - require.Equal(t, - "custom template configuration is invalid: custom template config must have a non-empty command (templateDefinition.config.command),custom template config must have a non-empty output (templateDefinition.config.output)", - buildErr.Error(), - ) - }, - }, - } - - for i, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - outDir := fmt.Sprintf("custom-%d", i) - outPath := path.Join(testDir, outDir) - err := os.MkdirAll(outPath, 0o777) - require.NoError(t, err) - - // create files in temp dir - for fileName, fileContents := range tc.files { - err := os.MkdirAll(path.Join(testDir, path.Dir(fileName)), 0o777) - require.NoError(t, err) - file, err := os.Create(path.Join(testDir, fileName)) - require.NoError(t, err) - _, err = file.WriteString(fileContents) - require.NoError(t, err) - } - - cacheDir, err := os.MkdirTemp("", "opm-registry-") - require.NoError(t, err) - - reg, err := containerdregistry.NewRegistry( - containerdregistry.WithCacheDir(cacheDir), - ) - defer reg.Destroy() - require.NoError(t, err) - - buildErr := tc.customBuilder.Build(context.Background(), reg, outDir, tc.templateDefinition) - tc.buildAssertions(t, outPath, buildErr) - - if tc.validate { - validateErr := tc.customBuilder.Validate(context.Background(), outDir) - tc.validateAssertions(t, validateErr) - } - }) - } -} - -const customYaml = `--- -defaultChannel: preview -name: webhook-operator-413 -schema: olm.package ---- -image: quay.io/olmtest/webhook-operator-bundle:0.0.3 -name: webhook-operator.v0.0.1 -package: webhook-operator-413 -properties: -- type: olm.gvk - value: - group: webhook.operators.coreos.io - kind: WebhookTest - version: v1 -- type: olm.gvk - value: - group: webhook.operators.coreos.io - kind: WebhookTest - version: v2 -- type: olm.package - value: - packageName: webhook-operator-413 - version: 0.0.1 -- type: olm.bundle.object - value: - data: eyJhcGlWZXJzaW9uIjoicmJhYy5hdXRob3JpemF0aW9uLms4cy5pby92MWJldGExIiwia2luZCI6IkNsdXN0ZXJSb2xlIiwibWV0YWRhdGEiOnsiY3JlYXRpb25UaW1lc3RhbXAiOm51bGwsIm5hbWUiOiJ3ZWJob29rLW9wZXJhdG9yLW1ldHJpY3MtcmVhZGVyIn0sInJ1bGVzIjpbeyJub25SZXNvdXJjZVVSTHMiOlsiL21ldHJpY3MiXSwidmVyYnMiOlsiZ2V0Il19XX0= -- type: olm.bundle.object - value: - data: eyJhcGlWZXJzaW9uIjoib3BlcmF0b3JzLmNvcmVvcy5jb20vdjFhbHBoYTEiLCJraW5kIjoiQ2x1c3RlclNlcnZpY2VW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lc3QuIEVkaXQgV2ViaG9va1Rlc3RfdHlwZXMuZ28gdG8gcmVtb3ZlL3VwZGF0ZSIsInByb3BlcnRpZXMiOnsibXV0YXRlIjp7ImRlc2NyaXB0aW9uIjoiTXV0YXRlIGlzIGEgZmllbGQgdGhhdCB3aWxsIGJlIHNldCB0byB0cnVlIGJ5IHRoZSBtdXRhdGluZyB3ZWJob29rLiIsInR5cGUiOiJib29sZWFuIn0sInZhbGlkIjp7ImRlc2NyaXB0aW9uIjoiVmFsaWQgbXVzdCBiZSBzZXQgdG8gdHJ1ZSBvciB0aGUgdmFsaWRhdGlvbiB3ZWJob29rIHdpbGwgcmVqZWN0IHRoZSByZXNvdXJjZS4iLCJ0eXBlIjoiYm9vbGVhbiJ9fSwicmVxdWlyZWQiOlsidmFsaWQiXSwidHlwZSI6Im9iamVjdCJ9fSwicmVxdWlyZWQiOlsiY29udmVyc2lvbiJdLCJ0eXBlIjoib2JqZWN0In0sInN0YXR1cyI6eyJkZXNjcmlwdGlvbiI6IldlYmhvb2tUZXN0U3RhdHVzIGRlZmluZXMgdGhlIG9ic2VydmVkIHN0YXRlIG9mIFdlYmhvb2tUZXN0IiwidHlwZSI6Im9iamVjdCJ9fSwidHlwZSI6Im9iamVjdCJ9fSwic2VydmVkIjp0cnVlLCJzdG9yYWdlIjpmYWxzZX1dfSwic3RhdHVzIjp7ImFjY2VwdGVkTmFtZXMiOnsia2luZCI6IiIsInBsdXJhbCI6IiJ9LCJjb25kaXRpb25zIjpbXSwic3RvcmVkVmVyc2lvbnMiOltdfX0= -relatedImages: -- image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 - name: "" -- image: quay.io/olmtest/webhook-operator-bundle:0.0.3 - name: "" -- image: quay.io/olmtest/webhook-operator:0.0.3 - name: "" -schema: olm.bundle ---- -schema: olm.channel -package: webhook-operator-413 -name: preview -entries: - - name: webhook-operator.v0.0.1 -` - -const customBuiltFbcYaml = `--- -defaultChannel: preview -name: webhook-operator-413 -schema: olm.package ---- -entries: -- name: webhook-operator.v0.0.1 -name: preview -package: webhook-operator-413 -schema: olm.channel ---- -image: quay.io/olmtest/webhook-operator-bundle:0.0.3 -name: webhook-operator.v0.0.1 -package: webhook-operator-413 -properties: -- type: olm.gvk - value: - group: webhook.operators.coreos.io - kind: WebhookTest - version: v1 -- type: olm.gvk - value: - group: webhook.operators.coreos.io - kind: WebhookTest - version: v2 -- type: olm.package - value: - packageName: webhook-operator-413 - version: 0.0.1 -- type: olm.bundle.object - value: - data: eyJhcGlWZXJzaW9uIjoicmJhYy5hdXRob3JpemF0aW9uLms4cy5pby92MWJldGExIiwia2luZCI6IkNsdXN0ZXJSb2xlIiwibWV0YWRhdGEiOnsiY3JlYXRpb25UaW1lc3RhbXAiOm51bGwsIm5hbWUiOiJ3ZWJob29rLW9wZXJhdG9yLW1ldHJpY3MtcmVhZGVyIn0sInJ1bGVzIjpbeyJub25SZXNvdXJjZVVSTHMiOlsiL21ldHJpY3MiXSwidmVyYnMiOlsiZ2V0Il19XX0= -- type: olm.bundle.object - value: - data: eyJhcGlWZXJzaW9uIjoib3BlcmF0b3JzLmNvcmVvcy5jb20vdjFhbHBoYTEiLCJraW5kIjoiQ2x1c3RlclNlcnZpY2VWZXJzaW9uIiwibWV0YWRhdGEiOnsiYW5ub3RhdGlvbnMiOnsiYWxtLWV4YW1wbGVzIjoiW1xuICB7XG4gICAgXCJhcGlWZXJzaW9uXCI6IFwid2ViaG9vay5vcGVyYXRvcnMuY29yZW9zLmlvL3YxXCIsXG4gICAgXCJraW5kXCI6IFwiV2ViaG9va1Rlc3RcIixcbiAgICBcIm1ldGFkYXRhXCI6IHtcbiAgICAgIFwibmFtZVwiOiBcIndlYmhvb2t0ZXN0LXNhbXBsZVwiLFxuICAgICAgXCJuYW1lc3BhY2VcIjogXCJ3ZWJob29rLW9wZXJhdG9yLXN5c3RlbVwiXG4gICAgfSxcbiAgICBcInNwZWNcIjoge1xuICAgICAgXCJ2YWxpZFwiOiB0cnVlXG4gICA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lyZWQiOlsidmFsaWQiXSwidHlwZSI6Im9iamVjdCJ9fSwicmVxdWlyZWQiOlsiY29udmVyc2lvbiJdLCJ0eXBlIjoib2JqZWN0In0sInN0YXR1cyI6eyJkZXNjcmlwdGlvbiI6IldlYmhvb2tUZXN0U3RhdHVzIGRlZmluZXMgdGhlIG9ic2VydmVkIHN0YXRlIG9mIFdlYmhvb2tUZXN0IiwidHlwZSI6Im9iamVjdCJ9fSwidHlwZSI6Im9iamVjdCJ9fSwic2VydmVkIjp0cnVlLCJzdG9yYWdlIjpmYWxzZX1dfSwic3RhdHVzIjp7ImFjY2VwdGVkTmFtZXMiOnsia2luZCI6IiIsInBsdXJhbCI6IiJ9LCJjb25kaXRpb25zIjpbXSwic3RvcmVkVmVyc2lvbnMiOltdfX0= -relatedImages: -- image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 - name: "" -- image: quay.io/olmtest/webhook-operator-bundle:0.0.3 - name: "" -- image: quay.io/olmtest/webhook-operator:0.0.3 - name: "" -schema: olm.bundle -` - -const customBuiltFbcJson = `{ - "schema": "olm.package", - "name": "webhook-operator-413", - "defaultChannel": "preview" -} -{ - "schema": "olm.channel", - "name": "preview", - "package": "webhook-operator-413", - "entries": [ - { - "name": "webhook-operator.v0.0.1" - } - ] -} -{ - "schema": "olm.bundle", - "name": "webhook-operator.v0.0.1", - "package": "webhook-operator-413", - "image": "quay.io/olmtest/webhook-operator-bundle:0.0.3", - "properties": [ - { - "type": "olm.gvk", - "value": { - "group": "webhook.operators.coreos.io", - "kind": "WebhookTest", - "version": "v1" - } - }, - { - "type": "olm.gvk", - "value": { - "group": "webhook.operators.coreos.io", - "kind": "WebhookTest", - "version": "v2" - } - }, - { - "type": "olm.package", - "value": { - "packageName": "webhook-operator-413", - "version": "0.0.1" - } - }, - { - "type": "olm.bundle.object", - "value": { - "data": "eyJhcGlWZXJzaW9uIjoicmJhYy5hdXRob3JpemF0aW9uLms4cy5pby92MWJldGExIiwia2luZCI6IkNsdXN0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p7ImFjY2VwdGVkTmFtZXMiOnsia2luZCI6IiIsInBsdXJhbCI6IiJ9LCJjb25kaXRpb25zIjpbXSwic3RvcmVkVmVyc2lvbnMiOltdfX0=" - } - } - ], - "relatedImages": [ - { - "name": "", - "image": "gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0" - }, - { - "name": "", - "image": "quay.io/olmtest/webhook-operator-bundle:0.0.3" - }, - { - "name": "", - "image": "quay.io/olmtest/webhook-operator:0.0.3" - } - ] -} -` - -func TestValidateFailure(t *testing.T) { - err := validate(context.Background(), BuilderConfig{}, "") - require.Error(t, err) - require.Contains(t, err.Error(), "no such file or directory") -} diff --git a/staging/operator-registry/alpha/template/composite/composite.go b/staging/operator-registry/alpha/template/composite/composite.go deleted file mode 100644 index e88daa7b2f..0000000000 --- a/staging/operator-registry/alpha/template/composite/composite.go +++ /dev/null @@ -1,261 +0,0 @@ -package composite - -import ( - "context" - "encoding/json" - "fmt" - "io" - "net/url" - "os" - "path/filepath" - - "github.com/operator-framework/operator-registry/pkg/image" - "k8s.io/apimachinery/pkg/util/yaml" -) - -func WithCatalogFile(catalogFile io.Reader) TemplateOption { - return func(t *Template) { - t.catalogFile = catalogFile - } -} - -func WithContributionFile(contribFile io.Reader, contribPath string) TemplateOption { - return func(t *Template) { - t.contributionFile = contribFile - t.contributionPath = contribPath - } -} - -func WithOutputType(outputType string) TemplateOption { - return func(t *Template) { - t.outputType = outputType - } -} - -func WithRegistry(reg image.Registry) TemplateOption { - return func(t *Template) { - t.registry = reg - } -} - -func WithValidate(validate bool) TemplateOption { - return func(t *Template) { - t.validate = validate - } -} - -func NewTemplate(opts ...TemplateOption) *Template { - temp := &Template{ - // Default registered builders when creating a new Template - registeredBuilders: map[string]builderFunc{ - BasicBuilderSchema: func(bc BuilderConfig) Builder { return NewBasicBuilder(bc) }, - SemverBuilderSchema: func(bc BuilderConfig) Builder { return NewSemverBuilder(bc) }, - RawBuilderSchema: func(bc BuilderConfig) Builder { return NewRawBuilder(bc) }, - CustomBuilderSchema: func(bc BuilderConfig) Builder { return NewCustomBuilder(bc) }, - }, - } - - for _, opt := range opts { - opt(temp) - } - - return temp -} - -// FetchCatalogConfig will fetch the catalog configuration file from the given path. -// The path can be a local file path OR a URL that returns the raw contents of the catalog -// configuration file. -// The filepath can be structured relative or as an absolute path -func FetchCatalogConfig(path string, httpGetter HttpGetter) (io.ReadCloser, error) { - var tempCatalog io.ReadCloser - catalogURI, err := url.ParseRequestURI(path) - // Evalute local catalog config - // URI parse will fail on relative filepaths - // Check if path is an absolute filepath - if err != nil || filepath.IsAbs(path) { - tempCatalog, err = os.Open(path) - if err != nil { - return nil, fmt.Errorf("opening catalog config file %q: %v", path, err) - } - } else { - // Evalute remote catalog config - // If URI is valid, execute fetch - tempResp, err := httpGetter.Get(catalogURI.String()) - if err != nil { - return nil, fmt.Errorf("fetching remote catalog config file %q: %v", path, err) - } - tempCatalog = tempResp.Body - } - - return tempCatalog, nil -} - -func (t *Template) Parse() (*Specs, error) { - var s Specs - - catalogSpec, err := t.parseCatalogsSpec() - if err != nil { - return nil, err - } - s.CatalogSpec = catalogSpec - - contributionSpec, err := t.parseContributionSpec() - if err != nil { - return nil, err - } - s.ContributionSpec = contributionSpec - - return &s, nil -} - -func (t *Template) Render(ctx context.Context, validate bool) error { - specs, err := t.Parse() - if err != nil { - return err - } - - catalogBuilderMap, err := t.newCatalogBuilderMap(specs.CatalogSpec.Catalogs, t.outputType) - if err != nil { - return err - } - - // TODO(everettraven): should we return aggregated errors? - for _, component := range specs.ContributionSpec.Components { - if builderMap, ok := (*catalogBuilderMap)[component.Name]; ok { - if builder, ok := builderMap[component.Strategy.Template.Schema]; ok { - // run the builder corresponding to the schema - err := builder.Build(ctx, t.registry, component.Destination.Path, component.Strategy.Template) - if err != nil { - return fmt.Errorf("building component %q: %w", component.Name, err) - } - - if validate { - // run the validation for the builder - err = builder.Validate(ctx, component.Destination.Path) - if err != nil { - return fmt.Errorf("validating component %q: %w", component.Name, err) - } - } - } else { - return fmt.Errorf("building component %q: no builder found for template schema %q", component.Name, component.Strategy.Template.Schema) - } - } else { - allowedComponents := []string{} - for k := range *catalogBuilderMap { - allowedComponents = append(allowedComponents, k) - } - return fmt.Errorf("building component %q: component does not exist in the catalog configuration. Available components are: %s", component.Name, allowedComponents) - } - } - return nil -} - -func (t *Template) builderForSchema(schema string, builderCfg BuilderConfig) (Builder, error) { - builderFunc, ok := t.registeredBuilders[schema] - if !ok { - return nil, fmt.Errorf("unknown schema %q", schema) - } - - return builderFunc(builderCfg), nil -} - -func (t *Template) parseCatalogsSpec() (*CatalogConfig, error) { - - // get catalog configurations - catalogConfig := &CatalogConfig{} - catalogDoc := json.RawMessage{} - catalogDecoder := yaml.NewYAMLOrJSONDecoder(t.catalogFile, 4096) - err := catalogDecoder.Decode(&catalogDoc) - if err != nil { - return nil, fmt.Errorf("decoding catalog config: %v", err) - } - err = json.Unmarshal(catalogDoc, catalogConfig) - if err != nil { - return nil, fmt.Errorf("unmarshalling catalog config: %v", err) - } - - if catalogConfig.Schema != CatalogSchema { - return nil, fmt.Errorf("catalog configuration file has unknown schema, should be %q", CatalogSchema) - } - - return catalogConfig, nil -} - -func (t *Template) parseContributionSpec() (*CompositeConfig, error) { - - // parse data to composite config - compositeConfig := &CompositeConfig{} - compositeDoc := json.RawMessage{} - compositeDecoder := yaml.NewYAMLOrJSONDecoder(t.contributionFile, 4096) - err := compositeDecoder.Decode(&compositeDoc) - if err != nil { - return nil, fmt.Errorf("decoding composite config: %v", err) - } - err = json.Unmarshal(compositeDoc, compositeConfig) - if err != nil { - return nil, fmt.Errorf("unmarshalling composite config: %v", err) - } - - if compositeConfig.Schema != CompositeSchema { - return nil, fmt.Errorf("composite configuration file has unknown schema, should be %q", CompositeSchema) - } - - return compositeConfig, nil -} - -func (t *Template) newCatalogBuilderMap(catalogs []Catalog, outputType string) (*CatalogBuilderMap, error) { - - catalogBuilderMap := make(CatalogBuilderMap) - - // setup the builders for each catalog - setupFailed := false - setupErrors := map[string][]string{} - for _, catalog := range catalogs { - errs := []string{} - // if catalog.Destination.BaseImage == "" { - // errs = append(errs, "destination.baseImage must not be an empty string") - // } - - if catalog.Destination.WorkingDir == "" { - errs = append(errs, "destination.workingDir must not be an empty string") - } - - // check for validation errors and skip builder creation if there are any errors - if len(errs) > 0 { - setupFailed = true - setupErrors[catalog.Name] = errs - continue - } - - if _, ok := catalogBuilderMap[catalog.Name]; !ok { - builderMap := make(BuilderMap) - for _, schema := range catalog.Builders { - builder, err := t.builderForSchema(schema, BuilderConfig{ - WorkingDir: catalog.Destination.WorkingDir, - OutputType: outputType, - ContributionPath: t.contributionPath, - }) - if err != nil { - return nil, fmt.Errorf("getting builder %q for catalog %q: %v", schema, catalog.Name, err) - } - builderMap[schema] = builder - } - catalogBuilderMap[catalog.Name] = builderMap - } - } - - // if there were errors validating the catalog configuration then exit - if setupFailed { - //build the error message - var errMsg string - for cat, errs := range setupErrors { - errMsg += fmt.Sprintf("\nCatalog %v:\n", cat) - for _, err := range errs { - errMsg += fmt.Sprintf(" - %v\n", err) - } - } - return nil, fmt.Errorf("catalog configuration file field validation failed: %s", errMsg) - } - - return &catalogBuilderMap, nil -} diff --git a/staging/operator-registry/alpha/template/composite/composite_test.go b/staging/operator-registry/alpha/template/composite/composite_test.go deleted file mode 100644 index f46f39446f..0000000000 --- a/staging/operator-registry/alpha/template/composite/composite_test.go +++ /dev/null @@ -1,615 +0,0 @@ -package composite - -import ( - "context" - "fmt" - "io" - "net/http" - "os" - "path" - "strings" - "testing" - - "github.com/operator-framework/operator-registry/pkg/image" - "github.com/stretchr/testify/require" -) - -var _ Builder = &TestBuilder{} - -var TestBuilderSchema = "olm.builder.test" - -type TestBuilder struct { - buildShouldError bool - validateShouldError bool -} - -func (tb *TestBuilder) Build(ctx context.Context, reg image.Registry, dir string, td TemplateDefinition) error { - if tb.buildShouldError { - return fmt.Errorf("build error!") - } - return nil -} - -func (tb *TestBuilder) Validate(ctx context.Context, dir string) error { - if tb.validateShouldError { - return fmt.Errorf("validate error!") - } - return nil -} - -var renderValidCatalog = ` -schema: olm.composite.catalogs -catalogs: - - name: first-catalog - destination: - workingDir: contributions/first-catalog - builders: - - olm.builder.test -` - -var renderValidComposite = ` -schema: olm.composite -components: - - name: first-catalog - destination: - path: my-operator - strategy: - name: test - template: - schema: olm.builder.test - config: - input: components/contribution1.yaml - output: catalog.yaml -` - -var renderInvalidComponentComposite = ` -schema: olm.composite -components: - - name: missing-catalog - destination: - path: my-operator - strategy: - name: test - template: - schema: olm.builder.test - config: - input: components/contribution1.yaml - output: catalog.yaml -` - -var renderInvalidBuilderComposite = ` -schema: olm.composite -components: - - name: first-catalog - destination: - path: my-operator - strategy: - name: test - template: - schema: olm.builder.invalid - config: - input: components/contribution1.yaml - output: catalog.yaml -` - -func TestCompositeRender(t *testing.T) { - type testCase struct { - name string - compositeTemplate Template - validate bool - assertions func(t *testing.T, err error) - } - - testCases := []testCase{ - { - name: "successful render", - validate: true, - compositeTemplate: Template{ - catalogFile: strings.NewReader(renderValidCatalog), - contributionFile: strings.NewReader(renderValidComposite), - registeredBuilders: map[string]builderFunc{ - TestBuilderSchema: func(bc BuilderConfig) Builder { return &TestBuilder{} }, - }, - }, - assertions: func(t *testing.T, err error) { - require.NoError(t, err) - }, - }, - { - name: "Component build failure", - validate: true, - compositeTemplate: Template{ - catalogFile: strings.NewReader(renderValidCatalog), - contributionFile: strings.NewReader(renderValidComposite), - registeredBuilders: map[string]builderFunc{ - TestBuilderSchema: func(bc BuilderConfig) Builder { return &TestBuilder{buildShouldError: true} }, - }, - }, - assertions: func(t *testing.T, err error) { - require.Error(t, err) - require.Equal(t, "building component \"first-catalog\": build error!", err.Error()) - }, - }, - { - name: "Component validate failure", - validate: true, - compositeTemplate: Template{ - catalogFile: strings.NewReader(renderValidCatalog), - contributionFile: strings.NewReader(renderValidComposite), - registeredBuilders: map[string]builderFunc{ - TestBuilderSchema: func(bc BuilderConfig) Builder { return &TestBuilder{validateShouldError: true} }, - }, - }, - assertions: func(t *testing.T, err error) { - require.Error(t, err) - require.Equal(t, "validating component \"first-catalog\": validate error!", err.Error()) - }, - }, - { - name: "Skipping validation", - validate: false, - compositeTemplate: Template{ - catalogFile: strings.NewReader(renderValidCatalog), - contributionFile: strings.NewReader(renderValidComposite), - registeredBuilders: map[string]builderFunc{ - TestBuilderSchema: func(bc BuilderConfig) Builder { return &TestBuilder{validateShouldError: true} }, - }, - }, - assertions: func(t *testing.T, err error) { - // We are skipping validation so we shouldn't receive - // the validation error from the TestBuilder - require.NoError(t, err) - }, - }, - { - name: "component not in catalog config", - validate: true, - compositeTemplate: Template{ - catalogFile: strings.NewReader(renderValidCatalog), - contributionFile: strings.NewReader(renderInvalidComponentComposite), - registeredBuilders: map[string]builderFunc{ - TestBuilderSchema: func(bc BuilderConfig) Builder { return &TestBuilder{} }, - }, - }, - assertions: func(t *testing.T, err error) { - require.Error(t, err) - expectedErr := fmt.Sprintf("building component %q: component does not exist in the catalog configuration. Available components are: %s", "missing-catalog", []string{"first-catalog"}) - require.Equal(t, expectedErr, err.Error()) - }, - }, - { - name: "builder not in catalog config", - validate: true, - compositeTemplate: Template{ - catalogFile: strings.NewReader(renderValidCatalog), - contributionFile: strings.NewReader(renderInvalidBuilderComposite), - registeredBuilders: map[string]builderFunc{ - TestBuilderSchema: func(bc BuilderConfig) Builder { return &TestBuilder{} }, - }, - }, - assertions: func(t *testing.T, err error) { - require.Error(t, err) - require.Equal(t, "building component \"first-catalog\": no builder found for template schema \"olm.builder.invalid\"", err.Error()) - }, - }, - { - name: "error parsing catalog spec", - validate: true, - compositeTemplate: Template{ - catalogFile: strings.NewReader(invalidSchemaCatalog), - }, - assertions: func(t *testing.T, err error) { - require.Error(t, err) - require.Equal(t, "catalog configuration file has unknown schema, should be \"olm.composite.catalogs\"", err.Error()) - }, - }, - { - name: "error parsing contribution spec", - validate: true, - compositeTemplate: Template{ - catalogFile: strings.NewReader(renderValidCatalog), - contributionFile: strings.NewReader(invalidSchemaComposite), - }, - assertions: func(t *testing.T, err error) { - require.Error(t, err) - require.Equal(t, "composite configuration file has unknown schema, should be \"olm.composite\"", err.Error()) - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := tc.compositeTemplate.Render(context.Background(), tc.validate) - tc.assertions(t, err) - }) - } -} - -func TestBuilderForSchema(t *testing.T) { - type testCase struct { - name string - builderSchema string - builderCfg BuilderConfig - assertions func(t *testing.T, builder Builder, err error) - } - - testCases := []testCase{ - { - name: "Basic Builder Schema", - builderSchema: BasicBuilderSchema, - builderCfg: BuilderConfig{}, - assertions: func(t *testing.T, builder Builder, err error) { - require.NoError(t, err) - require.IsType(t, &BasicBuilder{}, builder) - }, - }, - { - name: "Semver Builder Schema", - builderSchema: SemverBuilderSchema, - builderCfg: BuilderConfig{}, - assertions: func(t *testing.T, builder Builder, err error) { - require.NoError(t, err) - require.IsType(t, &SemverBuilder{}, builder) - }, - }, - { - name: "Raw Builder Schema", - builderSchema: RawBuilderSchema, - builderCfg: BuilderConfig{}, - assertions: func(t *testing.T, builder Builder, err error) { - require.NoError(t, err) - require.IsType(t, &RawBuilder{}, builder) - }, - }, - { - name: "Custom Builder Schema", - builderSchema: CustomBuilderSchema, - builderCfg: BuilderConfig{}, - assertions: func(t *testing.T, builder Builder, err error) { - require.NoError(t, err) - require.IsType(t, &CustomBuilder{}, builder) - }, - }, - { - name: "Invalid Builder Schema", - builderSchema: "invalid", - builderCfg: BuilderConfig{}, - assertions: func(t *testing.T, builder Builder, err error) { - require.Error(t, err) - require.Equal(t, fmt.Sprintf("unknown schema %q", "invalid"), err.Error()) - require.Nil(t, builder) - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - template := NewTemplate() - builder, err := template.builderForSchema(tc.builderSchema, tc.builderCfg) - tc.assertions(t, builder, err) - }) - } - -} - -var validCatalog = ` -schema: olm.composite.catalogs -catalogs: - - name: first-catalog - destination: - workingDir: contributions/first-catalog - builders: - - olm.builder.semver - - olm.builder.basic - - name: second-catalog - destination: - workingDir: contributions/second-catalog - builders: - - olm.builder.semver - - name: test-catalog - destination: - workingDir: contributions/test-catalog - builders: - - olm.builder.custom` - -var unmarshalFail = ` -invalid -` - -var invalidSchemaCatalog = ` -schema: invalid -catalogs: - - name: first-catalog - destination: - workingDir: contributions/first-catalog - builders: - - olm.builder.semver - - olm.builder.basic -` - -func TestParseCatalogSpec(t *testing.T) { - type testCase struct { - name string - catalog string - assertions func(t *testing.T, catalog *CatalogConfig, err error) - } - - testCases := []testCase{ - { - name: "Valid catalog configuration", - catalog: validCatalog, - assertions: func(t *testing.T, catalog *CatalogConfig, err error) { - require.NoError(t, err) - require.Equal(t, 3, len(catalog.Catalogs)) - }, - }, - { - name: "Unmarshal failure", - catalog: unmarshalFail, - assertions: func(t *testing.T, catalog *CatalogConfig, err error) { - require.Error(t, err) - require.Equal(t, "unmarshalling catalog config: json: cannot unmarshal string into Go value of type composite.CatalogConfig", err.Error()) - }, - }, - { - name: "Invalid schema", - catalog: invalidSchemaCatalog, - assertions: func(t *testing.T, catalog *CatalogConfig, err error) { - require.Error(t, err) - require.Equal(t, fmt.Sprintf("catalog configuration file has unknown schema, should be %q", CatalogSchema), err.Error()) - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - template := NewTemplate(WithCatalogFile(strings.NewReader(tc.catalog))) - catalog, err := template.parseCatalogsSpec() - tc.assertions(t, catalog, err) - }) - } -} - -var validComposite = ` -schema: olm.composite -components: - - name: first-catalog - destination: - path: my-operator - strategy: - name: semver - template: - schema: olm.builder.semver - config: - input: components/contribution1.yaml - output: catalog.yaml -` - -var invalidSchemaComposite = ` -schema: invalid -components: - - name: first-catalog - destination: - path: my-operator - strategy: - name: semver - template: - schema: olm.builder.semver - config: - input: components/contribution1.yaml - output: catalog.yaml -` - -func TestParseContributionSpec(t *testing.T) { - type testCase struct { - name string - composite string - assertions func(t *testing.T, composite *CompositeConfig, err error) - } - - testCases := []testCase{ - { - name: "Valid composite", - composite: validComposite, - assertions: func(t *testing.T, composite *CompositeConfig, err error) { - require.NoError(t, err) - require.Equal(t, 1, len(composite.Components)) - }, - }, - { - name: "Unmarshal failure", - composite: unmarshalFail, - assertions: func(t *testing.T, composite *CompositeConfig, err error) { - require.Error(t, err) - require.Equal(t, "unmarshalling composite config: json: cannot unmarshal string into Go value of type composite.CompositeConfig", err.Error()) - }, - }, - { - name: "Invalid schema", - composite: invalidSchemaComposite, - assertions: func(t *testing.T, composite *CompositeConfig, err error) { - require.Error(t, err) - require.Equal(t, fmt.Sprintf("composite configuration file has unknown schema, should be %q", CompositeSchema), err.Error()) - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - template := NewTemplate(WithContributionFile(strings.NewReader(tc.composite), "")) - contrib, err := template.parseContributionSpec() - tc.assertions(t, contrib, err) - }) - } -} - -func TestNewCatalogBuilderMap(t *testing.T) { - type testCase struct { - name string - catalogs []Catalog - assertions func(t *testing.T, builderMap *CatalogBuilderMap, err error) - } - - testCases := []testCase{ - { - name: "Valid Catalogs", - catalogs: []Catalog{ - { - Name: "test-catalog", - Destination: CatalogDestination{ - WorkingDir: "/", - // BaseImage: "base", - }, - Builders: []string{ - BasicBuilderSchema, - }, - }, - }, - assertions: func(t *testing.T, builderMap *CatalogBuilderMap, err error) { - require.NoError(t, err) - //TODO: More assertions here - }, - }, - { - name: "Invalid Builder", - catalogs: []Catalog{ - { - Name: "test-catalog", - Destination: CatalogDestination{ - WorkingDir: "/", - // BaseImage: "base", - }, - Builders: []string{ - "invalid", - }, - }, - }, - assertions: func(t *testing.T, builderMap *CatalogBuilderMap, err error) { - require.Error(t, err) - require.Equal(t, "getting builder \"invalid\" for catalog \"test-catalog\": unknown schema \"invalid\"", err.Error()) - }, - }, - // { - // name: "BaseImage+WorkingDir invalid", - // catalogs: []Catalog{ - // { - // Name: "test-catalog", - // Destination: CatalogDestination{}, - // Builders: []string{ - // BasicBuilderSchema, - // }, - // }, - // }, - // assertions: func(t *testing.T, builderMap *CatalogBuilderMap, err error) { - // require.Error(t, err) - // require.Equal(t, "catalog configuration file field validation failed: \nCatalog test-catalog:\n - destination.baseImage must not be an empty string\n - destination.workingDir must not be an empty string\n", err.Error()) - // }, - // }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - template := NewTemplate() - builderMap, err := template.newCatalogBuilderMap(tc.catalogs, "yaml") - tc.assertions(t, builderMap, err) - }) - } -} - -type fakeGetter struct { - catalog string - shouldError bool -} - -func (fg *fakeGetter) Get(url string) (*http.Response, error) { - if fg.shouldError { - return nil, fmt.Errorf("error!") - } - - return &http.Response{ - Body: io.NopCloser(strings.NewReader(fg.catalog)), - }, nil -} - -func TestFetchCatalogConfig(t *testing.T) { - type testCase struct { - name string - fakeGetter *fakeGetter - path string - createFile bool - assertions func(t *testing.T, rc io.ReadCloser, err error) - } - - testDir := t.TempDir() - - testCases := []testCase{ - { - name: "Successful HTTP fetch", - path: "http://some-path.com", - fakeGetter: &fakeGetter{ - catalog: validCatalog, - }, - assertions: func(t *testing.T, rc io.ReadCloser, err error) { - require.NoError(t, err) - require.NotNil(t, rc) - }, - }, - { - name: "Failed HTTP fetch", - path: "http://some-path.com", - fakeGetter: &fakeGetter{ - catalog: validCatalog, - shouldError: true, - }, - assertions: func(t *testing.T, rc io.ReadCloser, err error) { - require.Error(t, err) - require.Equal(t, "fetching remote catalog config file \"http://some-path.com\": error!", err.Error()) - }, - }, - // TODO: for some reason this is triggering the fakeGetter.Get() function instead of using os.Open() - { - name: "Successful file fetch", - path: "file/test.yaml", - fakeGetter: &fakeGetter{ - catalog: validCatalog, - shouldError: true, - }, - createFile: true, - assertions: func(t *testing.T, rc io.ReadCloser, err error) { - require.NoError(t, err) - require.NotNil(t, rc) - }, - }, - { - name: "Failed file fetch", - path: "file/test.yaml", - fakeGetter: &fakeGetter{ - catalog: validCatalog, - }, - createFile: false, - assertions: func(t *testing.T, rc io.ReadCloser, err error) { - require.Error(t, err) - require.Equal(t, "opening catalog config file \"file/test.yaml\": open file/test.yaml: no such file or directory", err.Error()) - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - filepath := tc.path - if tc.createFile { - err := os.MkdirAll(path.Join(testDir, path.Dir(tc.path)), 0o777) - require.NoError(t, err) - file, err := os.Create(path.Join(testDir, tc.path)) - require.NoError(t, err) - _, err = file.WriteString(tc.fakeGetter.catalog) - require.NoError(t, err) - - filepath = path.Join(testDir, tc.path) - } - - rc, err := FetchCatalogConfig(filepath, tc.fakeGetter) - tc.assertions(t, rc, err) - }) - } -} diff --git a/staging/operator-registry/alpha/template/composite/config.go b/staging/operator-registry/alpha/template/composite/config.go deleted file mode 100644 index 21d4ac5ee0..0000000000 --- a/staging/operator-registry/alpha/template/composite/config.go +++ /dev/null @@ -1,42 +0,0 @@ -package composite - -const ( - CompositeSchema = "olm.composite" - CatalogSchema = "olm.composite.catalogs" -) - -type CompositeConfig struct { - Schema string - Components []Component -} - -type Component struct { - Name string - Destination ComponentDestination - Strategy BuildStrategy -} - -type ComponentDestination struct { - Path string -} - -type BuildStrategy struct { - Name string - Template TemplateDefinition -} - -type CatalogConfig struct { - Schema string - Catalogs []Catalog -} - -type Catalog struct { - Name string - Destination CatalogDestination - Builders []string -} - -type CatalogDestination struct { - // BaseImage string - WorkingDir string -} diff --git a/staging/operator-registry/alpha/template/composite/types.go b/staging/operator-registry/alpha/template/composite/types.go deleted file mode 100644 index 32116bea19..0000000000 --- a/staging/operator-registry/alpha/template/composite/types.go +++ /dev/null @@ -1,62 +0,0 @@ -package composite - -import ( - "encoding/json" - "io" - "net/http" - - "github.com/operator-framework/operator-registry/pkg/image" -) - -type TemplateDefinition struct { - Schema string - Config json.RawMessage -} - -type BasicConfig struct { - Input string - Output string -} - -type SemverConfig struct { - Input string - Output string -} - -type RawConfig struct { - Input string - Output string -} - -type CustomConfig struct { - Command string - Args []string - Output string -} - -type BuilderMap map[string]Builder - -type CatalogBuilderMap map[string]BuilderMap - -type builderFunc func(BuilderConfig) Builder - -type Template struct { - catalogFile io.Reader - contributionFile io.Reader - contributionPath string - validate bool - outputType string - registry image.Registry - registeredBuilders map[string]builderFunc -} - -type TemplateOption func(t *Template) - -type Specs struct { - CatalogSpec *CatalogConfig - ContributionSpec *CompositeConfig -} - -type HttpGetter interface { - Get(url string) (*http.Response, error) -} diff --git a/staging/operator-registry/cmd/opm/alpha/template/cmd.go b/staging/operator-registry/cmd/opm/alpha/template/cmd.go index 1c435e6fa2..8a2acefc50 100644 --- a/staging/operator-registry/cmd/opm/alpha/template/cmd.go +++ b/staging/operator-registry/cmd/opm/alpha/template/cmd.go @@ -16,7 +16,6 @@ func NewCmd() *cobra.Command { runCmd.AddCommand(newBasicTemplateCmd()) runCmd.AddCommand(newSemverTemplateCmd()) - runCmd.AddCommand(newCompositeTemplateCmd()) return runCmd } diff --git a/staging/operator-registry/cmd/opm/alpha/template/composite.go b/staging/operator-registry/cmd/opm/alpha/template/composite.go deleted file mode 100644 index 20c9a1e5c1..0000000000 --- a/staging/operator-registry/cmd/opm/alpha/template/composite.go +++ /dev/null @@ -1,83 +0,0 @@ -package template - -import ( - "log" - "net/http" - "os" - "path/filepath" - - "github.com/spf13/cobra" - - "github.com/operator-framework/operator-registry/alpha/template/composite" - "github.com/operator-framework/operator-registry/cmd/opm/internal/util" -) - -func newCompositeTemplateCmd() *cobra.Command { - var ( - output string - validate bool - compositeFile string - catalogFile string - ) - cmd := &cobra.Command{ - Use: "composite", - Short: `Generate file-based catalogs from a catalog configuration file -and a 'composite template' file`, - Long: `Generate file-based catalogs from a catalog configuration file -and a 'composite template' file`, - Args: cobra.MaximumNArgs(0), - Run: func(cmd *cobra.Command, args []string) { - - switch output { - case "yaml": - // do nothing - case "json": - // do nothing - default: - log.Fatalf("invalid --output value %q, expected (json|yaml)", output) - } - - reg, err := util.CreateCLIRegistry(cmd) - if err != nil { - log.Fatalf("creating containerd registry: %v", err) - } - defer reg.Destroy() - - // operator author's 'composite.yaml' file - compositeReader, err := os.Open(compositeFile) - if err != nil { - log.Fatalf("opening composite config file %q: %v", compositeFile, err) - } - defer compositeReader.Close() - - compositePath, err := filepath.Abs(filepath.Dir(compositeFile)) - if err != nil { - log.Fatalf("getting absolute path of composite config file %q: %v", compositeFile, err) - } - - // catalog maintainer's 'catalogs.yaml' file - tempCatalog, err := composite.FetchCatalogConfig(catalogFile, http.DefaultClient) - if err != nil { - log.Fatalf(err.Error()) - } - defer tempCatalog.Close() - - template := composite.NewTemplate( - composite.WithCatalogFile(tempCatalog), - composite.WithContributionFile(compositeReader, compositePath), - composite.WithOutputType(output), - composite.WithRegistry(reg), - ) - - err = template.Render(cmd.Context(), validate) - if err != nil { - log.Fatalf("rendering the composite template: %v", err) - } - }, - } - cmd.Flags().StringVarP(&output, "output", "o", "json", "Output format (json|yaml)") - cmd.Flags().BoolVar(&validate, "validate", true, "whether or not the created FBC should be validated (i.e 'opm validate')") - cmd.Flags().StringVarP(&compositeFile, "composite-config", "c", "composite.yaml", "File to use as the composite configuration file") - cmd.Flags().StringVarP(&catalogFile, "catalog-config", "f", "catalogs.yaml", "File to use as the catalog configuration file") - return cmd -} diff --git a/vendor/github.com/operator-framework/operator-registry/alpha/template/composite/builder.go b/vendor/github.com/operator-framework/operator-registry/alpha/template/composite/builder.go deleted file mode 100644 index e22b5e49c7..0000000000 --- a/vendor/github.com/operator-framework/operator-registry/alpha/template/composite/builder.go +++ /dev/null @@ -1,363 +0,0 @@ -package composite - -import ( - "bytes" - "context" - "fmt" - "io" - "os" - "os/exec" - "path" - "path/filepath" - "strings" - - "sigs.k8s.io/yaml" - - "github.com/operator-framework/operator-registry/alpha/declcfg" - basictemplate "github.com/operator-framework/operator-registry/alpha/template/basic" - semvertemplate "github.com/operator-framework/operator-registry/alpha/template/semver" - "github.com/operator-framework/operator-registry/pkg/image" - "github.com/operator-framework/operator-registry/pkg/lib/config" -) - -const ( - BasicBuilderSchema = "olm.builder.basic" - SemverBuilderSchema = "olm.builder.semver" - RawBuilderSchema = "olm.builder.raw" - CustomBuilderSchema = "olm.builder.custom" -) - -type BuilderConfig struct { - WorkingDir string - OutputType string - ContributionPath string -} - -type Builder interface { - Build(ctx context.Context, reg image.Registry, dir string, td TemplateDefinition) error - Validate(ctx context.Context, dir string) error -} - -type BasicBuilder struct { - builderCfg BuilderConfig -} - -var _ Builder = &BasicBuilder{} - -func NewBasicBuilder(builderCfg BuilderConfig) *BasicBuilder { - return &BasicBuilder{ - builderCfg: builderCfg, - } -} - -func (bb *BasicBuilder) Build(ctx context.Context, reg image.Registry, dir string, td TemplateDefinition) error { - if td.Schema != BasicBuilderSchema { - return fmt.Errorf("schema %q does not match the basic template builder schema %q", td.Schema, BasicBuilderSchema) - } - // Parse out the basic template configuration - basicConfig := &BasicConfig{} - err := yaml.UnmarshalStrict(td.Config, basicConfig) - if err != nil { - return fmt.Errorf("unmarshalling basic template config: %w", err) - } - - // validate the basic config fields - valid := true - validationErrs := []string{} - if basicConfig.Input == "" { - valid = false - validationErrs = append(validationErrs, "basic template config must have a non-empty input (templateDefinition.config.input)") - } - - if basicConfig.Output == "" { - valid = false - validationErrs = append(validationErrs, "basic template config must have a non-empty output (templateDefinition.config.output)") - } - - if !valid { - return fmt.Errorf("basic template configuration is invalid: %s", strings.Join(validationErrs, ",")) - } - - b := basictemplate.Template{Registry: reg} - reader, err := os.Open(basicConfig.Input) - if err != nil { - if os.IsNotExist(err) && bb.builderCfg.ContributionPath != "" { - reader, err = os.Open(path.Join(bb.builderCfg.ContributionPath, basicConfig.Input)) - if err != nil { - return fmt.Errorf("error reading basic template: %v (tried contribution-local path: %q)", err, bb.builderCfg.ContributionPath) - } - } else { - return fmt.Errorf("error reading basic template: %v", err) - } - } - defer reader.Close() - - dcfg, err := b.Render(ctx, reader) - if err != nil { - return fmt.Errorf("error rendering basic template: %v", err) - } - - destPath := path.Join(bb.builderCfg.WorkingDir, dir, basicConfig.Output) - - return build(dcfg, destPath, bb.builderCfg.OutputType) -} - -func (bb *BasicBuilder) Validate(ctx context.Context, dir string) error { - return validate(ctx, bb.builderCfg, dir) -} - -type SemverBuilder struct { - builderCfg BuilderConfig -} - -var _ Builder = &SemverBuilder{} - -func NewSemverBuilder(builderCfg BuilderConfig) *SemverBuilder { - return &SemverBuilder{ - builderCfg: builderCfg, - } -} - -func (sb *SemverBuilder) Build(ctx context.Context, reg image.Registry, dir string, td TemplateDefinition) error { - if td.Schema != SemverBuilderSchema { - return fmt.Errorf("schema %q does not match the semver template builder schema %q", td.Schema, SemverBuilderSchema) - } - // Parse out the semver template configuration - semverConfig := &SemverConfig{} - err := yaml.UnmarshalStrict(td.Config, semverConfig) - if err != nil { - return fmt.Errorf("unmarshalling semver template config: %w", err) - } - - // validate the semver config fields - valid := true - validationErrs := []string{} - if semverConfig.Input == "" { - valid = false - validationErrs = append(validationErrs, "semver template config must have a non-empty input (templateDefinition.config.input)") - } - - if semverConfig.Output == "" { - valid = false - validationErrs = append(validationErrs, "semver template config must have a non-empty output (templateDefinition.config.output)") - } - - if !valid { - return fmt.Errorf("semver template configuration is invalid: %s", strings.Join(validationErrs, ",")) - } - - reader, err := os.Open(semverConfig.Input) - if err != nil { - if os.IsNotExist(err) && sb.builderCfg.ContributionPath != "" { - reader, err = os.Open(path.Join(sb.builderCfg.ContributionPath, semverConfig.Input)) - if err != nil { - return fmt.Errorf("error reading semver template: %v (tried contribution-local path: %q)", err, sb.builderCfg.ContributionPath) - } - } else { - return fmt.Errorf("error reading semver template: %v", err) - } - } - defer reader.Close() - - s := semvertemplate.Template{Registry: reg, Data: reader} - - dcfg, err := s.Render(ctx) - if err != nil { - return fmt.Errorf("error rendering semver template: %v", err) - } - - destPath := path.Join(sb.builderCfg.WorkingDir, dir, semverConfig.Output) - - return build(dcfg, destPath, sb.builderCfg.OutputType) -} - -func (sb *SemverBuilder) Validate(ctx context.Context, dir string) error { - return validate(ctx, sb.builderCfg, dir) -} - -type RawBuilder struct { - builderCfg BuilderConfig -} - -var _ Builder = &RawBuilder{} - -func NewRawBuilder(builderCfg BuilderConfig) *RawBuilder { - return &RawBuilder{ - builderCfg: builderCfg, - } -} - -func (rb *RawBuilder) Build(ctx context.Context, _ image.Registry, dir string, td TemplateDefinition) error { - if td.Schema != RawBuilderSchema { - return fmt.Errorf("schema %q does not match the raw template builder schema %q", td.Schema, RawBuilderSchema) - } - // Parse out the raw template configuration - rawConfig := &RawConfig{} - err := yaml.UnmarshalStrict(td.Config, rawConfig) - if err != nil { - return fmt.Errorf("unmarshalling raw template config: %w", err) - } - - // validate the raw config fields - valid := true - validationErrs := []string{} - if rawConfig.Input == "" { - valid = false - validationErrs = append(validationErrs, "raw template config must have a non-empty input (templateDefinition.config.input)") - } - - if rawConfig.Output == "" { - valid = false - validationErrs = append(validationErrs, "raw template config must have a non-empty output (templateDefinition.config.output)") - } - - if !valid { - return fmt.Errorf("raw template configuration is invalid: %s", strings.Join(validationErrs, ",")) - } - - reader, err := os.Open(rawConfig.Input) - if err != nil { - if os.IsNotExist(err) && rb.builderCfg.ContributionPath != "" { - reader, err = os.Open(path.Join(rb.builderCfg.ContributionPath, rawConfig.Input)) - if err != nil { - return fmt.Errorf("error reading raw input file: %v (tried contribution-local path: %q)", err, rb.builderCfg.ContributionPath) - } - } else { - return fmt.Errorf("error reading raw input file: %v", err) - } - } - defer reader.Close() - - dcfg, err := declcfg.LoadReader(reader) - if err != nil { - return fmt.Errorf("error parsing raw input file: %s, %v", rawConfig.Input, err) - } - - destPath := path.Join(rb.builderCfg.WorkingDir, dir, rawConfig.Output) - - return build(dcfg, destPath, rb.builderCfg.OutputType) -} - -func (rb *RawBuilder) Validate(ctx context.Context, dir string) error { - return validate(ctx, rb.builderCfg, dir) -} - -type CustomBuilder struct { - builderCfg BuilderConfig -} - -var _ Builder = &CustomBuilder{} - -func NewCustomBuilder(builderCfg BuilderConfig) *CustomBuilder { - return &CustomBuilder{ - builderCfg: builderCfg, - } -} - -func (cb *CustomBuilder) Build(ctx context.Context, reg image.Registry, dir string, td TemplateDefinition) error { - if td.Schema != CustomBuilderSchema { - return fmt.Errorf("schema %q does not match the custom template builder schema %q", td.Schema, CustomBuilderSchema) - } - // Parse out the raw template configuration - customConfig := &CustomConfig{} - err := yaml.UnmarshalStrict(td.Config, customConfig) - if err != nil { - return fmt.Errorf("unmarshalling custom template config: %w", err) - } - - // validate the custom config fields - valid := true - validationErrs := []string{} - if customConfig.Command == "" { - valid = false - validationErrs = append(validationErrs, "custom template config must have a non-empty command (templateDefinition.config.command)") - } - - if customConfig.Output == "" { - valid = false - validationErrs = append(validationErrs, "custom template config must have a non-empty output (templateDefinition.config.output)") - } - - if !valid { - return fmt.Errorf("custom template configuration is invalid: %s", strings.Join(validationErrs, ",")) - } - // build the command to execute - cmd := exec.Command(customConfig.Command, customConfig.Args...) - - // custom template should output a valid FBC to STDOUT so we can - // build the FBC just like all the other templates. - v, err := cmd.Output() - if err != nil { - return fmt.Errorf("running command %q: %v: %v", cmd.String(), err, v) - } - - reader := bytes.NewReader(v) - - dcfg, err := declcfg.LoadReader(reader) - cmdString := []string{customConfig.Command} - cmdString = append(cmdString, customConfig.Args...) - if err != nil { - return fmt.Errorf("error parsing custom command output: %s, %v", strings.Join(cmdString, "'"), err) - } - - destPath := path.Join(cb.builderCfg.WorkingDir, dir, customConfig.Output) - - // custom template should output a valid FBC to STDOUT so we can - // build the FBC just like all the other templates. - return build(dcfg, destPath, cb.builderCfg.OutputType) -} - -func (cb *CustomBuilder) Validate(ctx context.Context, dir string) error { - return validate(ctx, cb.builderCfg, dir) -} - -func writeDeclCfg(dcfg declcfg.DeclarativeConfig, w io.Writer, output string) error { - switch output { - case "yaml": - return declcfg.WriteYAML(dcfg, w) - case "json": - return declcfg.WriteJSON(dcfg, w) - default: - return fmt.Errorf("invalid --output value %q, expected (json|yaml)", output) - } -} - -func validate(ctx context.Context, builderCfg BuilderConfig, dir string) error { - - path := path.Join(builderCfg.WorkingDir, dir) - s, err := os.Stat(path) - if err != nil { - return fmt.Errorf("directory not found. validation path needs to be composed of BuilderConfig.WorkingDir+Component[].Destination.Path: %q: %v", path, err) - } - if !s.IsDir() { - return fmt.Errorf("%q is not a directory", path) - } - - if err := config.Validate(ctx, os.DirFS(path)); err != nil { - return fmt.Errorf("validation failure in path %q: %v", path, err) - } - return nil -} - -func build(dcfg *declcfg.DeclarativeConfig, outPath string, outType string) error { - // create the destination for output, if it does not exist - outDir := filepath.Dir(outPath) - err := os.MkdirAll(outDir, 0o777) - if err != nil { - return fmt.Errorf("creating output directory %q: %v", outPath, err) - } - - // write the dcfg - file, err := os.Create(outPath) - if err != nil { - return fmt.Errorf("creating output file %q: %v", outPath, err) - } - defer file.Close() - - err = writeDeclCfg(*dcfg, file, outType) - if err != nil { - return fmt.Errorf("writing to output file %q: %v", outPath, err) - } - - return nil -} diff --git a/vendor/github.com/operator-framework/operator-registry/alpha/template/composite/composite.go b/vendor/github.com/operator-framework/operator-registry/alpha/template/composite/composite.go deleted file mode 100644 index e88daa7b2f..0000000000 --- a/vendor/github.com/operator-framework/operator-registry/alpha/template/composite/composite.go +++ /dev/null @@ -1,261 +0,0 @@ -package composite - -import ( - "context" - "encoding/json" - "fmt" - "io" - "net/url" - "os" - "path/filepath" - - "github.com/operator-framework/operator-registry/pkg/image" - "k8s.io/apimachinery/pkg/util/yaml" -) - -func WithCatalogFile(catalogFile io.Reader) TemplateOption { - return func(t *Template) { - t.catalogFile = catalogFile - } -} - -func WithContributionFile(contribFile io.Reader, contribPath string) TemplateOption { - return func(t *Template) { - t.contributionFile = contribFile - t.contributionPath = contribPath - } -} - -func WithOutputType(outputType string) TemplateOption { - return func(t *Template) { - t.outputType = outputType - } -} - -func WithRegistry(reg image.Registry) TemplateOption { - return func(t *Template) { - t.registry = reg - } -} - -func WithValidate(validate bool) TemplateOption { - return func(t *Template) { - t.validate = validate - } -} - -func NewTemplate(opts ...TemplateOption) *Template { - temp := &Template{ - // Default registered builders when creating a new Template - registeredBuilders: map[string]builderFunc{ - BasicBuilderSchema: func(bc BuilderConfig) Builder { return NewBasicBuilder(bc) }, - SemverBuilderSchema: func(bc BuilderConfig) Builder { return NewSemverBuilder(bc) }, - RawBuilderSchema: func(bc BuilderConfig) Builder { return NewRawBuilder(bc) }, - CustomBuilderSchema: func(bc BuilderConfig) Builder { return NewCustomBuilder(bc) }, - }, - } - - for _, opt := range opts { - opt(temp) - } - - return temp -} - -// FetchCatalogConfig will fetch the catalog configuration file from the given path. -// The path can be a local file path OR a URL that returns the raw contents of the catalog -// configuration file. -// The filepath can be structured relative or as an absolute path -func FetchCatalogConfig(path string, httpGetter HttpGetter) (io.ReadCloser, error) { - var tempCatalog io.ReadCloser - catalogURI, err := url.ParseRequestURI(path) - // Evalute local catalog config - // URI parse will fail on relative filepaths - // Check if path is an absolute filepath - if err != nil || filepath.IsAbs(path) { - tempCatalog, err = os.Open(path) - if err != nil { - return nil, fmt.Errorf("opening catalog config file %q: %v", path, err) - } - } else { - // Evalute remote catalog config - // If URI is valid, execute fetch - tempResp, err := httpGetter.Get(catalogURI.String()) - if err != nil { - return nil, fmt.Errorf("fetching remote catalog config file %q: %v", path, err) - } - tempCatalog = tempResp.Body - } - - return tempCatalog, nil -} - -func (t *Template) Parse() (*Specs, error) { - var s Specs - - catalogSpec, err := t.parseCatalogsSpec() - if err != nil { - return nil, err - } - s.CatalogSpec = catalogSpec - - contributionSpec, err := t.parseContributionSpec() - if err != nil { - return nil, err - } - s.ContributionSpec = contributionSpec - - return &s, nil -} - -func (t *Template) Render(ctx context.Context, validate bool) error { - specs, err := t.Parse() - if err != nil { - return err - } - - catalogBuilderMap, err := t.newCatalogBuilderMap(specs.CatalogSpec.Catalogs, t.outputType) - if err != nil { - return err - } - - // TODO(everettraven): should we return aggregated errors? - for _, component := range specs.ContributionSpec.Components { - if builderMap, ok := (*catalogBuilderMap)[component.Name]; ok { - if builder, ok := builderMap[component.Strategy.Template.Schema]; ok { - // run the builder corresponding to the schema - err := builder.Build(ctx, t.registry, component.Destination.Path, component.Strategy.Template) - if err != nil { - return fmt.Errorf("building component %q: %w", component.Name, err) - } - - if validate { - // run the validation for the builder - err = builder.Validate(ctx, component.Destination.Path) - if err != nil { - return fmt.Errorf("validating component %q: %w", component.Name, err) - } - } - } else { - return fmt.Errorf("building component %q: no builder found for template schema %q", component.Name, component.Strategy.Template.Schema) - } - } else { - allowedComponents := []string{} - for k := range *catalogBuilderMap { - allowedComponents = append(allowedComponents, k) - } - return fmt.Errorf("building component %q: component does not exist in the catalog configuration. Available components are: %s", component.Name, allowedComponents) - } - } - return nil -} - -func (t *Template) builderForSchema(schema string, builderCfg BuilderConfig) (Builder, error) { - builderFunc, ok := t.registeredBuilders[schema] - if !ok { - return nil, fmt.Errorf("unknown schema %q", schema) - } - - return builderFunc(builderCfg), nil -} - -func (t *Template) parseCatalogsSpec() (*CatalogConfig, error) { - - // get catalog configurations - catalogConfig := &CatalogConfig{} - catalogDoc := json.RawMessage{} - catalogDecoder := yaml.NewYAMLOrJSONDecoder(t.catalogFile, 4096) - err := catalogDecoder.Decode(&catalogDoc) - if err != nil { - return nil, fmt.Errorf("decoding catalog config: %v", err) - } - err = json.Unmarshal(catalogDoc, catalogConfig) - if err != nil { - return nil, fmt.Errorf("unmarshalling catalog config: %v", err) - } - - if catalogConfig.Schema != CatalogSchema { - return nil, fmt.Errorf("catalog configuration file has unknown schema, should be %q", CatalogSchema) - } - - return catalogConfig, nil -} - -func (t *Template) parseContributionSpec() (*CompositeConfig, error) { - - // parse data to composite config - compositeConfig := &CompositeConfig{} - compositeDoc := json.RawMessage{} - compositeDecoder := yaml.NewYAMLOrJSONDecoder(t.contributionFile, 4096) - err := compositeDecoder.Decode(&compositeDoc) - if err != nil { - return nil, fmt.Errorf("decoding composite config: %v", err) - } - err = json.Unmarshal(compositeDoc, compositeConfig) - if err != nil { - return nil, fmt.Errorf("unmarshalling composite config: %v", err) - } - - if compositeConfig.Schema != CompositeSchema { - return nil, fmt.Errorf("composite configuration file has unknown schema, should be %q", CompositeSchema) - } - - return compositeConfig, nil -} - -func (t *Template) newCatalogBuilderMap(catalogs []Catalog, outputType string) (*CatalogBuilderMap, error) { - - catalogBuilderMap := make(CatalogBuilderMap) - - // setup the builders for each catalog - setupFailed := false - setupErrors := map[string][]string{} - for _, catalog := range catalogs { - errs := []string{} - // if catalog.Destination.BaseImage == "" { - // errs = append(errs, "destination.baseImage must not be an empty string") - // } - - if catalog.Destination.WorkingDir == "" { - errs = append(errs, "destination.workingDir must not be an empty string") - } - - // check for validation errors and skip builder creation if there are any errors - if len(errs) > 0 { - setupFailed = true - setupErrors[catalog.Name] = errs - continue - } - - if _, ok := catalogBuilderMap[catalog.Name]; !ok { - builderMap := make(BuilderMap) - for _, schema := range catalog.Builders { - builder, err := t.builderForSchema(schema, BuilderConfig{ - WorkingDir: catalog.Destination.WorkingDir, - OutputType: outputType, - ContributionPath: t.contributionPath, - }) - if err != nil { - return nil, fmt.Errorf("getting builder %q for catalog %q: %v", schema, catalog.Name, err) - } - builderMap[schema] = builder - } - catalogBuilderMap[catalog.Name] = builderMap - } - } - - // if there were errors validating the catalog configuration then exit - if setupFailed { - //build the error message - var errMsg string - for cat, errs := range setupErrors { - errMsg += fmt.Sprintf("\nCatalog %v:\n", cat) - for _, err := range errs { - errMsg += fmt.Sprintf(" - %v\n", err) - } - } - return nil, fmt.Errorf("catalog configuration file field validation failed: %s", errMsg) - } - - return &catalogBuilderMap, nil -} diff --git a/vendor/github.com/operator-framework/operator-registry/alpha/template/composite/config.go b/vendor/github.com/operator-framework/operator-registry/alpha/template/composite/config.go deleted file mode 100644 index 21d4ac5ee0..0000000000 --- a/vendor/github.com/operator-framework/operator-registry/alpha/template/composite/config.go +++ /dev/null @@ -1,42 +0,0 @@ -package composite - -const ( - CompositeSchema = "olm.composite" - CatalogSchema = "olm.composite.catalogs" -) - -type CompositeConfig struct { - Schema string - Components []Component -} - -type Component struct { - Name string - Destination ComponentDestination - Strategy BuildStrategy -} - -type ComponentDestination struct { - Path string -} - -type BuildStrategy struct { - Name string - Template TemplateDefinition -} - -type CatalogConfig struct { - Schema string - Catalogs []Catalog -} - -type Catalog struct { - Name string - Destination CatalogDestination - Builders []string -} - -type CatalogDestination struct { - // BaseImage string - WorkingDir string -} diff --git a/vendor/github.com/operator-framework/operator-registry/alpha/template/composite/types.go b/vendor/github.com/operator-framework/operator-registry/alpha/template/composite/types.go deleted file mode 100644 index 32116bea19..0000000000 --- a/vendor/github.com/operator-framework/operator-registry/alpha/template/composite/types.go +++ /dev/null @@ -1,62 +0,0 @@ -package composite - -import ( - "encoding/json" - "io" - "net/http" - - "github.com/operator-framework/operator-registry/pkg/image" -) - -type TemplateDefinition struct { - Schema string - Config json.RawMessage -} - -type BasicConfig struct { - Input string - Output string -} - -type SemverConfig struct { - Input string - Output string -} - -type RawConfig struct { - Input string - Output string -} - -type CustomConfig struct { - Command string - Args []string - Output string -} - -type BuilderMap map[string]Builder - -type CatalogBuilderMap map[string]BuilderMap - -type builderFunc func(BuilderConfig) Builder - -type Template struct { - catalogFile io.Reader - contributionFile io.Reader - contributionPath string - validate bool - outputType string - registry image.Registry - registeredBuilders map[string]builderFunc -} - -type TemplateOption func(t *Template) - -type Specs struct { - CatalogSpec *CatalogConfig - ContributionSpec *CompositeConfig -} - -type HttpGetter interface { - Get(url string) (*http.Response, error) -} diff --git a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/cmd.go b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/cmd.go index 1c435e6fa2..8a2acefc50 100644 --- a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/cmd.go +++ b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/cmd.go @@ -16,7 +16,6 @@ func NewCmd() *cobra.Command { runCmd.AddCommand(newBasicTemplateCmd()) runCmd.AddCommand(newSemverTemplateCmd()) - runCmd.AddCommand(newCompositeTemplateCmd()) return runCmd } diff --git a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/composite.go b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/composite.go deleted file mode 100644 index 20c9a1e5c1..0000000000 --- a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/composite.go +++ /dev/null @@ -1,83 +0,0 @@ -package template - -import ( - "log" - "net/http" - "os" - "path/filepath" - - "github.com/spf13/cobra" - - "github.com/operator-framework/operator-registry/alpha/template/composite" - "github.com/operator-framework/operator-registry/cmd/opm/internal/util" -) - -func newCompositeTemplateCmd() *cobra.Command { - var ( - output string - validate bool - compositeFile string - catalogFile string - ) - cmd := &cobra.Command{ - Use: "composite", - Short: `Generate file-based catalogs from a catalog configuration file -and a 'composite template' file`, - Long: `Generate file-based catalogs from a catalog configuration file -and a 'composite template' file`, - Args: cobra.MaximumNArgs(0), - Run: func(cmd *cobra.Command, args []string) { - - switch output { - case "yaml": - // do nothing - case "json": - // do nothing - default: - log.Fatalf("invalid --output value %q, expected (json|yaml)", output) - } - - reg, err := util.CreateCLIRegistry(cmd) - if err != nil { - log.Fatalf("creating containerd registry: %v", err) - } - defer reg.Destroy() - - // operator author's 'composite.yaml' file - compositeReader, err := os.Open(compositeFile) - if err != nil { - log.Fatalf("opening composite config file %q: %v", compositeFile, err) - } - defer compositeReader.Close() - - compositePath, err := filepath.Abs(filepath.Dir(compositeFile)) - if err != nil { - log.Fatalf("getting absolute path of composite config file %q: %v", compositeFile, err) - } - - // catalog maintainer's 'catalogs.yaml' file - tempCatalog, err := composite.FetchCatalogConfig(catalogFile, http.DefaultClient) - if err != nil { - log.Fatalf(err.Error()) - } - defer tempCatalog.Close() - - template := composite.NewTemplate( - composite.WithCatalogFile(tempCatalog), - composite.WithContributionFile(compositeReader, compositePath), - composite.WithOutputType(output), - composite.WithRegistry(reg), - ) - - err = template.Render(cmd.Context(), validate) - if err != nil { - log.Fatalf("rendering the composite template: %v", err) - } - }, - } - cmd.Flags().StringVarP(&output, "output", "o", "json", "Output format (json|yaml)") - cmd.Flags().BoolVar(&validate, "validate", true, "whether or not the created FBC should be validated (i.e 'opm validate')") - cmd.Flags().StringVarP(&compositeFile, "composite-config", "c", "composite.yaml", "File to use as the composite configuration file") - cmd.Flags().StringVarP(&catalogFile, "catalog-config", "f", "catalogs.yaml", "File to use as the catalog configuration file") - return cmd -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 5f3374a00d..099b8a277b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -831,7 +831,6 @@ github.com/operator-framework/operator-registry/alpha/declcfg github.com/operator-framework/operator-registry/alpha/model github.com/operator-framework/operator-registry/alpha/property github.com/operator-framework/operator-registry/alpha/template/basic -github.com/operator-framework/operator-registry/alpha/template/composite github.com/operator-framework/operator-registry/alpha/template/semver github.com/operator-framework/operator-registry/cmd/configmap-server github.com/operator-framework/operator-registry/cmd/initializer From 39dae176eac0cc2b971c276b5dc5196ff9510078 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:17:24 +0200 Subject: [PATCH 18/29] Bump google.golang.org/protobuf from 1.34.1 to 1.34.2 (#1353) Bumps google.golang.org/protobuf from 1.34.1 to 1.34.2. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: cf44ac55e0645c012a63696dcba7fdb6f7189ad0 --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 506c230470..6c226b0c71 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -44,7 +44,7 @@ require ( golang.org/x/text v0.16.0 google.golang.org/grpc v1.64.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 - google.golang.org/protobuf v1.34.1 + google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.30.1 k8s.io/apiextensions-apiserver v0.30.1 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 81071f6149..7ac8cc2c7f 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -541,8 +541,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From 0ef42c490c035718bde2ed69ad85729e452455fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:17:53 +0200 Subject: [PATCH 19/29] Bump github.com/grpc-ecosystem/grpc-health-probe from 0.4.26 to 0.4.29 (#1352) Bumps [github.com/grpc-ecosystem/grpc-health-probe](https://github.com/grpc-ecosystem/grpc-health-probe) from 0.4.26 to 0.4.29. - [Release notes](https://github.com/grpc-ecosystem/grpc-health-probe/releases) - [Changelog](https://github.com/grpc-ecosystem/grpc-health-probe/blob/master/.goreleaser.yml) - [Commits](https://github.com/grpc-ecosystem/grpc-health-probe/compare/v0.4.26...v0.4.29) --- updated-dependencies: - dependency-name: github.com/grpc-ecosystem/grpc-health-probe dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: 7393a820c33fb7c976277f3f36f6c891c3d4c765 --- go.mod | 2 +- go.sum | 4 ++-- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- .../grpc-ecosystem/grpc-health-probe/Dockerfile | 2 +- .../grpc-ecosystem/grpc-health-probe/README.md | 11 +++++------ .../grpc-ecosystem/grpc-health-probe/renovate.json | 6 ++++++ vendor/modules.txt | 2 +- 8 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 vendor/github.com/grpc-ecosystem/grpc-health-probe/renovate.json diff --git a/go.mod b/go.mod index e28ff0e129..9f9bf3cb5c 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/go-logr/logr v1.4.2 github.com/golang/mock v1.6.0 github.com/googleapis/gnostic v0.5.5 - github.com/grpc-ecosystem/grpc-health-probe v0.4.26 + github.com/grpc-ecosystem/grpc-health-probe v0.4.29 github.com/maxbrunsfeld/counterfeiter/v6 v6.8.1 github.com/mikefarah/yq/v3 v3.0.0-20201202084205-8846255d1c37 github.com/onsi/ginkgo/v2 v2.19.0 diff --git a/go.sum b/go.sum index defcccb433..db5cd1249b 100644 --- a/go.sum +++ b/go.sum @@ -1815,8 +1815,8 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/grpc-ecosystem/grpc-health-probe v0.4.26 h1:HamwpC3NdDPSdvECJa9SOdMcWkI0J0pARbHM2jxIBCA= -github.com/grpc-ecosystem/grpc-health-probe v0.4.26/go.mod h1:kqvL5gTsMFB7YwNY64NiaJFDYRZdYhfv2Weg5zCS06o= +github.com/grpc-ecosystem/grpc-health-probe v0.4.29 h1:/nSXyZXiiOKWBO1C2YHh1PnSdlph3VZ9wIJ52T/qheY= +github.com/grpc-ecosystem/grpc-health-probe v0.4.29/go.mod h1:Dd3NNxqiDvq9ecjdOxXpMqajduTZsvvXfbPgptkGQIE= github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c h1:fEE5/5VNnYUoBOj2I9TP8Jc+a7lge3QWn9DKE7NCwfc= diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 6c226b0c71..561c17043e 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/google/go-cmp v0.6.0 - github.com/grpc-ecosystem/grpc-health-probe v0.4.26 + github.com/grpc-ecosystem/grpc-health-probe v0.4.29 github.com/h2non/filetype v1.1.3 github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c github.com/joelanford/ignore v0.1.0 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 7ac8cc2c7f..36683a3548 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -201,8 +201,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/grpc-ecosystem/grpc-health-probe v0.4.26 h1:HamwpC3NdDPSdvECJa9SOdMcWkI0J0pARbHM2jxIBCA= -github.com/grpc-ecosystem/grpc-health-probe v0.4.26/go.mod h1:kqvL5gTsMFB7YwNY64NiaJFDYRZdYhfv2Weg5zCS06o= +github.com/grpc-ecosystem/grpc-health-probe v0.4.29 h1:/nSXyZXiiOKWBO1C2YHh1PnSdlph3VZ9wIJ52T/qheY= +github.com/grpc-ecosystem/grpc-health-probe v0.4.29/go.mod h1:Dd3NNxqiDvq9ecjdOxXpMqajduTZsvvXfbPgptkGQIE= github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c h1:fEE5/5VNnYUoBOj2I9TP8Jc+a7lge3QWn9DKE7NCwfc= diff --git a/vendor/github.com/grpc-ecosystem/grpc-health-probe/Dockerfile b/vendor/github.com/grpc-ecosystem/grpc-health-probe/Dockerfile index 303dd9965c..d3c5811f20 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-health-probe/Dockerfile +++ b/vendor/github.com/grpc-ecosystem/grpc-health-probe/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20 AS build +FROM golang:1.22 AS build ENV PROJECT grpc_health_probe WORKDIR /src/$PROJECT COPY go.mod go.sum ./ diff --git a/vendor/github.com/grpc-ecosystem/grpc-health-probe/README.md b/vendor/github.com/grpc-ecosystem/grpc-health-probe/README.md index dcb72cbf64..33cd294e06 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-health-probe/README.md +++ b/vendor/github.com/grpc-ecosystem/grpc-health-probe/README.md @@ -9,9 +9,8 @@ expose service their status through the [gRPC Health Checking Protocol][hc]. `grpc_health_probe` is meant to be used for health checking gRPC applications in [Kubernetes][k8s], using the [exec probes][execprobe]. -> :warning: [**Kubernetes v1.23 has now introduced built-in gRPC health checking**][k8s-new] -> capability as an alpha feature. As a result, you might no longer need to use this tool and use the -> native Kubernetes feature instead. +> :warning: [**Kubernetes has now built-in gRPC health checking**][k8s-new] +> capability as generally available. As a result, you might no longer need to use this tool and can use the native Kubernetes feature instead. > > This tool can still be useful if you are on older versions of Kubernetes, > or using advanced configuration (such as custom metadata, TLS or finer timeout tuning), @@ -68,9 +67,9 @@ implementation details. This eliminates the need for you to implement the ## Example: gRPC health checking on Kubernetes -Kubernetes does not natively support gRPC health checking since it does not -favor one RPC framework over another. Similarly, HTTP health probes Kubernetes -has is not sufficient to craft a valid gRPC request. As a solution, +Kubernetes now supports [gRPC health checking][k8s]. If your cluster is running a version that supports gRPC health checking, you can define a gRPC liveness probe in your Pod specification. For more information on how to define a gRPC liveness probe in Kubernetes, see the [Kubernetes documentation][k8s-new]. + +However, if your Kubernetes version does not support gRPC health checking or if you want to use some advanced features that Kubernetes does not support, you can use `grpc_health_probe` to health-check your gRPC server. As a solution, `grpc_health_probe` [can be used for Kubernetes][k8s] to health-check gRPC servers running in the Pod. diff --git a/vendor/github.com/grpc-ecosystem/grpc-health-probe/renovate.json b/vendor/github.com/grpc-ecosystem/grpc-health-probe/renovate.json new file mode 100644 index 0000000000..5db72dd6a9 --- /dev/null +++ b/vendor/github.com/grpc-ecosystem/grpc-health-probe/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ] +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 099b8a277b..c2fa51fdea 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -507,7 +507,7 @@ github.com/grpc-ecosystem/go-grpc-prometheus github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule github.com/grpc-ecosystem/grpc-gateway/v2/runtime github.com/grpc-ecosystem/grpc-gateway/v2/utilities -# github.com/grpc-ecosystem/grpc-health-probe v0.4.26 +# github.com/grpc-ecosystem/grpc-health-probe v0.4.29 ## explicit; go 1.22 github.com/grpc-ecosystem/grpc-health-probe # github.com/h2non/filetype v1.1.3 From 6acf8fa978af7b247282729afc4dc83e0875cdf0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:28:06 +0200 Subject: [PATCH 20/29] Bump k8s.io/apiextensions-apiserver from 0.30.1 to 0.30.2 (#1355) Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.30.1 to 0.30.2. - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.30.1...v0.30.2) --- updated-dependencies: - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: a19e95d6eba0e8f437f2d7bc1a08a55d67428921 --- staging/operator-registry/go.mod | 12 ++++++------ staging/operator-registry/go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 561c17043e..eba66eaafd 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -46,10 +46,10 @@ require ( google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.30.1 - k8s.io/apiextensions-apiserver v0.30.1 - k8s.io/apimachinery v0.30.1 - k8s.io/client-go v0.30.1 + k8s.io/api v0.30.2 + k8s.io/apiextensions-apiserver v0.30.2 + k8s.io/apimachinery v0.30.2 + k8s.io/client-go v0.30.2 k8s.io/kubectl v0.30.0 sigs.k8s.io/controller-runtime v0.18.4 sigs.k8s.io/kind v0.23.0 @@ -182,9 +182,9 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiserver v0.30.1 // indirect + k8s.io/apiserver v0.30.2 // indirect k8s.io/cli-runtime v0.30.0 // indirect - k8s.io/component-base v0.30.1 // indirect + k8s.io/component-base v0.30.2 // indirect k8s.io/klog/v2 v2.120.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 36683a3548..83f7ce780b 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -563,20 +563,20 @@ gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.30.1 h1:kCm/6mADMdbAxmIh0LBjS54nQBE+U4KmbCfIkF5CpJY= -k8s.io/api v0.30.1/go.mod h1:ddbN2C0+0DIiPntan/bye3SW3PdwLa11/0yqwvuRrJM= -k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws= -k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4= -k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U= -k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/apiserver v0.30.1 h1:BEWEe8bzS12nMtDKXzCF5Q5ovp6LjjYkSp8qOPk8LZ8= -k8s.io/apiserver v0.30.1/go.mod h1:i87ZnQ+/PGAmSbD/iEKM68bm1D5reX8fO4Ito4B01mo= +k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI= +k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI= +k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE= +k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw= +k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg= +k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/apiserver v0.30.2 h1:ACouHiYl1yFI2VFI3YGM+lvxgy6ir4yK2oLOsLI1/tw= +k8s.io/apiserver v0.30.2/go.mod h1:BOTdFBIch9Sv0ypSEcUR6ew/NUFGocRFNl72Ra7wTm8= k8s.io/cli-runtime v0.30.0 h1:0vn6/XhOvn1RJ2KJOC6IRR2CGqrpT6QQF4+8pYpWQ48= k8s.io/cli-runtime v0.30.0/go.mod h1:vATpDMATVTMA79sZ0YUCzlMelf6rUjoBzlp+RnoM+cg= -k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q= -k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc= -k8s.io/component-base v0.30.1 h1:bvAtlPh1UrdaZL20D9+sWxsJljMi0QZ3Lmw+kmZAaxQ= -k8s.io/component-base v0.30.1/go.mod h1:e/X9kDiOebwlI41AvBHuWdqFriSRrX50CdwA9TFaHLI= +k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50= +k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs= +k8s.io/component-base v0.30.2 h1:pqGBczYoW1sno8q9ObExUqrYSKhtE5rW3y6gX88GZII= +k8s.io/component-base v0.30.2/go.mod h1:yQLkQDrkK8J6NtP+MGJOws+/PPeEXNpwFixsUI7h/OE= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= From cb64f6e681e48cbcaf4dd64060cf424467a828cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:31:28 +0200 Subject: [PATCH 21/29] Bump github.com/operator-framework/api from 0.25.0 to 0.26.0 (#1358) Bumps [github.com/operator-framework/api](https://github.com/operator-framework/api) from 0.25.0 to 0.26.0. - [Release notes](https://github.com/operator-framework/api/releases) - [Changelog](https://github.com/operator-framework/api/blob/master/RELEASE.md) - [Commits](https://github.com/operator-framework/api/compare/v0.25.0...v0.26.0) --- updated-dependencies: - dependency-name: github.com/operator-framework/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: 997fec6c2bc79baf4e67f49fca3b49de8e555071 --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index eba66eaafd..d0b610b3fe 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -27,7 +27,7 @@ require ( github.com/onsi/gomega v1.33.1 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.0 - github.com/operator-framework/api v0.25.0 + github.com/operator-framework/api v0.26.0 github.com/otiai10/copy v1.14.0 github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 github.com/pkg/errors v0.9.1 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 83f7ce780b..cce903828e 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -291,8 +291,8 @@ github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQ github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/operator-framework/api v0.25.0 h1:pSQwFSoPmZaTIERadawxtCwicehLkC7i9n3w3+70SVI= -github.com/operator-framework/api v0.25.0/go.mod h1:PvyCQb0x53ytIqdTECH5e+iqv+am3uZ0qGsZWmL35gQ= +github.com/operator-framework/api v0.26.0 h1:YVntU2NkVl5zSLLwK5kFcH6P3oSvN9QDgTsY9mb4yUM= +github.com/operator-framework/api v0.26.0/go.mod h1:3IxOwzVUeGxYlzfwKCcfCyS+q3EEhWA/4kv7UehbeyM= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= From df7500ae24467916729dc8687d77e4500690be32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 08:53:19 +0200 Subject: [PATCH 22/29] Bump github.com/spf13/cobra from 1.8.0 to 1.8.1 (#1359) Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: 69e2e462df3523750eba6509d01d62a02225711e --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index d0b610b3fe..9b3d598cbe 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -32,7 +32,7 @@ require ( github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 - github.com/spf13/cobra v1.8.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 github.com/tidwall/btree v1.7.0 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index cce903828e..6273b7b2c4 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -72,7 +72,7 @@ github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -342,8 +342,8 @@ github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4Qn github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spiffe/go-spiffe/v2 v2.2.0 h1:9Vf06UsvsDbLYK/zJ4sYsIsHmMFknUD+feA7IYoWMQY= From a397f90d99ef7c5a644f1c60d51113745b28c269 Mon Sep 17 00:00:00 2001 From: Mikalai Radchuk <509198+m1kola@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:04:59 +0200 Subject: [PATCH 23/29] Fix codecov-action params (#1361) * `functionalities` param is no longer exist. It was used to enable file fixes to ignore common lines from coverage. This feature is now seems to be on by default. * Adding `disable_search` because we do not need for the codecov action to search for coverage files: we explicitly provide files. Signed-off-by: Mikalai Radchuk Upstream-repository: operator-registry Upstream-commit: 6bddca80b927fd1c3bb393932c74c7690099ba03 --- staging/operator-registry/.github/workflows/unit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/operator-registry/.github/workflows/unit.yaml b/staging/operator-registry/.github/workflows/unit.yaml index 1c6bb9ac31..dcb9d0c957 100644 --- a/staging/operator-registry/.github/workflows/unit.yaml +++ b/staging/operator-registry/.github/workflows/unit.yaml @@ -22,6 +22,6 @@ jobs: - run: sed -i'' "s:^github.com/$GITHUB_REPOSITORY/::" coverage.out - uses: codecov/codecov-action@v4 with: + disable_search: true files: coverage.out - functionalities: fixes token: ${{ secrets.CODECOV_TOKEN }} From 94f4bcbf49b6f9d91f17651cb05ad1205183b63b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:00:13 +0200 Subject: [PATCH 24/29] Bump github.com/containers/image/v5 from 5.31.0 to 5.31.1 (#1363) Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.31.0 to 5.31.1. - [Release notes](https://github.com/containers/image/releases) - [Commits](https://github.com/containers/image/compare/v5.31.0...v5.31.1) --- updated-dependencies: - dependency-name: github.com/containers/image/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: ea4e736decd951d0778867785cb495d882d94526 --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 9b3d598cbe..91644b9132 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -9,7 +9,7 @@ require ( github.com/blang/semver/v4 v4.0.0 github.com/containerd/containerd v1.7.18 github.com/containers/common v0.59.1 - github.com/containers/image/v5 v5.31.0 + github.com/containers/image/v5 v5.31.1 github.com/distribution/distribution/v3 v3.0.0-alpha.1 github.com/distribution/reference v0.6.0 github.com/docker/cli v26.1.4+incompatible diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 6273b7b2c4..51b614463d 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -60,8 +60,8 @@ github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9Fqctt github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= github.com/containers/common v0.59.1 h1:7VkmJN3YvD0jLFwaUjLHSRJ98JLffydiyOJjYr0dUTo= github.com/containers/common v0.59.1/go.mod h1:53VicJCZ2AD0O+Br7VVoyrS7viXF4YmwlTIocWUT8XE= -github.com/containers/image/v5 v5.31.0 h1:eDFVlz5XaYICxe9dXpf23htEKvyosgkl62mJlIATXE4= -github.com/containers/image/v5 v5.31.0/go.mod h1:5QfOqSackPkSbF7Qxc1DnVNnPJKQ+KWLkfEfDpK590Q= +github.com/containers/image/v5 v5.31.1 h1:3x9soI6Biml/GiDLpkSmKrkRSwVGctxu/vONpoUdklA= +github.com/containers/image/v5 v5.31.1/go.mod h1:5QfOqSackPkSbF7Qxc1DnVNnPJKQ+KWLkfEfDpK590Q= github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA= github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY= github.com/containers/ocicrypt v1.1.10 h1:r7UR6o8+lyhkEywetubUUgcKFjOWOaWz8cEBrCPX0ic= From 23518bb4d01c4a9077fc320f544829a8df811572 Mon Sep 17 00:00:00 2001 From: Jordan Keister Date: Mon, 24 Jun 2024 14:26:09 -0500 Subject: [PATCH 25/29] generate binary-less dockerfiles (#1338) * generate binary-less dockerfiles Signed-off-by: Jordan Keister * two-flag approach (with cleanup of old dockerfile) Signed-off-by: Jordan Keister --------- Signed-off-by: Jordan Keister Upstream-repository: operator-registry Upstream-commit: 4c106e2a5b563cf314d23dc63352592a8de53c89 --- .../alpha/action/generate_dockerfile.go | 38 +++-- .../alpha/action/generate_dockerfile_test.go | 139 ++++++++++++++++-- .../operator-registry/cmd/opm/generate/cmd.go | 41 ++++-- staging/operator-registry/ohio.Dockerfile | 6 - .../alpha/action/generate_dockerfile.go | 38 +++-- .../operator-registry/cmd/opm/generate/cmd.go | 41 ++++-- 6 files changed, 239 insertions(+), 64 deletions(-) delete mode 100644 staging/operator-registry/ohio.Dockerfile diff --git a/staging/operator-registry/alpha/action/generate_dockerfile.go b/staging/operator-registry/alpha/action/generate_dockerfile.go index 4d2a3ddfc7..fc3a8ff1ee 100644 --- a/staging/operator-registry/alpha/action/generate_dockerfile.go +++ b/staging/operator-registry/alpha/action/generate_dockerfile.go @@ -9,10 +9,11 @@ import ( ) type GenerateDockerfile struct { - BaseImage string - IndexDir string - ExtraLabels map[string]string - Writer io.Writer + BaseImage string + BuilderImage string + IndexDir string + ExtraLabels map[string]string + Writer io.Writer } func (i GenerateDockerfile) Run() error { @@ -39,19 +40,36 @@ func (i GenerateDockerfile) validate() error { return nil } -const dockerfileTmpl = `# The base image is expected to contain -# /bin/opm (with a serve subcommand) and /bin/grpc_health_probe +const dockerfileTmpl = `# The builder image is expected to contain +# /bin/opm (with serve subcommand) +FROM {{.BuilderImage}} as builder + +# Copy FBC root into image at /configs and pre-populate serve cache +ADD {{.IndexDir}} /configs +RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"] + FROM {{.BaseImage}} +{{- if ne .BaseImage "scratch" }} +# The base image is expected to contain +# /bin/opm (with serve subcommand) and /bin/grpc_health_probe + # Configure the entrypoint and command ENTRYPOINT ["/bin/opm"] CMD ["serve", "/configs", "--cache-dir=/tmp/cache"] +{{- else }} +# OLMv0 CatalogSources that use binary-less images must set: +# spec: +# grpcPodConfig: +# extractContent: +# catalogDir: /configs +# cacheDir: /tmp/cache +{{- end }} -# Copy declarative config root into image at /configs and pre-populate serve cache -ADD {{.IndexDir}} /configs -RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"] +COPY --from=builder /configs /configs +COPY --from=builder /tmp/cache /tmp/cache -# Set DC-specific label for the location of the DC root directory +# Set FBC-specific label for the location of the FBC root directory # in the image LABEL ` + containertools.ConfigsLocationLabel + `=/configs {{- if .ExtraLabels }} diff --git a/staging/operator-registry/alpha/action/generate_dockerfile_test.go b/staging/operator-registry/alpha/action/generate_dockerfile_test.go index d5a76516c1..0f94aa3451 100644 --- a/staging/operator-registry/alpha/action/generate_dockerfile_test.go +++ b/staging/operator-registry/alpha/action/generate_dockerfile_test.go @@ -41,22 +41,30 @@ func TestGenerateDockerfile(t *testing.T) { { name: "Success/WithoutExtraLabels", gen: GenerateDockerfile{ - BaseImage: "foo", - IndexDir: "bar", + BuilderImage: "foo", + BaseImage: "foo", + IndexDir: "bar", }, - expectedDockerfile: `# The base image is expected to contain -# /bin/opm (with a serve subcommand) and /bin/grpc_health_probe + expectedDockerfile: `# The builder image is expected to contain +# /bin/opm (with serve subcommand) +FROM foo as builder + +# Copy FBC root into image at /configs and pre-populate serve cache +ADD bar /configs +RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"] + FROM foo +# The base image is expected to contain +# /bin/opm (with serve subcommand) and /bin/grpc_health_probe # Configure the entrypoint and command ENTRYPOINT ["/bin/opm"] CMD ["serve", "/configs", "--cache-dir=/tmp/cache"] -# Copy declarative config root into image at /configs and pre-populate serve cache -ADD bar /configs -RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"] +COPY --from=builder /configs /configs +COPY --from=builder /tmp/cache /tmp/cache -# Set DC-specific label for the location of the DC root directory +# Set FBC-specific label for the location of the FBC root directory # in the image LABEL operators.operatorframework.io.index.configs.v1=/configs `, @@ -64,26 +72,129 @@ LABEL operators.operatorframework.io.index.configs.v1=/configs { name: "Success/WithExtraLabels", gen: GenerateDockerfile{ - BaseImage: "foo", - IndexDir: "bar", + BuilderImage: "foo", + BaseImage: "foo", + IndexDir: "bar", ExtraLabels: map[string]string{ "key1": "value1", "key2": "value2", }, }, - expectedDockerfile: `# The base image is expected to contain -# /bin/opm (with a serve subcommand) and /bin/grpc_health_probe + expectedDockerfile: `# The builder image is expected to contain +# /bin/opm (with serve subcommand) +FROM foo as builder + +# Copy FBC root into image at /configs and pre-populate serve cache +ADD bar /configs +RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"] + FROM foo +# The base image is expected to contain +# /bin/opm (with serve subcommand) and /bin/grpc_health_probe # Configure the entrypoint and command ENTRYPOINT ["/bin/opm"] CMD ["serve", "/configs", "--cache-dir=/tmp/cache"] -# Copy declarative config root into image at /configs and pre-populate serve cache +COPY --from=builder /configs /configs +COPY --from=builder /tmp/cache /tmp/cache + +# Set FBC-specific label for the location of the FBC root directory +# in the image +LABEL operators.operatorframework.io.index.configs.v1=/configs + +# Set other custom labels +LABEL "key1"="value1" +LABEL "key2"="value2" +`, + }, + + { + name: "Scratch/Fail/EmptyBaseImage", + gen: GenerateDockerfile{ + BuilderImage: "foo", + IndexDir: "bar", + ExtraLabels: map[string]string{ + "key1": "value1", + "key2": "value2", + }, + }, + expectedErr: "base image is unset", + }, + { + name: "Scratch/Fail/EmptyFromDir", + gen: GenerateDockerfile{ + BuilderImage: "foo", + BaseImage: "scratch", + ExtraLabels: map[string]string{ + "key1": "value1", + "key2": "value2", + }, + }, + expectedErr: "index directory is unset", + }, + { + name: "Scratch/Success/WithoutExtraLabels", + gen: GenerateDockerfile{ + BuilderImage: "foo", + BaseImage: "scratch", + IndexDir: "bar", + }, + expectedDockerfile: `# The builder image is expected to contain +# /bin/opm (with serve subcommand) +FROM foo as builder + +# Copy FBC root into image at /configs and pre-populate serve cache ADD bar /configs RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"] -# Set DC-specific label for the location of the DC root directory +FROM scratch +# OLMv0 CatalogSources that use binary-less images must set: +# spec: +# grpcPodConfig: +# extractContent: +# catalogDir: /configs +# cacheDir: /tmp/cache + +COPY --from=builder /configs /configs +COPY --from=builder /tmp/cache /tmp/cache + +# Set FBC-specific label for the location of the FBC root directory +# in the image +LABEL operators.operatorframework.io.index.configs.v1=/configs +`, + }, + { + name: "Scratch/Success/WithExtraLabels", + gen: GenerateDockerfile{ + BuilderImage: "foo", + BaseImage: "scratch", + IndexDir: "bar", + ExtraLabels: map[string]string{ + "key1": "value1", + "key2": "value2", + }, + }, + expectedDockerfile: `# The builder image is expected to contain +# /bin/opm (with serve subcommand) +FROM foo as builder + +# Copy FBC root into image at /configs and pre-populate serve cache +ADD bar /configs +RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"] + +FROM scratch +# OLMv0 CatalogSources that use binary-less images must set: +# spec: +# grpcPodConfig: +# extractContent: +# catalogDir: /configs +# cacheDir: /tmp/cache + +COPY --from=builder /configs /configs +COPY --from=builder /tmp/cache /tmp/cache + +# Set FBC-specific label for the location of the FBC root directory # in the image LABEL operators.operatorframework.io.index.configs.v1=/configs diff --git a/staging/operator-registry/cmd/opm/generate/cmd.go b/staging/operator-registry/cmd/opm/generate/cmd.go index 7871a7f52f..0bf5b6c9bb 100644 --- a/staging/operator-registry/cmd/opm/generate/cmd.go +++ b/staging/operator-registry/cmd/opm/generate/cmd.go @@ -17,7 +17,7 @@ import ( func NewCmd() *cobra.Command { cmd := &cobra.Command{ Use: "generate", - Short: "Generate various artifacts for declarative config indexes", + Short: "Generate various artifacts for file-based catalogs", } cmd.AddCommand( newDockerfileCmd(), @@ -28,24 +28,36 @@ func NewCmd() *cobra.Command { func newDockerfileCmd() *cobra.Command { var ( baseImage string + builderImage string extraLabelStrs []string ) cmd := &cobra.Command{ - Use: "dockerfile ", + Use: "dockerfile ", Args: cobra.ExactArgs(1), - Short: "Generate a Dockerfile for a declarative config index", - Long: `Generate a Dockerfile for a declarative config index. + Short: "Generate a Dockerfile for a file-based catalog", + Long: `Generate a Dockerfile for a file-based catalog. -This command creates a Dockerfile in the same directory as the -(named .Dockerfile) that can be used to build the index. If a +This command creates a Dockerfile in the same directory as the +(named .Dockerfile) that can be used to build the index. If a Dockerfile with the same name already exists, this command will fail. When specifying extra labels, note that if duplicate keys exist, only the last value of each duplicate key will be added to the generated Dockerfile. + +A separate builder and base image can be specified. The builder image may not be "scratch". `, - RunE: func(_ *cobra.Command, args []string) error { + RunE: func(inCmd *cobra.Command, args []string) error { fromDir := filepath.Clean(args[0]) + if builderImage == "scratch" { + return fmt.Errorf("invalid builder image: %q", builderImage) + } + + // preserving old behavior, if binary-image is set but not builder-image, set builder-image to binary-image + if inCmd.Flags().Changed("binary-image") && !inCmd.Flags().Changed("builder-image") { + builderImage = baseImage + } + extraLabels, err := parseLabels(extraLabelStrs) if err != nil { return err @@ -71,10 +83,11 @@ value of each duplicate key will be added to the generated Dockerfile. defer f.Close() gen := action.GenerateDockerfile{ - BaseImage: baseImage, - IndexDir: indexName, - ExtraLabels: extraLabels, - Writer: f, + BaseImage: baseImage, + BuilderImage: builderImage, + IndexDir: indexName, + ExtraLabels: extraLabels, + Writer: f, } if err := gen.Run(); err != nil { log.Fatal(err) @@ -82,8 +95,12 @@ value of each duplicate key will be added to the generated Dockerfile. return nil }, } - cmd.Flags().StringVarP(&baseImage, "binary-image", "i", containertools.DefaultBinarySourceImage, "Image in which to build catalog.") + cmd.Flags().StringVar(&baseImage, "binary-image", containertools.DefaultBinarySourceImage, "Image in which to build catalog.") + cmd.Flags().StringVarP(&baseImage, "base-image", "i", containertools.DefaultBinarySourceImage, "Image base to use to build catalog.") + cmd.Flags().StringVarP(&builderImage, "builder-image", "b", containertools.DefaultBinarySourceImage, "Image to use as a build stage.") cmd.Flags().StringSliceVarP(&extraLabelStrs, "extra-labels", "l", []string{}, "Extra labels to include in the generated Dockerfile. Labels should be of the form 'key=value'.") + cmd.Flags().MarkDeprecated("binary-image", "use --base-image instead") + cmd.MarkFlagsMutuallyExclusive("binary-image", "base-image") return cmd } diff --git a/staging/operator-registry/ohio.Dockerfile b/staging/operator-registry/ohio.Dockerfile deleted file mode 100644 index 9c8680fc89..0000000000 --- a/staging/operator-registry/ohio.Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM quay.io/operatorhubio/catalog:latest - -COPY opm /bin/opm - -ENTRYPOINT ["/bin/opm"] -CMD ["serve", "/configs", "--cache-dir=/tmp/cache"] diff --git a/vendor/github.com/operator-framework/operator-registry/alpha/action/generate_dockerfile.go b/vendor/github.com/operator-framework/operator-registry/alpha/action/generate_dockerfile.go index 4d2a3ddfc7..fc3a8ff1ee 100644 --- a/vendor/github.com/operator-framework/operator-registry/alpha/action/generate_dockerfile.go +++ b/vendor/github.com/operator-framework/operator-registry/alpha/action/generate_dockerfile.go @@ -9,10 +9,11 @@ import ( ) type GenerateDockerfile struct { - BaseImage string - IndexDir string - ExtraLabels map[string]string - Writer io.Writer + BaseImage string + BuilderImage string + IndexDir string + ExtraLabels map[string]string + Writer io.Writer } func (i GenerateDockerfile) Run() error { @@ -39,19 +40,36 @@ func (i GenerateDockerfile) validate() error { return nil } -const dockerfileTmpl = `# The base image is expected to contain -# /bin/opm (with a serve subcommand) and /bin/grpc_health_probe +const dockerfileTmpl = `# The builder image is expected to contain +# /bin/opm (with serve subcommand) +FROM {{.BuilderImage}} as builder + +# Copy FBC root into image at /configs and pre-populate serve cache +ADD {{.IndexDir}} /configs +RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"] + FROM {{.BaseImage}} +{{- if ne .BaseImage "scratch" }} +# The base image is expected to contain +# /bin/opm (with serve subcommand) and /bin/grpc_health_probe + # Configure the entrypoint and command ENTRYPOINT ["/bin/opm"] CMD ["serve", "/configs", "--cache-dir=/tmp/cache"] +{{- else }} +# OLMv0 CatalogSources that use binary-less images must set: +# spec: +# grpcPodConfig: +# extractContent: +# catalogDir: /configs +# cacheDir: /tmp/cache +{{- end }} -# Copy declarative config root into image at /configs and pre-populate serve cache -ADD {{.IndexDir}} /configs -RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"] +COPY --from=builder /configs /configs +COPY --from=builder /tmp/cache /tmp/cache -# Set DC-specific label for the location of the DC root directory +# Set FBC-specific label for the location of the FBC root directory # in the image LABEL ` + containertools.ConfigsLocationLabel + `=/configs {{- if .ExtraLabels }} diff --git a/vendor/github.com/operator-framework/operator-registry/cmd/opm/generate/cmd.go b/vendor/github.com/operator-framework/operator-registry/cmd/opm/generate/cmd.go index 7871a7f52f..0bf5b6c9bb 100644 --- a/vendor/github.com/operator-framework/operator-registry/cmd/opm/generate/cmd.go +++ b/vendor/github.com/operator-framework/operator-registry/cmd/opm/generate/cmd.go @@ -17,7 +17,7 @@ import ( func NewCmd() *cobra.Command { cmd := &cobra.Command{ Use: "generate", - Short: "Generate various artifacts for declarative config indexes", + Short: "Generate various artifacts for file-based catalogs", } cmd.AddCommand( newDockerfileCmd(), @@ -28,24 +28,36 @@ func NewCmd() *cobra.Command { func newDockerfileCmd() *cobra.Command { var ( baseImage string + builderImage string extraLabelStrs []string ) cmd := &cobra.Command{ - Use: "dockerfile ", + Use: "dockerfile ", Args: cobra.ExactArgs(1), - Short: "Generate a Dockerfile for a declarative config index", - Long: `Generate a Dockerfile for a declarative config index. + Short: "Generate a Dockerfile for a file-based catalog", + Long: `Generate a Dockerfile for a file-based catalog. -This command creates a Dockerfile in the same directory as the -(named .Dockerfile) that can be used to build the index. If a +This command creates a Dockerfile in the same directory as the +(named .Dockerfile) that can be used to build the index. If a Dockerfile with the same name already exists, this command will fail. When specifying extra labels, note that if duplicate keys exist, only the last value of each duplicate key will be added to the generated Dockerfile. + +A separate builder and base image can be specified. The builder image may not be "scratch". `, - RunE: func(_ *cobra.Command, args []string) error { + RunE: func(inCmd *cobra.Command, args []string) error { fromDir := filepath.Clean(args[0]) + if builderImage == "scratch" { + return fmt.Errorf("invalid builder image: %q", builderImage) + } + + // preserving old behavior, if binary-image is set but not builder-image, set builder-image to binary-image + if inCmd.Flags().Changed("binary-image") && !inCmd.Flags().Changed("builder-image") { + builderImage = baseImage + } + extraLabels, err := parseLabels(extraLabelStrs) if err != nil { return err @@ -71,10 +83,11 @@ value of each duplicate key will be added to the generated Dockerfile. defer f.Close() gen := action.GenerateDockerfile{ - BaseImage: baseImage, - IndexDir: indexName, - ExtraLabels: extraLabels, - Writer: f, + BaseImage: baseImage, + BuilderImage: builderImage, + IndexDir: indexName, + ExtraLabels: extraLabels, + Writer: f, } if err := gen.Run(); err != nil { log.Fatal(err) @@ -82,8 +95,12 @@ value of each duplicate key will be added to the generated Dockerfile. return nil }, } - cmd.Flags().StringVarP(&baseImage, "binary-image", "i", containertools.DefaultBinarySourceImage, "Image in which to build catalog.") + cmd.Flags().StringVar(&baseImage, "binary-image", containertools.DefaultBinarySourceImage, "Image in which to build catalog.") + cmd.Flags().StringVarP(&baseImage, "base-image", "i", containertools.DefaultBinarySourceImage, "Image base to use to build catalog.") + cmd.Flags().StringVarP(&builderImage, "builder-image", "b", containertools.DefaultBinarySourceImage, "Image to use as a build stage.") cmd.Flags().StringSliceVarP(&extraLabelStrs, "extra-labels", "l", []string{}, "Extra labels to include in the generated Dockerfile. Labels should be of the form 'key=value'.") + cmd.Flags().MarkDeprecated("binary-image", "use --base-image instead") + cmd.MarkFlagsMutuallyExclusive("binary-image", "base-image") return cmd } From abaac0a2d4fbd6406a42da44d54db4a6d41d7bd0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 14:24:14 +0200 Subject: [PATCH 26/29] Bump github.com/docker/cli (#1365) Bumps [github.com/docker/cli](https://github.com/docker/cli) from 26.1.4+incompatible to 27.0.1+incompatible. - [Commits](https://github.com/docker/cli/compare/v26.1.4...v27.0.1) --- updated-dependencies: - dependency-name: github.com/docker/cli dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: e046dde2b9a82371494e054fc68758834f1482dd --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 91644b9132..80e8718988 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -12,7 +12,7 @@ require ( github.com/containers/image/v5 v5.31.1 github.com/distribution/distribution/v3 v3.0.0-alpha.1 github.com/distribution/reference v0.6.0 - github.com/docker/cli v26.1.4+incompatible + github.com/docker/cli v27.0.1+incompatible github.com/golang-migrate/migrate/v4 v4.17.1 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 51b614463d..0ca5869739 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -85,8 +85,8 @@ github.com/distribution/distribution/v3 v3.0.0-alpha.1 h1:jn7I1gvjOvmLztH1+1cLiU github.com/distribution/distribution/v3 v3.0.0-alpha.1/go.mod h1:LCp4JZp1ZalYg0W/TN05jarCQu+h4w7xc7ZfQF4Y/cY= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v26.1.4+incompatible h1:I8PHdc0MtxEADqYJZvhBrW9bo8gawKwwenxRM7/rLu8= -github.com/docker/cli v26.1.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v27.0.1+incompatible h1:d/OrlblkOTkhJ1IaAGD1bLgUBtFQC/oP0VjkFMIN+B0= +github.com/docker/cli v27.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v26.1.3+incompatible h1:lLCzRbrVZrljpVNobJu1J2FHk8V0s4BawoZippkc+xo= From e64f24e27c7adbaeb00a4e5dab4897d4bbd8d784 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 08:09:30 +0200 Subject: [PATCH 27/29] Bump github.com/docker/cli (#1366) Bumps [github.com/docker/cli](https://github.com/docker/cli) from 27.0.1+incompatible to 27.0.2+incompatible. - [Commits](https://github.com/docker/cli/compare/v27.0.1...v27.0.2) --- updated-dependencies: - dependency-name: github.com/docker/cli dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Upstream-repository: operator-registry Upstream-commit: 965f08582e15bdcb2968f71673d61128d84ecb44 --- staging/operator-registry/go.mod | 2 +- staging/operator-registry/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/staging/operator-registry/go.mod b/staging/operator-registry/go.mod index 80e8718988..280fac9eb6 100644 --- a/staging/operator-registry/go.mod +++ b/staging/operator-registry/go.mod @@ -12,7 +12,7 @@ require ( github.com/containers/image/v5 v5.31.1 github.com/distribution/distribution/v3 v3.0.0-alpha.1 github.com/distribution/reference v0.6.0 - github.com/docker/cli v27.0.1+incompatible + github.com/docker/cli v27.0.2+incompatible github.com/golang-migrate/migrate/v4 v4.17.1 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 diff --git a/staging/operator-registry/go.sum b/staging/operator-registry/go.sum index 0ca5869739..9b4e8697b0 100644 --- a/staging/operator-registry/go.sum +++ b/staging/operator-registry/go.sum @@ -85,8 +85,8 @@ github.com/distribution/distribution/v3 v3.0.0-alpha.1 h1:jn7I1gvjOvmLztH1+1cLiU github.com/distribution/distribution/v3 v3.0.0-alpha.1/go.mod h1:LCp4JZp1ZalYg0W/TN05jarCQu+h4w7xc7ZfQF4Y/cY= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v27.0.1+incompatible h1:d/OrlblkOTkhJ1IaAGD1bLgUBtFQC/oP0VjkFMIN+B0= -github.com/docker/cli v27.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v27.0.2+incompatible h1:IgWU3lWqAYNibtcxgl/PY4TB0eCmK1ZpNUZVJfenDQs= +github.com/docker/cli v27.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v26.1.3+incompatible h1:lLCzRbrVZrljpVNobJu1J2FHk8V0s4BawoZippkc+xo= From 369dfdbc1bdde363a6451154f505917c26bc76b1 Mon Sep 17 00:00:00 2001 From: Jordan Keister Date: Thu, 27 Jun 2024 13:47:55 -0500 Subject: [PATCH 28/29] provide required schema for basic template and fbc conversion (#1335) Upstream-repository: operator-registry Upstream-commit: dff7915e80b476bf817e25e8101455716e6352be --- .../alpha/declcfg/declcfg.go | 4 +- .../operator-registry/alpha/declcfg/load.go | 11 +++ .../alpha/template/basic/basic.go | 72 ++++++++++++++++++- .../alpha/template/converter/converter.go | 39 ++++++++++ .../operator-registry/cmd/opm/alpha/cmd.go | 2 + .../cmd/opm/alpha/convert-template/convert.go | 64 +++++++++++++++++ .../cmd/opm/alpha/template/basic.go | 8 ++- .../cmd/opm/alpha/template/cmd.go | 24 +++---- .../cmd/opm/alpha/template/semver.go | 8 ++- .../cmd/opm/internal/util/util.go | 9 +++ .../alpha/declcfg/declcfg.go | 4 +- .../operator-registry/alpha/declcfg/load.go | 11 +++ .../alpha/template/basic/basic.go | 72 ++++++++++++++++++- .../alpha/template/converter/converter.go | 39 ++++++++++ .../operator-registry/cmd/opm/alpha/cmd.go | 2 + .../cmd/opm/alpha/convert-template/convert.go | 64 +++++++++++++++++ .../cmd/opm/alpha/template/basic.go | 8 ++- .../cmd/opm/alpha/template/cmd.go | 24 +++---- .../cmd/opm/alpha/template/semver.go | 8 ++- .../cmd/opm/internal/util/util.go | 9 +++ vendor/modules.txt | 2 + 21 files changed, 438 insertions(+), 46 deletions(-) create mode 100644 staging/operator-registry/alpha/template/converter/converter.go create mode 100644 staging/operator-registry/cmd/opm/alpha/convert-template/convert.go create mode 100644 vendor/github.com/operator-framework/operator-registry/alpha/template/converter/converter.go create mode 100644 vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/convert-template/convert.go diff --git a/staging/operator-registry/alpha/declcfg/declcfg.go b/staging/operator-registry/alpha/declcfg/declcfg.go index 3474814be5..7797baa499 100644 --- a/staging/operator-registry/alpha/declcfg/declcfg.go +++ b/staging/operator-registry/alpha/declcfg/declcfg.go @@ -70,8 +70,8 @@ type ChannelEntry struct { // evaluation in bundlesEqual(). type Bundle struct { Schema string `json:"schema"` - Name string `json:"name"` - Package string `json:"package"` + Name string `json:"name,omitempty"` + Package string `json:"package,omitempty"` Image string `json:"image"` Properties []property.Property `json:"properties,omitempty" hash:"set"` RelatedImages []RelatedImage `json:"relatedImages,omitempty" hash:"set"` diff --git a/staging/operator-registry/alpha/declcfg/load.go b/staging/operator-registry/alpha/declcfg/load.go index 8717299a6a..f811b31453 100644 --- a/staging/operator-registry/alpha/declcfg/load.go +++ b/staging/operator-registry/alpha/declcfg/load.go @@ -259,6 +259,17 @@ func LoadFile(root fs.FS, path string) (*DeclarativeConfig, error) { return cfg, nil } +// LoadSlice will compose declarative config components from a slice of Meta objects +func LoadSlice(metas []*Meta) (*DeclarativeConfig, error) { + builder := fbcBuilder{} + for _, meta := range metas { + if err := builder.addMeta(meta); err != nil { + return nil, err + } + } + return &builder.cfg, nil +} + type fbcBuilder struct { cfg DeclarativeConfig diff --git a/staging/operator-registry/alpha/template/basic/basic.go b/staging/operator-registry/alpha/template/basic/basic.go index 18566fbcf2..73a6327e93 100644 --- a/staging/operator-registry/alpha/template/basic/basic.go +++ b/staging/operator-registry/alpha/template/basic/basic.go @@ -2,25 +2,58 @@ package basic import ( "context" + "encoding/json" "fmt" "io" "github.com/operator-framework/operator-registry/alpha/action" "github.com/operator-framework/operator-registry/alpha/declcfg" "github.com/operator-framework/operator-registry/pkg/image" + "k8s.io/apimachinery/pkg/util/yaml" ) +const schema string = "olm.template.basic" + type Template struct { Registry image.Registry } +type BasicTemplate struct { + Schema string `json:"schema"` + Entries []*declcfg.Meta `json:"entries"` +} + +func parseSpec(reader io.Reader) (*BasicTemplate, error) { + bt := &BasicTemplate{} + btDoc := json.RawMessage{} + btDecoder := yaml.NewYAMLOrJSONDecoder(reader, 4096) + err := btDecoder.Decode(&btDoc) + if err != nil { + return nil, fmt.Errorf("decoding template schema: %v", err) + } + err = json.Unmarshal(btDoc, bt) + if err != nil { + return nil, fmt.Errorf("unmarshalling template: %v", err) + } + + if bt.Schema != schema { + return nil, fmt.Errorf("template has unknown schema (%q), should be %q", bt.Schema, schema) + } + + return bt, nil +} + func (t Template) Render(ctx context.Context, reader io.Reader) (*declcfg.DeclarativeConfig, error) { - cfg, err := declcfg.LoadReader(reader) + bt, err := parseSpec(reader) + if err != nil { + return nil, err + } + cfg, err := declcfg.LoadSlice(bt.Entries) if err != nil { return cfg, err } - outb := cfg.Bundles[:0] // allocate based on max size of input, but empty slice + outb := cfg.Bundles[:0] // populate registry, incl any flags from CLI, and enforce only rendering bundle images r := action.Render{ Registry: t.Registry, @@ -48,3 +81,38 @@ func (t Template) Render(ctx context.Context, reader io.Reader) (*declcfg.Declar func isBundleTemplate(b *declcfg.Bundle) bool { return b.Schema != "" && b.Image != "" && b.Package == "" && len(b.Properties) == 0 && len(b.RelatedImages) == 0 } + +// FromReader reads FBC from a reader and generates a BasicTemplate from it +func FromReader(r io.Reader) (*BasicTemplate, error) { + var entries []*declcfg.Meta + if err := declcfg.WalkMetasReader(r, func(meta *declcfg.Meta, err error) error { + if err != nil { + return err + } + if meta.Schema == declcfg.SchemaBundle { + var b declcfg.Bundle + if err := json.Unmarshal(meta.Blob, &b); err != nil { + return fmt.Errorf("parse bundle: %v", err) + } + b2 := declcfg.Bundle{ + Schema: b.Schema, + Image: b.Image, + } + meta.Blob, err = json.Marshal(b2) + if err != nil { + return fmt.Errorf("re-serialize bundle: %v", err) + } + } + entries = append(entries, meta) + return nil + }); err != nil { + return nil, err + } + + bt := &BasicTemplate{ + Schema: schema, + Entries: entries, + } + + return bt, nil +} diff --git a/staging/operator-registry/alpha/template/converter/converter.go b/staging/operator-registry/alpha/template/converter/converter.go new file mode 100644 index 0000000000..33e28ddcd5 --- /dev/null +++ b/staging/operator-registry/alpha/template/converter/converter.go @@ -0,0 +1,39 @@ +package converter + +import ( + "encoding/json" + "fmt" + "io" + "os" + + "github.com/operator-framework/operator-registry/alpha/template/basic" + "github.com/operator-framework/operator-registry/pkg/image" + "sigs.k8s.io/yaml" +) + +type Converter struct { + FbcReader io.Reader + OutputFormat string + Registry image.Registry +} + +func (c *Converter) Convert() error { + bt, err := basic.FromReader(c.FbcReader) + if err != nil { + return err + } + + b, _ := json.MarshalIndent(bt, "", " ") + if c.OutputFormat == "json" { + fmt.Fprintln(os.Stdout, string(b)) + } else { + y, err := yaml.JSONToYAML(b) + if err != nil { + return err + } + y = append([]byte("---\n"), y...) + fmt.Fprintln(os.Stdout, string(y)) + } + + return nil +} diff --git a/staging/operator-registry/cmd/opm/alpha/cmd.go b/staging/operator-registry/cmd/opm/alpha/cmd.go index 202d9597fc..b0077f9ccc 100644 --- a/staging/operator-registry/cmd/opm/alpha/cmd.go +++ b/staging/operator-registry/cmd/opm/alpha/cmd.go @@ -4,6 +4,7 @@ import ( "github.com/spf13/cobra" "github.com/operator-framework/operator-registry/cmd/opm/alpha/bundle" + converttemplate "github.com/operator-framework/operator-registry/cmd/opm/alpha/convert-template" "github.com/operator-framework/operator-registry/cmd/opm/alpha/list" rendergraph "github.com/operator-framework/operator-registry/cmd/opm/alpha/render-graph" "github.com/operator-framework/operator-registry/cmd/opm/alpha/template" @@ -26,6 +27,7 @@ func NewCmd(showAlphaHelp bool) *cobra.Command { list.NewCmd(), rendergraph.NewCmd(), template.NewCmd(), + converttemplate.NewCmd(), ) return runCmd } diff --git a/staging/operator-registry/cmd/opm/alpha/convert-template/convert.go b/staging/operator-registry/cmd/opm/alpha/convert-template/convert.go new file mode 100644 index 0000000000..00df3352dc --- /dev/null +++ b/staging/operator-registry/cmd/opm/alpha/convert-template/convert.go @@ -0,0 +1,64 @@ +package converttemplate + +import ( + "fmt" + "log" + + "github.com/spf13/cobra" + + "github.com/operator-framework/operator-registry/alpha/template/converter" + "github.com/operator-framework/operator-registry/cmd/opm/internal/util" +) + +func NewCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "convert-template", + Short: "Convert existing FBC to a supported template type", + } + cmd.AddCommand( + newBasicConvertCmd(), + ) + return cmd +} + +func newBasicConvertCmd() *cobra.Command { + var ( + converter converter.Converter + output string + ) + cmd := &cobra.Command{ + Use: "basic [ | -]", + Args: cobra.MaximumNArgs(1), + Short: "Generate a basic template from existing FBC", + Long: `Generate a basic template from existing FBC. + +This command outputs a basic catalog template to STDOUT from input FBC. +If no argument is specified or is '-' input is assumed from STDIN. +`, + RunE: func(c *cobra.Command, args []string) error { + + switch output { + case "yaml", "json": + converter.OutputFormat = output + default: + log.Fatalf("invalid --output value %q, expected (json|yaml)", output) + } + + reader, name, err := util.OpenFileOrStdin(c, args) + if err != nil { + return fmt.Errorf("unable to open input: %q", name) + } + + converter.FbcReader = reader + err = converter.Convert() + if err != nil { + return fmt.Errorf("converting: %v", err) + } + + return nil + }, + } + cmd.Flags().StringVarP(&output, "output", "o", "json", "Output format (json|yaml)") + + return cmd +} diff --git a/staging/operator-registry/cmd/opm/alpha/template/basic.go b/staging/operator-registry/cmd/opm/alpha/template/basic.go index 5d34ec2cd8..91f4c75d77 100644 --- a/staging/operator-registry/cmd/opm/alpha/template/basic.go +++ b/staging/operator-registry/cmd/opm/alpha/template/basic.go @@ -16,7 +16,6 @@ import ( func newBasicTemplateCmd() *cobra.Command { var ( template basic.Template - output string ) cmd := &cobra.Command{ Use: "basic basic-template-file", @@ -30,13 +29,17 @@ When FILE is '-' or not provided, the template is read from standard input`, // When no arguments or "-" is passed to the command, // assume input is coming from stdin // Otherwise open the file passed to the command - data, source, err := openFileOrStdin(cmd, args) + data, source, err := util.OpenFileOrStdin(cmd, args) if err != nil { log.Fatalf("unable to open %q: %v", source, err) } defer data.Close() var write func(declcfg.DeclarativeConfig, io.Writer) error + output, err := cmd.Flags().GetString("output") + if err != nil { + log.Fatalf("unable to determine output format") + } switch output { case "yaml": write = declcfg.WriteYAML @@ -70,6 +73,5 @@ When FILE is '-' or not provided, the template is read from standard input`, } }, } - cmd.Flags().StringVarP(&output, "output", "o", "json", "Output format (json|yaml)") return cmd } diff --git a/staging/operator-registry/cmd/opm/alpha/template/cmd.go b/staging/operator-registry/cmd/opm/alpha/template/cmd.go index 8a2acefc50..55ac55187b 100644 --- a/staging/operator-registry/cmd/opm/alpha/template/cmd.go +++ b/staging/operator-registry/cmd/opm/alpha/template/cmd.go @@ -1,29 +1,27 @@ package template import ( - "io" - "os" - "github.com/spf13/cobra" ) func NewCmd() *cobra.Command { + var output string + runCmd := &cobra.Command{ Use: "render-template", Short: "Render a catalog template type", Args: cobra.NoArgs, } - runCmd.AddCommand(newBasicTemplateCmd()) - runCmd.AddCommand(newSemverTemplateCmd()) + bc := newBasicTemplateCmd() + // bc.Hidden = true + runCmd.AddCommand(bc) - return runCmd -} + sc := newSemverTemplateCmd() + // sc.Hidden = true + runCmd.AddCommand(sc) -func openFileOrStdin(cmd *cobra.Command, args []string) (io.ReadCloser, string, error) { - if len(args) == 0 || args[0] == "-" { - return io.NopCloser(cmd.InOrStdin()), "stdin", nil - } - reader, err := os.Open(args[0]) - return reader, args[0], err + runCmd.PersistentFlags().StringVarP(&output, "output", "o", "json", "Output format (json|yaml)") + + return runCmd } diff --git a/staging/operator-registry/cmd/opm/alpha/template/semver.go b/staging/operator-registry/cmd/opm/alpha/template/semver.go index f67f9596c0..b498f6b784 100644 --- a/staging/operator-registry/cmd/opm/alpha/template/semver.go +++ b/staging/operator-registry/cmd/opm/alpha/template/semver.go @@ -15,7 +15,6 @@ import ( ) func newSemverTemplateCmd() *cobra.Command { - output := "" cmd := &cobra.Command{ Use: "semver [FILE]", Short: `Generate a file-based catalog from a single 'semver template' file @@ -28,13 +27,17 @@ When FILE is '-' or not provided, the template is read from standard input`, // When no arguments or "-" is passed to the command, // assume input is coming from stdin // Otherwise open the file passed to the command - data, source, err := openFileOrStdin(cmd, args) + data, source, err := util.OpenFileOrStdin(cmd, args) if err != nil { return err } defer data.Close() var write func(declcfg.DeclarativeConfig, io.Writer) error + output, err := cmd.Flags().GetString("output") + if err != nil { + log.Fatalf("unable to determine output format") + } switch output { case "json": write = declcfg.WriteJSON @@ -79,6 +82,5 @@ When FILE is '-' or not provided, the template is read from standard input`, }, } - cmd.Flags().StringVarP(&output, "output", "o", "json", "Output format (json|yaml|mermaid)") return cmd } diff --git a/staging/operator-registry/cmd/opm/internal/util/util.go b/staging/operator-registry/cmd/opm/internal/util/util.go index a265ba7438..9e0e006be5 100644 --- a/staging/operator-registry/cmd/opm/internal/util/util.go +++ b/staging/operator-registry/cmd/opm/internal/util/util.go @@ -2,6 +2,7 @@ package util import ( "errors" + "io" "os" "github.com/spf13/cobra" @@ -66,3 +67,11 @@ func CreateCLIRegistry(cmd *cobra.Command) (*containerdregistry.Registry, error) } return reg, nil } + +func OpenFileOrStdin(cmd *cobra.Command, args []string) (io.ReadCloser, string, error) { + if len(args) == 0 || args[0] == "-" { + return io.NopCloser(cmd.InOrStdin()), "stdin", nil + } + reader, err := os.Open(args[0]) + return reader, args[0], err +} diff --git a/vendor/github.com/operator-framework/operator-registry/alpha/declcfg/declcfg.go b/vendor/github.com/operator-framework/operator-registry/alpha/declcfg/declcfg.go index 3474814be5..7797baa499 100644 --- a/vendor/github.com/operator-framework/operator-registry/alpha/declcfg/declcfg.go +++ b/vendor/github.com/operator-framework/operator-registry/alpha/declcfg/declcfg.go @@ -70,8 +70,8 @@ type ChannelEntry struct { // evaluation in bundlesEqual(). type Bundle struct { Schema string `json:"schema"` - Name string `json:"name"` - Package string `json:"package"` + Name string `json:"name,omitempty"` + Package string `json:"package,omitempty"` Image string `json:"image"` Properties []property.Property `json:"properties,omitempty" hash:"set"` RelatedImages []RelatedImage `json:"relatedImages,omitempty" hash:"set"` diff --git a/vendor/github.com/operator-framework/operator-registry/alpha/declcfg/load.go b/vendor/github.com/operator-framework/operator-registry/alpha/declcfg/load.go index 8717299a6a..f811b31453 100644 --- a/vendor/github.com/operator-framework/operator-registry/alpha/declcfg/load.go +++ b/vendor/github.com/operator-framework/operator-registry/alpha/declcfg/load.go @@ -259,6 +259,17 @@ func LoadFile(root fs.FS, path string) (*DeclarativeConfig, error) { return cfg, nil } +// LoadSlice will compose declarative config components from a slice of Meta objects +func LoadSlice(metas []*Meta) (*DeclarativeConfig, error) { + builder := fbcBuilder{} + for _, meta := range metas { + if err := builder.addMeta(meta); err != nil { + return nil, err + } + } + return &builder.cfg, nil +} + type fbcBuilder struct { cfg DeclarativeConfig diff --git a/vendor/github.com/operator-framework/operator-registry/alpha/template/basic/basic.go b/vendor/github.com/operator-framework/operator-registry/alpha/template/basic/basic.go index 18566fbcf2..73a6327e93 100644 --- a/vendor/github.com/operator-framework/operator-registry/alpha/template/basic/basic.go +++ b/vendor/github.com/operator-framework/operator-registry/alpha/template/basic/basic.go @@ -2,25 +2,58 @@ package basic import ( "context" + "encoding/json" "fmt" "io" "github.com/operator-framework/operator-registry/alpha/action" "github.com/operator-framework/operator-registry/alpha/declcfg" "github.com/operator-framework/operator-registry/pkg/image" + "k8s.io/apimachinery/pkg/util/yaml" ) +const schema string = "olm.template.basic" + type Template struct { Registry image.Registry } +type BasicTemplate struct { + Schema string `json:"schema"` + Entries []*declcfg.Meta `json:"entries"` +} + +func parseSpec(reader io.Reader) (*BasicTemplate, error) { + bt := &BasicTemplate{} + btDoc := json.RawMessage{} + btDecoder := yaml.NewYAMLOrJSONDecoder(reader, 4096) + err := btDecoder.Decode(&btDoc) + if err != nil { + return nil, fmt.Errorf("decoding template schema: %v", err) + } + err = json.Unmarshal(btDoc, bt) + if err != nil { + return nil, fmt.Errorf("unmarshalling template: %v", err) + } + + if bt.Schema != schema { + return nil, fmt.Errorf("template has unknown schema (%q), should be %q", bt.Schema, schema) + } + + return bt, nil +} + func (t Template) Render(ctx context.Context, reader io.Reader) (*declcfg.DeclarativeConfig, error) { - cfg, err := declcfg.LoadReader(reader) + bt, err := parseSpec(reader) + if err != nil { + return nil, err + } + cfg, err := declcfg.LoadSlice(bt.Entries) if err != nil { return cfg, err } - outb := cfg.Bundles[:0] // allocate based on max size of input, but empty slice + outb := cfg.Bundles[:0] // populate registry, incl any flags from CLI, and enforce only rendering bundle images r := action.Render{ Registry: t.Registry, @@ -48,3 +81,38 @@ func (t Template) Render(ctx context.Context, reader io.Reader) (*declcfg.Declar func isBundleTemplate(b *declcfg.Bundle) bool { return b.Schema != "" && b.Image != "" && b.Package == "" && len(b.Properties) == 0 && len(b.RelatedImages) == 0 } + +// FromReader reads FBC from a reader and generates a BasicTemplate from it +func FromReader(r io.Reader) (*BasicTemplate, error) { + var entries []*declcfg.Meta + if err := declcfg.WalkMetasReader(r, func(meta *declcfg.Meta, err error) error { + if err != nil { + return err + } + if meta.Schema == declcfg.SchemaBundle { + var b declcfg.Bundle + if err := json.Unmarshal(meta.Blob, &b); err != nil { + return fmt.Errorf("parse bundle: %v", err) + } + b2 := declcfg.Bundle{ + Schema: b.Schema, + Image: b.Image, + } + meta.Blob, err = json.Marshal(b2) + if err != nil { + return fmt.Errorf("re-serialize bundle: %v", err) + } + } + entries = append(entries, meta) + return nil + }); err != nil { + return nil, err + } + + bt := &BasicTemplate{ + Schema: schema, + Entries: entries, + } + + return bt, nil +} diff --git a/vendor/github.com/operator-framework/operator-registry/alpha/template/converter/converter.go b/vendor/github.com/operator-framework/operator-registry/alpha/template/converter/converter.go new file mode 100644 index 0000000000..33e28ddcd5 --- /dev/null +++ b/vendor/github.com/operator-framework/operator-registry/alpha/template/converter/converter.go @@ -0,0 +1,39 @@ +package converter + +import ( + "encoding/json" + "fmt" + "io" + "os" + + "github.com/operator-framework/operator-registry/alpha/template/basic" + "github.com/operator-framework/operator-registry/pkg/image" + "sigs.k8s.io/yaml" +) + +type Converter struct { + FbcReader io.Reader + OutputFormat string + Registry image.Registry +} + +func (c *Converter) Convert() error { + bt, err := basic.FromReader(c.FbcReader) + if err != nil { + return err + } + + b, _ := json.MarshalIndent(bt, "", " ") + if c.OutputFormat == "json" { + fmt.Fprintln(os.Stdout, string(b)) + } else { + y, err := yaml.JSONToYAML(b) + if err != nil { + return err + } + y = append([]byte("---\n"), y...) + fmt.Fprintln(os.Stdout, string(y)) + } + + return nil +} diff --git a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/cmd.go b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/cmd.go index 202d9597fc..b0077f9ccc 100644 --- a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/cmd.go +++ b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/cmd.go @@ -4,6 +4,7 @@ import ( "github.com/spf13/cobra" "github.com/operator-framework/operator-registry/cmd/opm/alpha/bundle" + converttemplate "github.com/operator-framework/operator-registry/cmd/opm/alpha/convert-template" "github.com/operator-framework/operator-registry/cmd/opm/alpha/list" rendergraph "github.com/operator-framework/operator-registry/cmd/opm/alpha/render-graph" "github.com/operator-framework/operator-registry/cmd/opm/alpha/template" @@ -26,6 +27,7 @@ func NewCmd(showAlphaHelp bool) *cobra.Command { list.NewCmd(), rendergraph.NewCmd(), template.NewCmd(), + converttemplate.NewCmd(), ) return runCmd } diff --git a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/convert-template/convert.go b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/convert-template/convert.go new file mode 100644 index 0000000000..00df3352dc --- /dev/null +++ b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/convert-template/convert.go @@ -0,0 +1,64 @@ +package converttemplate + +import ( + "fmt" + "log" + + "github.com/spf13/cobra" + + "github.com/operator-framework/operator-registry/alpha/template/converter" + "github.com/operator-framework/operator-registry/cmd/opm/internal/util" +) + +func NewCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "convert-template", + Short: "Convert existing FBC to a supported template type", + } + cmd.AddCommand( + newBasicConvertCmd(), + ) + return cmd +} + +func newBasicConvertCmd() *cobra.Command { + var ( + converter converter.Converter + output string + ) + cmd := &cobra.Command{ + Use: "basic [ | -]", + Args: cobra.MaximumNArgs(1), + Short: "Generate a basic template from existing FBC", + Long: `Generate a basic template from existing FBC. + +This command outputs a basic catalog template to STDOUT from input FBC. +If no argument is specified or is '-' input is assumed from STDIN. +`, + RunE: func(c *cobra.Command, args []string) error { + + switch output { + case "yaml", "json": + converter.OutputFormat = output + default: + log.Fatalf("invalid --output value %q, expected (json|yaml)", output) + } + + reader, name, err := util.OpenFileOrStdin(c, args) + if err != nil { + return fmt.Errorf("unable to open input: %q", name) + } + + converter.FbcReader = reader + err = converter.Convert() + if err != nil { + return fmt.Errorf("converting: %v", err) + } + + return nil + }, + } + cmd.Flags().StringVarP(&output, "output", "o", "json", "Output format (json|yaml)") + + return cmd +} diff --git a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/basic.go b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/basic.go index 5d34ec2cd8..91f4c75d77 100644 --- a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/basic.go +++ b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/basic.go @@ -16,7 +16,6 @@ import ( func newBasicTemplateCmd() *cobra.Command { var ( template basic.Template - output string ) cmd := &cobra.Command{ Use: "basic basic-template-file", @@ -30,13 +29,17 @@ When FILE is '-' or not provided, the template is read from standard input`, // When no arguments or "-" is passed to the command, // assume input is coming from stdin // Otherwise open the file passed to the command - data, source, err := openFileOrStdin(cmd, args) + data, source, err := util.OpenFileOrStdin(cmd, args) if err != nil { log.Fatalf("unable to open %q: %v", source, err) } defer data.Close() var write func(declcfg.DeclarativeConfig, io.Writer) error + output, err := cmd.Flags().GetString("output") + if err != nil { + log.Fatalf("unable to determine output format") + } switch output { case "yaml": write = declcfg.WriteYAML @@ -70,6 +73,5 @@ When FILE is '-' or not provided, the template is read from standard input`, } }, } - cmd.Flags().StringVarP(&output, "output", "o", "json", "Output format (json|yaml)") return cmd } diff --git a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/cmd.go b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/cmd.go index 8a2acefc50..55ac55187b 100644 --- a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/cmd.go +++ b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/cmd.go @@ -1,29 +1,27 @@ package template import ( - "io" - "os" - "github.com/spf13/cobra" ) func NewCmd() *cobra.Command { + var output string + runCmd := &cobra.Command{ Use: "render-template", Short: "Render a catalog template type", Args: cobra.NoArgs, } - runCmd.AddCommand(newBasicTemplateCmd()) - runCmd.AddCommand(newSemverTemplateCmd()) + bc := newBasicTemplateCmd() + // bc.Hidden = true + runCmd.AddCommand(bc) - return runCmd -} + sc := newSemverTemplateCmd() + // sc.Hidden = true + runCmd.AddCommand(sc) -func openFileOrStdin(cmd *cobra.Command, args []string) (io.ReadCloser, string, error) { - if len(args) == 0 || args[0] == "-" { - return io.NopCloser(cmd.InOrStdin()), "stdin", nil - } - reader, err := os.Open(args[0]) - return reader, args[0], err + runCmd.PersistentFlags().StringVarP(&output, "output", "o", "json", "Output format (json|yaml)") + + return runCmd } diff --git a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/semver.go b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/semver.go index f67f9596c0..b498f6b784 100644 --- a/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/semver.go +++ b/vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/template/semver.go @@ -15,7 +15,6 @@ import ( ) func newSemverTemplateCmd() *cobra.Command { - output := "" cmd := &cobra.Command{ Use: "semver [FILE]", Short: `Generate a file-based catalog from a single 'semver template' file @@ -28,13 +27,17 @@ When FILE is '-' or not provided, the template is read from standard input`, // When no arguments or "-" is passed to the command, // assume input is coming from stdin // Otherwise open the file passed to the command - data, source, err := openFileOrStdin(cmd, args) + data, source, err := util.OpenFileOrStdin(cmd, args) if err != nil { return err } defer data.Close() var write func(declcfg.DeclarativeConfig, io.Writer) error + output, err := cmd.Flags().GetString("output") + if err != nil { + log.Fatalf("unable to determine output format") + } switch output { case "json": write = declcfg.WriteJSON @@ -79,6 +82,5 @@ When FILE is '-' or not provided, the template is read from standard input`, }, } - cmd.Flags().StringVarP(&output, "output", "o", "json", "Output format (json|yaml|mermaid)") return cmd } diff --git a/vendor/github.com/operator-framework/operator-registry/cmd/opm/internal/util/util.go b/vendor/github.com/operator-framework/operator-registry/cmd/opm/internal/util/util.go index a265ba7438..9e0e006be5 100644 --- a/vendor/github.com/operator-framework/operator-registry/cmd/opm/internal/util/util.go +++ b/vendor/github.com/operator-framework/operator-registry/cmd/opm/internal/util/util.go @@ -2,6 +2,7 @@ package util import ( "errors" + "io" "os" "github.com/spf13/cobra" @@ -66,3 +67,11 @@ func CreateCLIRegistry(cmd *cobra.Command) (*containerdregistry.Registry, error) } return reg, nil } + +func OpenFileOrStdin(cmd *cobra.Command, args []string) (io.ReadCloser, string, error) { + if len(args) == 0 || args[0] == "-" { + return io.NopCloser(cmd.InOrStdin()), "stdin", nil + } + reader, err := os.Open(args[0]) + return reader, args[0], err +} diff --git a/vendor/modules.txt b/vendor/modules.txt index c2fa51fdea..1d86eceb5d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -831,12 +831,14 @@ github.com/operator-framework/operator-registry/alpha/declcfg github.com/operator-framework/operator-registry/alpha/model github.com/operator-framework/operator-registry/alpha/property github.com/operator-framework/operator-registry/alpha/template/basic +github.com/operator-framework/operator-registry/alpha/template/converter github.com/operator-framework/operator-registry/alpha/template/semver github.com/operator-framework/operator-registry/cmd/configmap-server github.com/operator-framework/operator-registry/cmd/initializer github.com/operator-framework/operator-registry/cmd/opm github.com/operator-framework/operator-registry/cmd/opm/alpha github.com/operator-framework/operator-registry/cmd/opm/alpha/bundle +github.com/operator-framework/operator-registry/cmd/opm/alpha/convert-template github.com/operator-framework/operator-registry/cmd/opm/alpha/list github.com/operator-framework/operator-registry/cmd/opm/alpha/render-graph github.com/operator-framework/operator-registry/cmd/opm/alpha/template From adf348cba457c26790c4f76abe0dae4b78fecca3 Mon Sep 17 00:00:00 2001 From: Per Goncalves da Silva Date: Tue, 2 Jul 2024 15:42:56 +0200 Subject: [PATCH 29/29] [CARRY] add junit report Signed-off-by: Per Goncalves da Silva --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 591f42c7f1..5f845690e0 100644 --- a/Makefile +++ b/Makefile @@ -129,8 +129,9 @@ e2e: e2e/operator-registry: ## Run e2e registry tests $(MAKE) e2e WHAT=operator-registry +ARTIFACT_DIR ?= '$(ROOT_DIR)' e2e/olm: ## Run e2e olm tests - $(MAKE) e2e WHAT=operator-lifecycle-manager E2E_CATALOG_NS=openshift-marketplace E2E_INSTALL_NS=openshift-operator-lifecycle-manager E2E_TEST_NS=openshift-operators E2E_TIMEOUT=135m KUBECTL=oc + $(MAKE) e2e WHAT=operator-lifecycle-manager E2E_CATALOG_NS=openshift-marketplace E2E_INSTALL_NS=openshift-operator-lifecycle-manager E2E_TEST_NS=openshift-operators E2E_TIMEOUT=135m KUBECTL=oc E2E_GINKGO_OPTS="--junit-report olm-e2e-junit.xml" .PHONY: vendor vendor: