mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-22 00:38:38 +00:00
Implement workaround for https://github.com/golang/go/issues/21955 (#256)
This commit is contained in:
parent
423fe3487c
commit
54835a0d93
7 changed files with 143 additions and 60 deletions
|
|
@ -113,7 +113,7 @@ func request_ApplicationService_Create_0(ctx context.Context, marshaler runtime.
|
|||
var protoReq ApplicationCreateRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Application); err != nil && err != io.EOF {
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Application); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ func request_ApplicationService_Update_0(ctx context.Context, marshaler runtime.
|
|||
var protoReq ApplicationUpdateRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Application); err != nil && err != io.EOF {
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Application); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
@ -223,7 +223,7 @@ func request_ApplicationService_UpdateSpec_0(ctx context.Context, marshaler runt
|
|||
var protoReq ApplicationUpdateSpecRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Spec); err != nil && err != io.EOF {
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Spec); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
@ -289,7 +289,7 @@ func request_ApplicationService_Sync_0(ctx context.Context, marshaler runtime.Ma
|
|||
var protoReq ApplicationSyncRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
@ -320,7 +320,7 @@ func request_ApplicationService_Rollback_0(ctx context.Context, marshaler runtim
|
|||
var protoReq ApplicationRollbackRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ func request_ClusterService_Create_0(ctx context.Context, marshaler runtime.Mars
|
|||
var protoReq ClusterCreateRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Cluster); err != nil && err != io.EOF {
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Cluster); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ func request_ClusterService_Update_0(ctx context.Context, marshaler runtime.Mars
|
|||
var protoReq ClusterUpdateRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Cluster); err != nil && err != io.EOF {
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Cluster); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2007,50 +2007,51 @@ var (
|
|||
func init() { proto.RegisterFile("server/repository/repository.proto", fileDescriptorRepository) }
|
||||
|
||||
var fileDescriptorRepository = []byte{
|
||||
// 716 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0x96, 0x93, 0x36, 0xa2, 0x9b, 0xaa, 0xb4, 0x4b, 0xa9, 0x2c, 0x93, 0xa6, 0xd5, 0xc2, 0xa1,
|
||||
0x20, 0x6a, 0xd3, 0xc0, 0xa1, 0x2a, 0x27, 0x4a, 0xab, 0xaa, 0x2a, 0x07, 0x70, 0x55, 0x24, 0x38,
|
||||
0x50, 0xb9, 0xce, 0xc8, 0x35, 0x49, 0x76, 0x97, 0xdd, 0x8d, 0xa5, 0x08, 0xf5, 0xc2, 0x01, 0x71,
|
||||
0x86, 0x3b, 0x77, 0x1e, 0x80, 0x77, 0xe0, 0x88, 0xc4, 0x81, 0x2b, 0xaa, 0x78, 0x10, 0xb4, 0x6b,
|
||||
0x27, 0x71, 0x9a, 0x9f, 0x53, 0xc4, 0x6d, 0x76, 0xf6, 0x9b, 0x99, 0xcf, 0xdf, 0xcc, 0xac, 0x11,
|
||||
0x91, 0x20, 0x12, 0x10, 0x9e, 0x00, 0xce, 0x64, 0xac, 0x98, 0xe8, 0xe4, 0x4c, 0x97, 0x0b, 0xa6,
|
||||
0x18, 0x46, 0x7d, 0x8f, 0xb3, 0x1c, 0xb1, 0x88, 0x19, 0xb7, 0xa7, 0xad, 0x14, 0xe1, 0x54, 0x22,
|
||||
0xc6, 0xa2, 0x26, 0x78, 0x01, 0x8f, 0xbd, 0x80, 0x52, 0xa6, 0x02, 0x15, 0x33, 0x2a, 0xb3, 0x5b,
|
||||
0xd2, 0xd8, 0x96, 0x6e, 0xcc, 0xcc, 0x6d, 0xc8, 0x04, 0x78, 0xc9, 0x96, 0x17, 0x01, 0x05, 0x11,
|
||||
0x28, 0xa8, 0x67, 0x98, 0xc3, 0x28, 0x56, 0xe7, 0xed, 0x33, 0x37, 0x64, 0x2d, 0x2f, 0x10, 0xa6,
|
||||
0xc4, 0x5b, 0x63, 0x6c,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,
|
||||
0x00, 0x00, 0xff, 0xff, 0xb9, 0x5d, 0xa7, 0x8a, 0xcb, 0x07, 0x00, 0x00,
|
||||
// 721 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x4d, 0x6f, 0xd3, 0x4c,
|
||||
0x10, 0x96, 0x93, 0x36, 0x7a, 0xbb, 0xa9, 0xfa, 0xb6, 0xfb, 0xf6, 0xad, 0x2c, 0x93, 0xa6, 0xd5,
|
||||
0x56, 0x48, 0xe5, 0xa3, 0x36, 0x0d, 0x1c, 0xaa, 0x72, 0xa2, 0xb4, 0xaa, 0xaa, 0x72, 0x00, 0x57,
|
||||
0x45, 0x82, 0x03, 0x95, 0xeb, 0x8c, 0x5c, 0x93, 0x64, 0x77, 0xd9, 0xdd, 0x58, 0x8a, 0x50, 0x2f,
|
||||
0x1c, 0x10, 0x67, 0xb8, 0x73, 0xe7, 0x3f, 0xf0, 0x03, 0x38, 0x22, 0x71, 0xe0, 0x8a, 0x2a, 0x7e,
|
||||
0x08, 0xda, 0xb5, 0x93, 0x38, 0xcd, 0xc7, 0x29, 0xe2, 0x36, 0x3b, 0xfb, 0xcc, 0xcc, 0xe3, 0x67,
|
||||
0x66, 0xd6, 0x88, 0x48, 0x10, 0x09, 0x08, 0x4f, 0x00, 0x67, 0x32, 0x56, 0x4c, 0x74, 0x72, 0xa6,
|
||||
0xcb, 0x05, 0x53, 0x0c, 0xa3, 0xbe, 0xc7, 0x59, 0x8e, 0x58, 0xc4, 0x8c, 0xdb, 0xd3, 0x56, 0x8a,
|
||||
0x70, 0x2a, 0x11, 0x63, 0x51, 0x13, 0xbc, 0x80, 0xc7, 0x5e, 0x40, 0x29, 0x53, 0x81, 0x8a, 0x19,
|
||||
0x95, 0xd9, 0x2d, 0x69, 0xec, 0x48, 0x37, 0x66, 0xe6, 0x36, 0x64, 0x02, 0xbc, 0x64, 0xdb, 0x8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xbf, 0x5d, 0x55, 0xad, 0xef, 0x57,
|
||||
0x55, 0xeb, 0xd7, 0x55, 0xd5, 0x7a, 0xb9, 0x35, 0xe9, 0x97, 0x38, 0xf4, 0xdb, 0x3e, 0x2f, 0x99,
|
||||
0xbf, 0xdf, 0xfd, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x1c, 0x99, 0xd2, 0xd2, 0x07, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,13 +46,31 @@ func request_RepositoryService_List_0(ctx context.Context, marshaler runtime.Mar
|
|||
}
|
||||
|
||||
var (
|
||||
filter_RepositoryService_ListKsonnetApps_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
filter_RepositoryService_ListKsonnetApps_0 = &utilities.DoubleArray{Encoding: map[string]int{"repo": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
||||
)
|
||||
|
||||
func request_RepositoryService_ListKsonnetApps_0(ctx context.Context, marshaler runtime.Marshaler, client RepositoryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq RepoKsonnetQuery
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["repo"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "repo")
|
||||
}
|
||||
|
||||
protoReq.Repo, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "repo", err)
|
||||
}
|
||||
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_RepositoryService_ListKsonnetApps_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
|
@ -66,7 +84,7 @@ func request_RepositoryService_Create_0(ctx context.Context, marshaler runtime.M
|
|||
var protoReq RepoCreateRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Repo); err != nil && err != io.EOF {
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Repo); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +124,7 @@ func request_RepositoryService_Update_0(ctx context.Context, marshaler runtime.M
|
|||
var protoReq RepoUpdateRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Repo); err != nil && err != io.EOF {
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Repo); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
@ -378,7 +396,7 @@ func RegisterRepositoryServiceHandlerClient(ctx context.Context, mux *runtime.Se
|
|||
var (
|
||||
pattern_RepositoryService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "repositories"}, ""))
|
||||
|
||||
pattern_RepositoryService_ListKsonnetApps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "repositories", "ksonnet"}, ""))
|
||||
pattern_RepositoryService_ListKsonnetApps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "repositories", "repo", "ksonnet"}, ""))
|
||||
|
||||
pattern_RepositoryService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "repositories"}, ""))
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ service RepositoryService {
|
|||
|
||||
// ListKsonnetApps returns list of Ksonnet apps in the repo
|
||||
rpc ListKsonnetApps(RepoKsonnetQuery) returns (RepoKsonnetResponse) {
|
||||
option (google.api.http).get = "/api/v1/repositories/ksonnet";
|
||||
option (google.api.http).get = "/api/v1/repositories/{repo}/ksonnet";
|
||||
}
|
||||
|
||||
// Create creates a repo
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
|
@ -277,6 +278,7 @@ func (a *ArgoCDServer) newGRPCServer() *grpc.Server {
|
|||
grpc_util.PanicLoggerStreamServerInterceptor(a.log),
|
||||
)))
|
||||
sOpts = append(sOpts, grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
|
||||
bug21955WorkaroundInterceptor,
|
||||
grpc_logrus.UnaryServerInterceptor(a.log),
|
||||
grpc_auth.UnaryServerInterceptor(a.authenticate),
|
||||
grpc_util.ErrorCodeUnaryServerInterceptor(),
|
||||
|
|
@ -322,7 +324,7 @@ func (a *ArgoCDServer) newHTTPServer(ctx context.Context, port int) *http.Server
|
|||
mux := http.NewServeMux()
|
||||
httpS := http.Server{
|
||||
Addr: endpoint,
|
||||
Handler: mux,
|
||||
Handler: &bug21955Workaround{handler: mux},
|
||||
}
|
||||
var dOpts []grpc.DialOption
|
||||
if a.useTLS() {
|
||||
|
|
@ -469,3 +471,65 @@ func getToken(md metadata.MD) string {
|
|||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Workaround for https://github.com/golang/go/issues/21955 to support escaped URLs in URL path.
|
||||
type bug21955Workaround struct {
|
||||
handler http.Handler
|
||||
}
|
||||
|
||||
func (bf *bug21955Workaround) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
paths := map[string][]string{
|
||||
"/api/v1/repositories/": {"ksonnet"},
|
||||
"/api/v1/clusters/": {},
|
||||
}
|
||||
for path, subPaths := range paths {
|
||||
if strings.Index(r.URL.Path, path) > -1 {
|
||||
postfix := ""
|
||||
for _, subPath := range subPaths {
|
||||
if strings.LastIndex(r.URL.Path, subPath) == len(r.URL.Path)-len(subPath) {
|
||||
postfix = "/" + subPath
|
||||
r.URL.Path = r.URL.Path[0 : len(r.URL.Path)-len(subPath)-1]
|
||||
break
|
||||
}
|
||||
}
|
||||
r.URL.Path = path + url.QueryEscape(r.URL.Path[len(path):]) + postfix
|
||||
break
|
||||
}
|
||||
}
|
||||
bf.handler.ServeHTTP(w, r)
|
||||
}
|
||||
|
||||
func bug21955WorkaroundInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
|
||||
if rq, ok := req.(*repository.RepoQuery); ok {
|
||||
repo, err := url.QueryUnescape(rq.Repo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
rq.Repo = repo
|
||||
} else if rk, ok := req.(*repository.RepoKsonnetQuery); ok {
|
||||
repo, err := url.QueryUnescape(rk.Repo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
rk.Repo = repo
|
||||
} else if ru, ok := req.(*repository.RepoUpdateRequest); ok {
|
||||
repo, err := url.QueryUnescape(ru.Repo.Repo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ru.Repo.Repo = repo
|
||||
} else if cq, ok := req.(*cluster.ClusterQuery); ok {
|
||||
server, err := url.QueryUnescape(cq.Server)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cq.Server = server
|
||||
} else if cu, ok := req.(*cluster.ClusterUpdateRequest); ok {
|
||||
server, err := url.QueryUnescape(cu.Cluster.Server)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cu.Cluster.Server = server
|
||||
}
|
||||
return handler(ctx, req)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ func request_SessionService_Create_0(ctx context.Context, marshaler runtime.Mars
|
|||
var protoReq SessionCreateRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue