From dfd7ad8b37027996c6bfcffbbb37e03ab62d2f12 Mon Sep 17 00:00:00 2001 From: Danny Canter Date: Fri, 23 Jun 2023 05:42:44 -0700 Subject: [PATCH] Reword Windows file related TODO https://github.com/golang/go/issues/32088 was never accepted or implemented in 1.14. Signed-off-by: Danny Canter --- pkg/cri/sbserver/helpers_windows.go | 5 ++++- pkg/cri/server/helpers_windows.go | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/cri/sbserver/helpers_windows.go b/pkg/cri/sbserver/helpers_windows.go index aa44299d0..808a95e75 100644 --- a/pkg/cri/sbserver/helpers_windows.go +++ b/pkg/cri/sbserver/helpers_windows.go @@ -28,7 +28,10 @@ import ( // openLogFile opens/creates a container log file. // It specifies `FILE_SHARE_DELETE` option to make sure // log files can be rotated by kubelet. -// TODO(windows): Use golang support after 1.14. (https://github.com/golang/go/issues/32088) +// +// Unfortunately this needs to be maintained as Go doesn't +// have a way to set FILE_SHARE_DELETE for os.OpenFile. +// https://github.com/golang/go/issues/32088 func openLogFile(path string) (*os.File, error) { path = fixLongPath(path) if len(path) == 0 { diff --git a/pkg/cri/server/helpers_windows.go b/pkg/cri/server/helpers_windows.go index 1b8940129..d0a5b6f7f 100644 --- a/pkg/cri/server/helpers_windows.go +++ b/pkg/cri/server/helpers_windows.go @@ -28,7 +28,10 @@ import ( // openLogFile opens/creates a container log file. // It specifies `FILE_SHARE_DELETE` option to make sure // log files can be rotated by kubelet. -// TODO(windows): Use golang support after 1.14. (https://github.com/golang/go/issues/32088) +// +// Unfortunately this needs to be maintained as Go doesn't +// have a way to set FILE_SHARE_DELETE for os.OpenFile. +// https://github.com/golang/go/issues/32088 func openLogFile(path string) (*os.File, error) { path = fixLongPath(path) if len(path) == 0 {