diff --git a/services/cd-service/pkg/interceptors/interceptors.go b/services/cd-service/pkg/interceptors/interceptors.go index c7245886f..03846f111 100644 --- a/services/cd-service/pkg/interceptors/interceptors.go +++ b/services/cd-service/pkg/interceptors/interceptors.go @@ -41,7 +41,7 @@ func UnaryUserContextInterceptor(ctx context.Context, return nil, err } ctx = auth.WriteUserToContext(ctx, *user) - + ctx = context.WithoutCancel(ctx) h, err := handler(ctx, req) return h, err } diff --git a/services/frontend-service/pkg/handler/releasetrain.go b/services/frontend-service/pkg/handler/releasetrain.go index 8029ca3ad..e9918c6b1 100644 --- a/services/frontend-service/pkg/handler/releasetrain.go +++ b/services/frontend-service/pkg/handler/releasetrain.go @@ -36,7 +36,6 @@ func (s Server) handleReleaseTrainExecution(w http.ResponseWriter, req *http.Req } queryParams := req.URL.Query() teamParam := queryParams.Get("team") - if s.AzureAuth { if req.Body == nil { w.WriteHeader(http.StatusBadRequest) diff --git a/services/frontend-service/pkg/interceptors/interceptors.go b/services/frontend-service/pkg/interceptors/interceptors.go index 530fc6230..72b0d9b54 100644 --- a/services/frontend-service/pkg/interceptors/interceptors.go +++ b/services/frontend-service/pkg/interceptors/interceptors.go @@ -156,7 +156,8 @@ func DexLoginInterceptor( http.Redirect(w, req, auth.LoginPATH, http.StatusFound) return } - req = req.WithContext(httpCtx) + noCancelCtx := context.WithoutCancel(httpCtx) + req = req.WithContext(noCancelCtx) httpHandler(w, req) } diff --git a/services/frontend-service/pkg/service/batch.go b/services/frontend-service/pkg/service/batch.go index 00e01c64d..5e2365bdc 100644 --- a/services/frontend-service/pkg/service/batch.go +++ b/services/frontend-service/pkg/service/batch.go @@ -36,5 +36,6 @@ func (b *BatchServiceWithDefaultTimeout) ProcessBatch(ctx context.Context, req * ctx, cancel = context.WithTimeout(ctx, b.DefaultTimeout) defer cancel() } + ctx = context.WithoutCancel(ctx) return b.Inner.ProcessBatch(ctx, req, options...) }