From b58e6d44e045cca27e1f637b0bfd76f964ff9e98 Mon Sep 17 00:00:00 2001 From: Hidetake Iwata Date: Tue, 24 Sep 2024 14:32:36 +0900 Subject: [PATCH] Add comment --- pkg/tokencache/repository/repository.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/tokencache/repository/repository.go b/pkg/tokencache/repository/repository.go index 529cd027..7c176c30 100644 --- a/pkg/tokencache/repository/repository.go +++ b/pkg/tokencache/repository/repository.go @@ -91,6 +91,8 @@ func (r *Repository) Lock(tokenCacheDir string, key tokencache.Key) (io.Closer, if err != nil { return nil, fmt.Errorf("could not compute the key: %w", err) } + // Do not lock the token cache file. + // https://github.com/int128/kubelogin/issues/1144 lockFilepath := filepath.Join(tokenCacheDir, keyDigest+".lock") lockFile := flock.New(lockFilepath) if err := lockFile.Lock(); err != nil {