diff --git a/packages/envd/internal/api/init.go b/packages/envd/internal/api/init.go index 0fde762a8f..d2ebe4bed0 100644 --- a/packages/envd/internal/api/init.go +++ b/packages/envd/internal/api/init.go @@ -177,7 +177,7 @@ func (a *API) PostInit(w http.ResponseWriter, r *http.Request) { } } - go func() { //nolint:contextcheck // TODO: fix this later + go func() { //nolint:contextcheck // MMDS re-poll must outlive the /init HTTP response, so it can't derive from r.Context ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second) defer cancel() host.PollForMMDSOpts(ctx, a.mmdsChan, a.defaults.EnvVars) diff --git a/packages/envd/internal/services/process/start.go b/packages/envd/internal/services/process/start.go index e00cbb2ef8..7333c5860d 100644 --- a/packages/envd/internal/services/process/start.go +++ b/packages/envd/internal/services/process/start.go @@ -43,7 +43,7 @@ func (s *Service) handleStart(ctx context.Context, req *connect.Request[rpc.Star procCtx, cancelProc = context.WithTimeout(procCtx, requestTimeout) } - proc, err := handler.New( //nolint:contextcheck // TODO: fix this later + proc, err := handler.New( //nolint:contextcheck // procCtx is intentionally decoupled from the request ctx so the process outlives the RPC (see comment above) procCtx, u, req.Msg,