Update R package version to 2.6.0
[arvados.git] / lib / controller / router / router.go
index 72e5ab3108432a25e5d213681eff0e9c29aafab9..2cbd9b88dc9ae0dcb09861ad8d78dbb4c5c34c5c 100644 (file)
@@ -223,6 +223,13 @@ func (rtr *router) addRoutes() {
                                return rtr.backend.ContainerSSH(ctx, *opts.(*arvados.ContainerSSHOptions))
                        },
                },
+               {
+                       arvados.EndpointContainerSSHCompat,
+                       func() interface{} { return &arvados.ContainerSSHOptions{} },
+                       func(ctx context.Context, opts interface{}) (interface{}, error) {
+                               return rtr.backend.ContainerSSH(ctx, *opts.(*arvados.ContainerSSHOptions))
+                       },
+               },
                {
                        // arvados-client built before commit
                        // bdc29d3129f6d75aa9ce0a24ffb849a272b06f08
@@ -241,6 +248,13 @@ func (rtr *router) addRoutes() {
                                return rtr.backend.ContainerGatewayTunnel(ctx, *opts.(*arvados.ContainerGatewayTunnelOptions))
                        },
                },
+               {
+                       arvados.EndpointContainerGatewayTunnelCompat,
+                       func() interface{} { return &arvados.ContainerGatewayTunnelOptions{} },
+                       func(ctx context.Context, opts interface{}) (interface{}, error) {
+                               return rtr.backend.ContainerGatewayTunnel(ctx, *opts.(*arvados.ContainerGatewayTunnelOptions))
+                       },
+               },
                {
                        arvados.EndpointContainerRequestCreate,
                        func() interface{} { return &arvados.CreateOptions{} },
@@ -662,11 +676,8 @@ func (rtr *router) addRoute(endpoint arvados.APIEndpoint, defaultOpts func() int
                }
                ctx := auth.NewContext(req.Context(), creds)
                ctx = arvados.ContextWithRequestID(ctx, req.Header.Get("X-Request-Id"))
-               logger.WithFields(logrus.Fields{
-                       "apiEndpoint": endpoint,
-                       "apiOptsType": fmt.Sprintf("%T", opts),
-                       "apiOpts":     opts,
-               }).Debug("exec")
+               req = req.WithContext(ctx)
+
                // Extract the token UUIDs (or a placeholder for v1 tokens)
                var tokenUUIDs []string
                for _, t := range creds.Tokens {
@@ -683,7 +694,13 @@ func (rtr *router) addRoute(endpoint arvados.APIEndpoint, defaultOpts func() int
                                tokenUUIDs = append(tokenUUIDs, "v1 token ending in "+end)
                        }
                }
-               httpserver.SetResponseLogFields(req.Context(), logrus.Fields{"tokenUUIDs": tokenUUIDs})
+               httpserver.SetResponseLogFields(ctx, logrus.Fields{"tokenUUIDs": tokenUUIDs})
+
+               logger.WithFields(logrus.Fields{
+                       "apiEndpoint": endpoint,
+                       "apiOptsType": fmt.Sprintf("%T", opts),
+                       "apiOpts":     opts,
+               }).Debug("exec")
                resp, err := exec(ctx, opts)
                if err != nil {
                        logger.WithError(err).Debugf("returning error type %T", err)