Skip to content

Commit

Permalink
Bump go-control-plane (#48841)
Browse files Browse the repository at this point in the history
* Bump go-control-plane

* Bump and turn off by default

* fix gen

* bump
  • Loading branch information
howardjohn committed Feb 2, 2024
1 parent 5e0b71f commit faf5bdd
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
3 changes: 2 additions & 1 deletion go.mod
Expand Up @@ -25,7 +25,7 @@ require (
github.com/coreos/go-oidc/v3 v3.9.0
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/docker/cli v25.0.1+incompatible
github.com/envoyproxy/go-control-plane v0.12.1-0.20240117015050-472addddff92
github.com/envoyproxy/go-control-plane v0.12.1-0.20240201193905-4becb1e82b0c
github.com/evanphx/json-patch/v5 v5.7.0
github.com/fatih/color v1.16.0
github.com/felixge/fgprof v0.9.3
Expand Down Expand Up @@ -209,6 +209,7 @@ require (
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/planetscale/vtprotobuf v0.6.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/rivo/uniseg v0.4.6 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Expand Up @@ -177,8 +177,8 @@ github.com/emicklei/go-restful/v3 v3.11.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRr
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.12.1-0.20240117015050-472addddff92 h1:/3bsjkhOTh0swUKDBxL1+3MrXCxrf/sEEMseiIEJg00=
github.com/envoyproxy/go-control-plane v0.12.1-0.20240117015050-472addddff92/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0=
github.com/envoyproxy/go-control-plane v0.12.1-0.20240201193905-4becb1e82b0c h1:Wlv7v4XOb6jlL/bvfA3laF0e8vu4dOJbz93C5/PTtNs=
github.com/envoyproxy/go-control-plane v0.12.1-0.20240201193905-4becb1e82b0c/go.mod h1:lFu6itz1hckLR2A3aJ+ZKf3lu8HpjTsJSsqvVF6GL6g=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA=
github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
Expand Down Expand Up @@ -600,6 +600,8 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/planetscale/vtprotobuf v0.6.0 h1:nBeETjudeJ5ZgBHUz1fVHvbqUKnYOXNhsIEabROxmNA=
github.com/planetscale/vtprotobuf v0.6.0/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down
3 changes: 3 additions & 0 deletions pilot/pkg/features/pilot.go
Expand Up @@ -238,6 +238,9 @@ var (

VerifyCertAtClient = env.Register("VERIFY_CERTIFICATE_AT_CLIENT", true,
"If enabled, certificates received by the proxy will be verified against the OS CA certificate bundle.").Get()

EnableVtprotobuf = env.Register("ENABLE_VTPROTOBUF", false,
"If true, will use optimized vtprotobuf based marshaling").Get()
)

// UnsafeFeaturesEnabled returns true if any unsafe features are enabled.
Expand Down
11 changes: 7 additions & 4 deletions pilot/pkg/util/protoconv/protoconv.go
Expand Up @@ -23,6 +23,7 @@ import (
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/structpb"

"istio.io/istio/pilot/pkg/features"
"istio.io/istio/pkg/log"
)

Expand All @@ -40,10 +41,12 @@ func MessageToAnyWithError(msg proto.Message) (*anypb.Any, error) {
}

func marshal(msg proto.Message) ([]byte, error) {
if vt, ok := msg.(vtStrictMarshal); ok {
// Attempt to use more efficient implementation
// "Strict" is the equivalent to Deterministic=true below
return vt.MarshalVTStrict()
if features.EnableVtprotobuf {
if vt, ok := msg.(vtStrictMarshal); ok {
// Attempt to use more efficient implementation
// "Strict" is the equivalent to Deterministic=true below
return vt.MarshalVTStrict()
}
}
// If not available, fallback to normal implementation
return proto.MarshalOptions{Deterministic: true}.Marshal(msg)
Expand Down
1 change: 1 addition & 0 deletions pkg/config/xds/filter_types.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/binary/binaries_test.go
Expand Up @@ -106,11 +106,11 @@ func TestBinarySizes(t *testing.T) {
}{
// TODO: shrink the ranges here once the active work to reduce binary size is complete
// For now, having two small a range will result in lots of "merge conflicts"
"istioctl": {60, 75},
"istioctl": {60, 85},
"pilot-agent": {30, 36},
// TODO(https://github.com/kubernetes/kubernetes/issues/101384) bump this down a bit?
"pilot-discovery": {60, 75},
"bug-report": {60, 70},
"pilot-discovery": {60, 80},
"bug-report": {60, 80},
"client": {15, 30},
"server": {15, 30},
"envoy": {60, 130},
Expand Down

0 comments on commit faf5bdd

Please sign in to comment.