From 98b501876d59bd340a3be9acf1c0e43867d3be61 Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Mon, 14 Oct 2024 17:34:36 +0900 Subject: [PATCH] name context --- .../user_services_functions/copy_files_from_user_service.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/user_services_functions/copy_files_from_user_service.go b/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/user_services_functions/copy_files_from_user_service.go index 62677dad04..63d2c2526f 100644 --- a/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/user_services_functions/copy_files_from_user_service.go +++ b/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/user_services_functions/copy_files_from_user_service.go @@ -26,7 +26,7 @@ func CopyFilesFromUserService( output io.Writer, dockerManager *docker_manager.DockerManager, ) error { - ctx = context.WithoutCancel(ctx) + ctxWithoutCancel := context.WithoutCancel(ctx) srcPath := srcPathOnContainer srcPathBase := filepath.Base(srcPathOnContainer) @@ -36,13 +36,13 @@ func CopyFilesFromUserService( } logrus.Debugf("Copying contents from the src path: %v and base %v", srcPath, srcPathBase) - _, serviceDockerResources, err := getSingleUserServiceObjAndResourcesNoMutex(ctx, enclaveId, serviceUuid, dockerManager) + _, serviceDockerResources, err := getSingleUserServiceObjAndResourcesNoMutex(ctxWithoutCancel, enclaveId, serviceUuid, dockerManager) if err != nil { return stacktrace.Propagate(err, "An error occurred getting user service with UUID '%v' in enclave with ID '%v'", serviceUuid, enclaveId) } container := serviceDockerResources.ServiceContainer - tarStreamReadCloser, err := dockerManager.CopyFromContainer(ctx, container.GetId(), srcPath) + tarStreamReadCloser, err := dockerManager.CopyFromContainer(ctxWithoutCancel, container.GetId(), srcPath) if err != nil { return stacktrace.Propagate( err,