From a1887ec32f04be89b9c678c7ee41c11eb33a7bc0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 14:48:46 +0000 Subject: [PATCH] Bump github.com/golang/glog from 1.2.0 to 1.2.1 Bumps [github.com/golang/glog](https://github.com/golang/glog) from 1.2.0 to 1.2.1. - [Release notes](https://github.com/golang/glog/releases) - [Commits](https://github.com/golang/glog/compare/v1.2.0...v1.2.1) --- updated-dependencies: - dependency-name: github.com/golang/glog dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/golang/glog/glog_file.go | 25 ++++++++++++++-------- vendor/modules.txt | 2 +- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index d7a115d..bdb3e60 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/boxboat/grypeadmissioncontroller go 1.20 require ( - github.com/golang/glog v1.2.0 + github.com/golang/glog v1.2.1 k8s.io/api v0.29.1 k8s.io/apimachinery v0.29.1 ) diff --git a/go.sum b/go.sum index f96b067..0191a67 100644 --- a/go.sum +++ b/go.sum @@ -5,8 +5,8 @@ github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= diff --git a/vendor/github.com/golang/glog/glog_file.go b/vendor/github.com/golang/glog/glog_file.go index e7d125c..a1551db 100644 --- a/vendor/github.com/golang/glog/glog_file.go +++ b/vendor/github.com/golang/glog/glog_file.go @@ -369,9 +369,6 @@ func (s *fileSink) Flush() error { // flush flushes all logs of severity threshold or greater. func (s *fileSink) flush(threshold logsink.Severity) error { - s.mu.Lock() - defer s.mu.Unlock() - var firstErr error updateErr := func(err error) { if err != nil && firstErr == nil { @@ -379,13 +376,23 @@ func (s *fileSink) flush(threshold logsink.Severity) error { } } - // Flush from fatal down, in case there's trouble flushing. - for sev := logsink.Fatal; sev >= threshold; sev-- { - file := s.file[sev] - if file != nil { - updateErr(file.Flush()) - updateErr(file.Sync()) + // Remember where we flushed, so we can call sync without holding + // the lock. + var files []flushSyncWriter + func() { + s.mu.Lock() + defer s.mu.Unlock() + // Flush from fatal down, in case there's trouble flushing. + for sev := logsink.Fatal; sev >= threshold; sev-- { + if file := s.file[sev]; file != nil { + updateErr(file.Flush()) + files = append(files, file) + } } + }() + + for _, file := range files { + updateErr(file.Sync()) } return firstErr diff --git a/vendor/modules.txt b/vendor/modules.txt index 376f8e9..d018e5d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -6,7 +6,7 @@ github.com/go-logr/logr/slogr ## explicit; go 1.15 github.com/gogo/protobuf/proto github.com/gogo/protobuf/sortkeys -# github.com/golang/glog v1.2.0 +# github.com/golang/glog v1.2.1 ## explicit; go 1.19 github.com/golang/glog github.com/golang/glog/internal/logsink