Commit bd9ce328 authored by Angela Nguyen's avatar Angela Nguyen
Browse files

Merge branch 'main' into dynamodb-wz-1

parents 544bea04 84f898f8
Showing with 999 additions and 961 deletions
+999 -961
......@@ -9,6 +9,7 @@ jobs:
- uses: actions/stale@v4
with:
days-before-stale: 7
days-before-issue-stale: -1
days-before-close: 3
exempt-pr-labels: 'on hold'
stale-pr-message: >
......
......@@ -29,7 +29,7 @@ message RequestProxyRequest {
// The URI path to call
string path = 3 [ (validate.rules).string.min_len = 1 ];
// The request body
google.protobuf.Value request = 4;
google.protobuf.Value request = 4 [ (clutch.api.v1.log) = false ];
}
message RequestProxyResponse {
......@@ -40,5 +40,5 @@ message RequestProxyResponse {
// https://datatracker.ietf.org/doc/html/rfc2616#section-4.2
map<string, google.protobuf.ListValue> headers = 2;
// The full response body
google.protobuf.Value response = 3;
google.protobuf.Value response = 3 [ (clutch.api.v1.log) = false ];
}
......@@ -179,7 +179,7 @@ var file_proxy_v1_proxy_proto_rawDesc = []byte{
0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76,
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21,
0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
......@@ -187,40 +187,41 @@ var file_proxy_v1_proxy_proto_rawDesc = []byte{
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52,
0x0a, 0x68, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1b, 0x0a, 0x04, 0x70,
0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02,
0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x30, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75,
0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x36, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x91, 0x02, 0x0a, 0x14, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x12, 0x4c, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18,
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x70,
0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50,
0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61,
0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65,
0x72, 0x73, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x72, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x56, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0x8b,
0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x50, 0x49, 0x12, 0x7f, 0x0a, 0x0c, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x24, 0x2e, 0x63, 0x6c,
0x65, 0x42, 0x04, 0xa8, 0xe1, 0x1c, 0x00, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x22, 0x97, 0x02, 0x0a, 0x14, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x78,
0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x74, 0x74,
0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
0x68, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4c, 0x0a, 0x07, 0x68, 0x65,
0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x6c,
0x75, 0x74, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79,
0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16,
0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x72, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0xaa, 0xe1, 0x1c, 0x02, 0x08, 0x01, 0x42, 0x35, 0x5a, 0x33,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x79, 0x66, 0x74, 0x2f,
0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x6f, 0x78,
0x79, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x42, 0x04, 0xa8, 0xe1, 0x1c, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x1a, 0x56, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0x8b, 0x01, 0x0a, 0x08, 0x50,
0x72, 0x6f, 0x78, 0x79, 0x41, 0x50, 0x49, 0x12, 0x7f, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x24, 0x2e, 0x63, 0x6c, 0x75, 0x74, 0x63, 0x68,
0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e,
0x63, 0x6c, 0x75, 0x74, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x31, 0x2e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f, 0x76,
0x31, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x3a,
0x01, 0x2a, 0xaa, 0xe1, 0x1c, 0x02, 0x08, 0x01, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x79, 0x66, 0x74, 0x2f, 0x63, 0x6c, 0x75, 0x74,
0x63, 0x68, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70,
0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x31, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
......
......@@ -19,13 +19,13 @@ require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/envoyproxy/go-control-plane v0.9.9-0.20210304204206-e2b50f82e48e
github.com/envoyproxy/protoc-gen-validate v0.6.1
github.com/fullstorydev/grpcurl v1.8.1
github.com/fullstorydev/grpcurl v1.8.2
github.com/go-git/go-billy/v5 v5.3.1
github.com/go-git/go-git/v5 v5.4.2
github.com/gobwas/glob v0.2.3
github.com/golang-migrate/migrate/v4 v4.14.1
github.com/golang/protobuf v1.5.2
github.com/google/go-github/v36 v36.0.0
github.com/google/go-github/v37 v37.0.0
github.com/google/uuid v1.3.0
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0
......@@ -37,7 +37,7 @@ require (
github.com/m3db/prometheus_common v0.1.0 // indirect
github.com/m3db/prometheus_procfs v0.8.1 // indirect
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/shurcooL/githubv4 v0.0.0-20201206200315-234843c633fa
github.com/shurcooL/githubv4 v0.0.0-20210725200734-83ba7b4c9228
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f // indirect
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546
......
......@@ -241,8 +241,8 @@ github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0uQR+pM/VdlL83bw=
github.com/fullstorydev/grpcurl v1.8.1 h1:Pp648wlTTg3OKySeqxM5pzh8XF6vLqrm8wRq66+5Xo0=
github.com/fullstorydev/grpcurl v1.8.1/go.mod h1:3BWhvHZwNO7iLXaQlojdg5NA6SxUDePli4ecpK1N7gw=
github.com/fullstorydev/grpcurl v1.8.2 h1:2II5e++aFnctnPJir3GL6cPSwF69Ord1u/9O+fv1vrI=
github.com/fullstorydev/grpcurl v1.8.2/go.mod h1:YvWNT3xRp2KIRuvCphFodG0fKkMXwaxA9CJgKCcyzUQ=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0=
......@@ -348,8 +348,8 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM=
github.com/google/go-github/v36 v36.0.0 h1:ndCzM616/oijwufI7nBRa+5eZHLldT+4yIB68ib5ogs=
github.com/google/go-github/v36 v36.0.0/go.mod h1:LFlKC047IOqiglRGNqNb9s/iAPTnnjtlshm+bxp+kwk=
github.com/google/go-github/v37 v37.0.0 h1:rCspN8/6kB1BAJWZfuafvHhyfIo5fkAulaP/3bOQ/tM=
github.com/google/go-github/v37 v37.0.0/go.mod h1:LM7in3NmXDrX58GbEHy7FtNLbI2JijX93RnMKvWG3m4=
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/go-replayers/grpcreplay v0.1.0/go.mod h1:8Ig2Idjpr6gifRd6pNVggX6TC1Zw6Jx74AKp7QNH2QE=
......@@ -472,7 +472,6 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
github.com/jhump/protoreflect v1.8.1/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg=
github.com/jhump/protoreflect v1.8.2/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg=
github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w=
github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
......@@ -654,8 +653,8 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
github.com/shurcooL/githubv4 v0.0.0-20201206200315-234843c633fa h1:jozR3igKlnYCj9IVHOVump59bp07oIRoLQ/CcjMYIUA=
github.com/shurcooL/githubv4 v0.0.0-20201206200315-234843c633fa/go.mod h1:hAF0iLZy4td2EX+/8Tw+4nodhlMrwN3HupfaXj3zkGo=
github.com/shurcooL/githubv4 v0.0.0-20210725200734-83ba7b4c9228 h1:N5B+JgvM/DVYIxreItPJMM3yWrNO/GB2q4nESrtBisM=
github.com/shurcooL/githubv4 v0.0.0-20210725200734-83ba7b4c9228/go.mod h1:hAF0iLZy4td2EX+/8Tw+4nodhlMrwN3HupfaXj3zkGo=
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f h1:tygelZueB1EtXkPI6mQ4o9DQ0+FKW41hTbunoXZCTqk=
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg=
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk=
......
......@@ -4,11 +4,10 @@ import (
"context"
"github.com/golang/protobuf/ptypes/any"
githubv3 "github.com/google/go-github/v36/github"
githubv3 "github.com/google/go-github/v37/github"
"github.com/uber-go/tally"
"go.uber.org/zap"
githubv1 "github.com/lyft/clutch/backend/api/sourcecontrol/github/v1"
sourcecontrolv1 "github.com/lyft/clutch/backend/api/sourcecontrol/v1"
"github.com/lyft/clutch/backend/service"
"github.com/lyft/clutch/backend/service/github"
......@@ -40,7 +39,7 @@ func (s svc) CreateRepository(ctx context.Context, req *sourcecontrolv1.CreateRe
return &sourcecontrolv1.CreateRepositoryResponse{Url: "https://github.com/lyft/clutch"}, nil
}
func (s svc) CompareCommits(ctx context.Context, ref *github.RemoteRef, compareSHA string) (*githubv1.CommitComparison, error) {
func (s svc) CompareCommits(ctx context.Context, ref *github.RemoteRef, compareSHA string) (*githubv3.CommitsComparison, error) {
panic("implement me")
}
......
package proxy
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"strings"
......@@ -14,6 +16,7 @@ import (
"go.uber.org/zap"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/types/known/structpb"
proxyv1cfg "github.com/lyft/clutch/backend/api/config/module/proxy/v1"
......@@ -103,6 +106,15 @@ func (m *mod) RequestProxy(ctx context.Context, req *proxyv1.RequestProxyRequest
Header: headers,
}
if req.Request != nil {
requestJSON, err := protojson.Marshal(req.Request)
if err != nil {
return nil, err
}
buff := bytes.NewBuffer(requestJSON)
request.Body = ioutil.NopCloser(buff)
}
response, err := m.client.Do(request)
if err != nil {
m.logger.Error("proxy request error", zap.Error(err))
......@@ -114,8 +126,8 @@ func (m *mod) RequestProxy(ctx context.Context, req *proxyv1.RequestProxyRequest
resHeaders := make(map[string]*structpb.ListValue, len(response.Header))
for key, headers := range response.Header {
headerValues := make([]*structpb.Value, len(headers))
for _, h := range headers {
headerValues = append(headerValues, structpb.NewStringValue(h))
for i, h := range headers {
headerValues[i] = structpb.NewStringValue(h)
}
resHeaders[key] = &structpb.ListValue{
......
......@@ -4,6 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
"io/ioutil"
"net/http"
"net/http/httptest"
"testing"
......@@ -123,8 +124,14 @@ func TestRequestProxy(t *testing.T) {
Service: "cat",
HttpMethod: "POST",
Path: "/nom",
Request: structpbFromBody([]byte(`{"test": "data"}`)),
},
handler: func(w http.ResponseWriter, r *http.Request) {
// assert that the requesting body data was sent
bodyData, err := ioutil.ReadAll(r.Body)
assert.NoError(t, err)
assert.NotEmpty(t, bodyData)
w.WriteHeader(200)
_, _ = w.Write([]byte("{}"))
},
......
......@@ -19,7 +19,7 @@ import (
gittransport "github.com/go-git/go-git/v5/plumbing/transport/http"
"github.com/go-git/go-git/v5/storage/memory"
"github.com/golang/protobuf/ptypes/any"
githubv3 "github.com/google/go-github/v36/github"
githubv3 "github.com/google/go-github/v37/github"
"github.com/shurcooL/githubv4"
"github.com/uber-go/tally"
"go.uber.org/zap"
......@@ -28,7 +28,6 @@ import (
"google.golang.org/grpc/status"
githubv1 "github.com/lyft/clutch/backend/api/config/service/github/v1"
scgithubv1 "github.com/lyft/clutch/backend/api/sourcecontrol/github/v1"
sourcecontrolv1 "github.com/lyft/clutch/backend/api/sourcecontrol/v1"
"github.com/lyft/clutch/backend/service"
)
......@@ -79,7 +78,7 @@ type Client interface {
CreatePullRequest(ctx context.Context, ref *RemoteRef, base, title, body string) (*PullRequestInfo, error)
CreateRepository(ctx context.Context, req *sourcecontrolv1.CreateRepositoryRequest) (*sourcecontrolv1.CreateRepositoryResponse, error)
CreateIssueComment(ctx context.Context, ref *RemoteRef, number int, body string) error
CompareCommits(ctx context.Context, ref *RemoteRef, compareSHA string) (*scgithubv1.CommitComparison, error)
CompareCommits(ctx context.Context, ref *RemoteRef, compareSHA string) (*githubv3.CommitsComparison, error)
GetCommit(ctx context.Context, ref *RemoteRef) (*Commit, error)
GetRepository(ctx context.Context, ref *RemoteRef) (*Repository, error)
GetOrganization(ctx context.Context, organization string) (*githubv3.Organization, error)
......@@ -345,24 +344,22 @@ func (s *svc) GetFile(ctx context.Context, ref *RemoteRef, path string) (*File,
return f, nil
}
func (s *svc) CompareCommits(ctx context.Context, ref *RemoteRef, compareSHA string) (*scgithubv1.CommitComparison, error) {
/*
* Rather than calling GetCommit() multiple times, we can use CompareCommits to get a range of commits
*/
func (s *svc) CompareCommits(ctx context.Context, ref *RemoteRef, compareSHA string) (*githubv3.CommitsComparison, error) {
comp, _, err := s.rest.Repositories.CompareCommits(ctx, ref.RepoOwner, ref.RepoName, compareSHA, ref.Ref)
if err != nil {
return nil, fmt.Errorf("Could not get compare status for %s and %s. %+v", ref.Ref, compareSHA, err)
return nil, fmt.Errorf("Could not get comparison for %s and %s. %+v", ref.Ref, compareSHA, err)
}
status, ok := scgithubv1.CommitCompareStatus_value[strings.ToUpper(comp.GetStatus())]
if !ok {
return nil, fmt.Errorf("unknown status %s", comp.GetStatus())
}
return &scgithubv1.CommitComparison{
Status: scgithubv1.CommitCompareStatus(status),
}, nil
return comp, nil
}
type Commit struct {
Files []*githubv3.CommitFile
Files []*githubv3.CommitFile
Message string
Author *githubv3.User
ParentRef string
}
func (s *svc) GetCommit(ctx context.Context, ref *RemoteRef) (*Commit, error) {
......@@ -370,9 +367,19 @@ func (s *svc) GetCommit(ctx context.Context, ref *RemoteRef) (*Commit, error) {
if err != nil {
return nil, err
}
return &Commit{
Files: commit.Files,
}, nil
// Currently we are using the Author (Github) rather than commit Author (Git)
retCommit := &Commit{
Files: commit.Files,
Message: commit.GetCommit().GetMessage(),
Author: commit.GetAuthor(),
}
if commit.Parents != nil && len(commit.Parents) > 0 {
retCommit.ParentRef = commit.Parents[0].GetSHA()
}
return retCommit, nil
}
func (s *svc) GetRepository(ctx context.Context, repo *RemoteRef) (*Repository, error) {
......
......@@ -9,7 +9,7 @@ import (
"testing"
"time"
githubv3 "github.com/google/go-github/v36/github"
githubv3 "github.com/google/go-github/v37/github"
"github.com/shurcooL/githubv4"
"github.com/stretchr/testify/assert"
......@@ -171,11 +171,17 @@ func (m *mockRepositories) CompareCommits(ctx context.Context, owner, repo, base
return nil, nil, errors.New(problem)
}
returnstr := "behind"
return &githubv3.CommitsComparison{Status: &returnstr}, nil, nil
shaStr := "astdfsaohecra"
return &githubv3.CommitsComparison{Status: &returnstr,
Commits: []*githubv3.RepositoryCommit{
{SHA: &shaStr},
}}, nil, nil
}
func (m *mockRepositories) GetCommit(ctx context.Context, owner, repo, sha string) (*githubv3.RepositoryCommit, *githubv3.Response, error) {
file := "testfile.go"
message := "committing some changes (#1)"
authorLogin := "foobar"
if m.generalError {
return &githubv3.RepositoryCommit{}, &githubv3.Response{}, errors.New(problem)
}
......@@ -185,6 +191,12 @@ func (m *mockRepositories) GetCommit(ctx context.Context, owner, repo, sha strin
Filename: &file,
},
},
Commit: &githubv3.Commit{
Message: &message,
Author: &githubv3.CommitAuthor{
Login: &authorLogin,
},
},
}, &githubv3.Response{}, nil
}
......@@ -302,19 +314,19 @@ func TestGetUser(t *testing.T) {
var compareCommitsTests = []struct {
name string
errorText string
status githubv1.CommitCompareStatus
status string
generalError bool
mockRepo *mockRepositories
}{
{
name: "v3 error",
generalError: true,
errorText: "Could not get compare status",
errorText: "Could not get comparison",
mockRepo: &mockRepositories{generalError: true},
},
{
name: "happy path",
status: githubv1.CommitCompareStatus_BEHIND,
status: "behind",
mockRepo: &mockRepositories{},
},
}
......@@ -350,16 +362,22 @@ func TestCompareCommits(t *testing.T) {
return
}
a.Equal(comp.GetStatus(), tt.status)
a.NotNil(comp.Commits)
a.Nil(err)
})
}
}
var getCommitsTests = []struct {
name string
errorText string
mockRepo *mockRepositories
file string
name string
errorText string
mockRepo *mockRepositories
file string
message string
authorLogin string
authorAvatarURL string
authorID int64
parentRef string
}{
{
name: "v3 error",
......@@ -367,9 +385,13 @@ var getCommitsTests = []struct {
errorText: "we've had a problem",
},
{
name: "happy path",
mockRepo: &mockRepositories{},
file: "testfile.go",
name: "happy path",
mockRepo: &mockRepositories{},
file: "testfile.go",
message: "committing some changes (#1)",
authorAvatarURL: "https://foo.bar/baz.png",
authorID: 1234,
parentRef: "test",
},
}
......@@ -402,6 +424,14 @@ func TestGetCommit(t *testing.T) {
return
}
a.Equal(tt.file, *commit.Files[0].Filename)
a.Equal(tt.message, commit.Message)
if commit.Author != nil {
a.Equal(tt.authorAvatarURL, *commit.Author.AvatarURL)
a.Equal(tt.authorID, *commit.Author.ID)
}
if commit.ParentRef != "" {
a.Equal(tt.parentRef, commit.ParentRef)
}
a.Nil(err)
})
}
......
......@@ -3,7 +3,7 @@ package github
import (
"context"
githubv3 "github.com/google/go-github/v36/github"
githubv3 "github.com/google/go-github/v37/github"
"github.com/shurcooL/githubv4"
)
......
......@@ -13,8 +13,8 @@
"@docusaurus/preset-classic": "^2.0.0-alpha",
"classnames": "^2.2.6",
"prismjs": "^1.21.0",
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"remark-toc": "^7.0.0"
},
"browserslist": {
......
This diff is collapsed.
......@@ -37,7 +37,7 @@ syntax = "proto3";
package clutch.amiibo.v1;
option go_package = "amiibov1";
option go_package = "github.com/{path_to_gateway}/backend/api/amiibo/v1;amiibov1";
import "google/api/annotations.proto";
......@@ -74,7 +74,7 @@ syntax = "proto3";
package clutch.amiibo.v1;
option go_package = "amiibov1";
option go_package = "github.com/{path_to_gateway}/backend/api/amiibo/v1;amiibov1";
import "google/api/annotations.proto";
import "validate/validate.proto";
......
......@@ -53,7 +53,7 @@ syntax = "proto3";
package clutch.amiibo.v1;
option go_package = "amiibov1";
option go_package = "github.com/{path_to_gateway}/backend/api/amiibo/v1;amiibov1";
import "google/api/annotations.proto";
......@@ -75,7 +75,7 @@ syntax = "proto3";
package clutch.amiibo.v1;
option go_package = "amiibov1";
option go_package = "github.com/{path_to_gateway}/backend/api/amiibo/v1;amiibov1";
import "google/api/annotations.proto";
......@@ -108,7 +108,7 @@ syntax = "proto3";
package clutch.amiibo.v1;
option go_package = "amiibov1";
option go_package = "github.com/{path_to_gateway}/backend/api/amiibo/v1;amiibov1";
import "google/api/annotations.proto";
// highlight-next-line
......@@ -199,11 +199,11 @@ import (
"go.uber.org/zap"
"google.golang.org/grpc/status"
amiibov1 "github.com/lyft/clutch/backend/api/amiibo/v1"
amiibov1 "github.com/{path_to_gateway}/backend/api/amiibo/v1"
"github.com/lyft/clutch/backend/service"
)
const Name = "clutch.service.amiibo"
const Name = "gateway.service.amiibo"
const apiHost = "https://www.amiiboapi.com"
......@@ -291,16 +291,16 @@ import (
"github.com/uber-go/tally"
"go.uber.org/zap"
amiibov1 "github.com/lyft/clutch/backend/api/amiibo/v1"
amiibov1 "github.com/{path_to_gateway}/backend/api/amiibo/v1"
"github.com/lyft/clutch/backend/module"
"github.com/lyft/clutch/backend/service"
amiiboservice "github.com/lyft/clutch/backend/service/amiibo"
amiiboservice "github.com/{path_to_gateway}/backend/service/amiibo"
)
const Name = "clutch.module.amiibo"
const Name = "gateway.module.amiibo"
func New(*any.Any, *zap.Logger, tally.Scope) (module.Module, error) {
svc, ok := service.Registry["clutch.service.amiibo"]
svc, ok := service.Registry["gateway.service.amiibo"]
if !ok {
return nil, errors.New("no amiibo service was registered")
}
......@@ -344,8 +344,8 @@ import (
"github.com/lyft/clutch/backend/cmd/assets"
"github.com/lyft/clutch/backend/gateway"
// highlight-start
amiibomod "github.com/lyft/clutch/backend/module/amiibo"
amiiboservice "github.com/lyft/clutch/backend/service/amiibo"
amiibomod "github.com/{path_to_gateway}/module/amiibo"
amiiboservice "github.com/{path_to_gateway}/service/amiibo"
// highlight-end
)
......@@ -368,11 +368,11 @@ Add the components to the config.
services:
...
// highlight-next-line
- name: clutch.service.amiibo
- name: gateway.service.amiibo
modules:
...
// highlight-next-line
- name: clutch.module.amiibo
- name: gateway.module.amiibo
...
```
......
......@@ -37,7 +37,7 @@
"@material-ui/styles": "^4.11.4",
"axios": "^0.21.1",
"history": "^5.0.0",
"js-cookie": "^2.2.1",
"js-cookie": "^3.0.0",
"jwt-decode": "^3.0.0",
"lodash": "^4.17.15",
"material-table": "1.69.2",
......
......@@ -8,13 +8,18 @@ import Notifications from "./notifications";
import SearchField from "./search";
import { UserInformation } from "./user";
const APP_BAR_HEIGHT = "64px";
const AppBar = styled(MuiAppBar)({
minWidth: "fit-content",
background: "linear-gradient(90deg, #38106b 4.58%, #131c5f 89.31%)",
zIndex: 1201,
height: "64px",
height: APP_BAR_HEIGHT,
});
// Since the AppBar is fixed we need a div to take up its height in order to push other content down.
const ClearAppBar = styled.div({ height: APP_BAR_HEIGHT });
const Title = styled(Typography)({
margin: "12px 0px 12px 8px",
fontWeight: "bold",
......@@ -27,7 +32,7 @@ const Header: React.FC = () => {
return (
<>
<AppBar position="relative" elevation={0}>
<AppBar position="fixed" elevation={0}>
<Toolbar>
<Link to="/">
<Logo />
......@@ -42,6 +47,7 @@ const Header: React.FC = () => {
</Grid>
</Toolbar>
</AppBar>
<ClearAppBar />
</>
);
};
......
......@@ -25,7 +25,7 @@
"@babel/preset-typescript": "^7.13.0",
"@types/enzyme": "^3.10.8",
"@types/jest": "^26.0.22",
"@types/mocha": "^8.2.2",
"@types/mocha": "^9.0.0",
"@types/node": "^15.0.2",
"@types/react": "^17.0.5",
"@types/react-dom": "^17.0.3",
......@@ -35,7 +35,7 @@
"babel-eslint": "^10.0.3",
"babel-jest": "^26.6.0",
"babel-plugin-module-resolver": "^4.0.0",
"cypress": "7.7.0",
"cypress": "8.0.0",
"enzyme": "^3.11.0",
"esbuild": "^0.12.0",
"eslint": "^7.24.0",
......
import * as React from "react";
import type { ClutchError } from "@clutch-sh/core";
import { Card as ClutchCard, CardHeader, Error } from "@clutch-sh/core";
import { Grid } from "@material-ui/core";
interface CardProps {
avatar?: React.ReactNode;
title?: React.ReactNode & string;
error?: ClutchError;
children: React.ReactNode;
}
const Card = ({ avatar, title, error, children }: CardProps) => (
<Grid item xs={12} sm={7}>
<ClutchCard>
<CardHeader avatar={avatar} title={title} />
{error ? <Error subject={error} /> : children}
</ClutchCard>
</Grid>
);
export default Card;
......@@ -22,6 +22,6 @@ export const useDashUpdater = (): useDashUpdaterReturn => {
};
};
export const useDashState = () => {
return React.useContext(DashStateContext);
export const useDashState = (): DashState => {
return React.useContext<DashState>(DashStateContext);
};
Supports Markdown
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