Commit 415d614f authored by Tobias Schottdorf's avatar Tobias Schottdorf

vendor: bump golang/protobuf to 1.4.2

v1.4.1 aggressively deprecated something (by inserting panics) that was
reachable via gogoproto's marshaler. Luckily, v1.4.2 has this "fixed";
it caused enough trouble for others as well.

Closes #49842.

Release note: None
parent fd1bccfd
......@@ -864,7 +864,7 @@
revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998"
[[projects]]
digest = "1:59a826b72bb40d1f541f1438cfdfcea63948327478b82c72fc1349b33ddff7ca"
digest = "1:7852a48216dd9d7b8f09af45e5641a04fbe1947126081b546fe92ddd5e02256a"
name = "github.com/golang/protobuf"
packages = [
"descriptor",
......@@ -879,8 +879,8 @@
"ptypes/wrappers",
]
pruneopts = "UT"
revision = "6c66de79d66478d166c7ea05f5d2ccaf016fbd6b"
version = "v1.4.1"
revision = "d04d7b157bb510b1e0c10132224b616ac0e26b17"
version = "v1.4.2"
[[projects]]
branch = "master"
......
......@@ -133,7 +133,7 @@ ignored = [
# (google.golang.org/protobuf) so there's no pressing reason
# to do anything.
name = "github.com/golang/protobuf"
version = "=v1.4.1"
version = "=v1.4.2"
[[constraint]]
name = "github.com/gogo/protobuf"
......
......@@ -18,6 +18,7 @@ import (
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"net/url"
"os"
"path/filepath"
......@@ -45,11 +46,13 @@ import (
"github.com/cockroachdb/cockroach/pkg/util/httputil"
"github.com/cockroachdb/cockroach/pkg/util/leaktest"
"github.com/cockroachdb/cockroach/pkg/util/log"
"github.com/cockroachdb/cockroach/pkg/util/protoutil"
"github.com/cockroachdb/cockroach/pkg/util/timeutil"
"github.com/cockroachdb/cockroach/pkg/util/uuid"
"github.com/cockroachdb/errors"
"github.com/gogo/protobuf/jsonpb"
"github.com/gogo/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
......@@ -1091,3 +1094,18 @@ Binary built without web UI.
}
})
}
func TestGWRuntimeMarshalProto(t *testing.T) {
defer leaktest.AfterTest(t)()
ctx := context.Background()
// Regression test against:
// https://github.com/cockroachdb/cockroach/issues/49842
runtime.DefaultHTTPError(
ctx,
runtime.NewServeMux(),
&protoutil.ProtoPb{}, // calls XXX_size
&httptest.ResponseRecorder{},
nil, /* request */
errors.New("boom"),
)
}
Subproject commit 9f418e59c0f601a441c478a577568128c6654724
Subproject commit 052117d35784f8106b2beb1f09b54eeeb8946617
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment