From 4d890232e42c73cc81c4fc62a0fd21b1e4bc9e78 Mon Sep 17 00:00:00 2001 From: retornam Date: Fri, 6 Jun 2025 10:11:13 -0700 Subject: [PATCH] fix: update Github docker actions Update all the Github actions to their latest versions. Signed-off-by: Raymond Etornam --- .gitattributes | 1 + .github/workflows/release.yml | 8 ++++---- go.mod | 4 ++-- go.sum | 4 ++-- vendor/github.com/golang/glog/glog.go | 23 ++++++++++++++++++++--- vendor/modules.txt | 2 +- 6 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..7c486a5e --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +vendor/* linguist-generated=true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2ff2af8..25a9430e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,14 +43,14 @@ jobs: echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to the container registry if: github.event_name != 'pull_request' - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: quay.io username: ${{ secrets.REGISTRY_USERNAME }} @@ -58,7 +58,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile.multiarch diff --git a/go.mod b/go.mod index 5cab59d3..a1b2ff4e 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/kubernetes-sigs/nfs-subdir-external-provisioner -go 1.19 +go 1.25 require ( - github.com/golang/glog v1.2.4 + github.com/golang/glog v1.2.5 k8s.io/api v0.23.4 k8s.io/apimachinery v0.23.4 k8s.io/client-go v0.23.4 diff --git a/go.sum b/go.sum index 7a7b2e67..32f7c102 100644 --- a/go.sum +++ b/go.sum @@ -101,8 +101,8 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me 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 v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc= -github.com/golang/glog v1.2.4/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I= +github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= diff --git a/vendor/github.com/golang/glog/glog.go b/vendor/github.com/golang/glog/glog.go index 1b632e07..c8bebc3b 100644 --- a/vendor/github.com/golang/glog/glog.go +++ b/vendor/github.com/golang/glog/glog.go @@ -238,6 +238,8 @@ func ctxlogf(ctx context.Context, depth int, severity logsink.Severity, verbose metaPool.Put(metai) } +var sinkErrOnce sync.Once + func sinkf(meta *logsink.Meta, format string, args ...any) { meta.Depth++ n, err := logsink.Printf(meta, format, args...) @@ -247,9 +249,20 @@ func sinkf(meta *logsink.Meta, format string, args ...any) { } if err != nil { - logsink.Printf(meta, "glog: exiting because of error: %s", err) - sinks.file.Flush() - os.Exit(2) + // Best-effort to generate a reasonable Fatalf-like + // error message in all sinks that are still here for + // the first goroutine that comes here and terminate + // the process. + sinkErrOnce.Do(func() { + m := &logsink.Meta{} + m.Time = timeNow() + m.Severity = logsink.Fatal + m.Thread = int64(pid) + _, m.File, m.Line, _ = runtime.Caller(0) + format, args := appendBacktrace(1, "log: exiting because of error writing previous log to sinks: %v", []any{err}) + logsink.Printf(m, format, args...) + flushAndAbort() + }) } } @@ -642,6 +655,10 @@ func ErrorContextDepthf(ctx context.Context, depth int, format string, args ...a func ctxfatalf(ctx context.Context, depth int, format string, args ...any) { ctxlogf(ctx, depth+1, logsink.Fatal, false, withStack, format, args...) + flushAndAbort() +} + +func flushAndAbort() { sinks.file.Flush() err := abortProcess() // Should not return. diff --git a/vendor/modules.txt b/vendor/modules.txt index 8c4de3dc..f4652e24 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -14,7 +14,7 @@ github.com/go-logr/logr ## explicit; go 1.15 github.com/gogo/protobuf/proto github.com/gogo/protobuf/sortkeys -# github.com/golang/glog v1.2.4 +# github.com/golang/glog v1.2.5 ## explicit; go 1.19 github.com/golang/glog github.com/golang/glog/internal/logsink