Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of dependency updates and docs for v0.56.12 #1861

Merged
merged 9 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/ci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,36 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: golangci-lint run
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.45
version: v1.50
skip-pkg-cache: true
skip-build-cache: true
args: --timeout=2m0s -v
bash-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run Shellcheck
uses: azohra/shell-linter@v0.4.0
uses: azohra/shell-linter@v0.6.0
with:
severity: "error"
go-mod-tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.15
go-version: 1.19
- name: go mod tidy
run: |
./scripts/ci/check_go_modules.sh
sync-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: sync readme
run: |
./scripts/ci/check_readme_in_sync.sh
42 changes: 21 additions & 21 deletions .github/workflows/ci-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
unit-test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run unit tests
env:
VERBOSE: true
Expand All @@ -13,9 +13,9 @@ jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Show history for debug help
Expand All @@ -32,7 +32,7 @@ jobs:
source ./scripts/build.sh
save_images_to_tar
- name: Save artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: sonobuoy-build-linux-${{ github.run_id }}
path: |
Expand All @@ -42,12 +42,12 @@ jobs:
needs: [integration-test-on-kind]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
Expand All @@ -61,15 +61,15 @@ jobs:
build_binary_GOOS_GOARCH windows amd64
windows_containers
- name: Save artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: sonobuoy-build-windows-${{ github.run_id }}
path: |
build
stress-test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run stress tests
env:
VERBOSE: true
Expand All @@ -80,7 +80,7 @@ jobs:
needs: [build-linux, unit-test-linux]
steps:
- name: Download binaries and prebuilt images
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: sonobuoy-build-linux-${{ github.run_id }}
path: build
Expand All @@ -96,7 +96,7 @@ jobs:
runs-on: ubuntu-latest
needs: [build-linux, unit-test-linux]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Show history for debug help
Expand All @@ -108,7 +108,7 @@ jobs:
clean
setup_kind_cluster
- name: Download binaries and prebuilt images
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: sonobuoy-build-linux-${{ github.run_id }}
path: build
Expand All @@ -130,7 +130,7 @@ jobs:
VERBOSE=true SONOBUOY_CLI=../../build/linux/amd64/sonobuoy integration
- name: Save artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: sonobuoy-test-archives-${{ github.run_id }}
path: |
Expand All @@ -140,14 +140,14 @@ jobs:
runs-on: ubuntu-latest
needs: [build-linux, build-windows, unit-test-linux, integration-test-on-kind, stress-test-linux]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Download binaries and prebuilt images
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: sonobuoy-build-linux-${{ github.run_id }}
path: build
- name: Download binaries and prebuilt images
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: sonobuoy-build-windows-${{ github.run_id }}
path: build
Expand All @@ -159,7 +159,7 @@ jobs:
docker load -i build/linux/s390x/sonobuoy-img-linux-s390x-${{ github.run_id }}.tar
docker image ls
- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -176,15 +176,15 @@ jobs:
needs: [push-images]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -48,7 +48,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -62,4 +62,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
6 changes: 3 additions & 3 deletions .github/workflows/k8sRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
- name: Check for release
id: release-check
run: |
echo ::set-output name=wasRelease::$(curl -s https://api.github.com/repos/kubernetes/kubernetes/releases/latest | jq -r '.published_at|fromdateiso8601 > now-86400')
echo wasRelease=$(curl -s https://api.github.com/repos/kubernetes/kubernetes/releases/latest | jq -r '.published_at|fromdateiso8601 > now-86400') >> $GITHUB_OUTPUT
- name: Create issue
if: steps.release-check.outputs.wasRelease == 'true'
if: ${{ steps.release-check.outputs.wasRelease }} == 'true'
uses: imjohnbo/issue-bot@v3
with:
labels: "kind/required"
title: "Notice of K8s Release"
body: |-
A Kubernetes release was detected as having occurred in the last 24h. The ./scripts/gather_e2e_data.sh script should be run and Sonobuoy tested against the new release.
A Kubernetes release was detected as having occurred in the last 24h. The ./scripts/gather_e2e_data.sh script should be run and Sonobuoy tested against the new release.
3 changes: 1 addition & 2 deletions cmd/sonobuoy/app/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package app

import (
"fmt"
"io/ioutil"
"os"
"time"

Expand Down Expand Up @@ -213,7 +212,7 @@ func NewCmdGen() *cobra.Command {
func genManifest(genflags *genFlags) func(cmd *cobra.Command, args []string) {
return func(cmd *cobra.Command, args []string) {
if len(genflags.genFile) > 0 {
b, err := ioutil.ReadFile(genflags.genFile)
b, err := os.ReadFile(genflags.genFile)
if err != nil {
errlog.LogError(err)
os.Exit(1)
Expand Down
6 changes: 3 additions & 3 deletions cmd/sonobuoy/app/gen_plugin_def_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package app
import (
"bytes"
"flag"
"io/ioutil"
"os"
"testing"

"github.com/vmware-tanzu/sonobuoy/pkg/plugin/manifest"
Expand Down Expand Up @@ -143,9 +143,9 @@ func TestPluginGenDef(t *testing.T) {
}

if *update {
ioutil.WriteFile(tC.expectFile, []byte(manifest), 0666)
os.WriteFile(tC.expectFile, []byte(manifest), 0666)
} else {
fileData, err := ioutil.ReadFile(tC.expectFile)
fileData, err := os.ReadFile(tC.expectFile)
if err != nil {
t.Fatalf("Failed to read golden file %v: %v", tC.expectFile, err)
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/sonobuoy/app/images_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ limitations under the License.
package app

import (
"io/ioutil"
"os"
"testing"

Expand All @@ -35,7 +34,7 @@ sigStorageRegistry: test-fake-registry.corp/fake-user
`

func sampleE2eRegistryConfig() (string, error) {
configFile, err := ioutil.TempFile("", "e2eRegistryConfig.yaml")
configFile, err := os.CreateTemp("", "e2eRegistryConfig.yaml")
if err != nil {
return "", err
}
Expand Down
5 changes: 2 additions & 3 deletions cmd/sonobuoy/app/pluginList.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package app
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"os"
Expand Down Expand Up @@ -169,7 +168,7 @@ func (p *pluginList) loadPluginsFromFilesystem(str, renameAs string) error {
// into the directory. A plugin must have the '.yaml' extension to be considered.
// It returns the first error encountered and stops processing.
func (p *pluginList) loadPluginsDir(dirpath string) error {
files, err := ioutil.ReadDir(dirpath)
files, err := os.ReadDir(dirpath)
if err != nil {
return errors.Wrapf(err, "failed to read directory %q", dirpath)
}
Expand Down Expand Up @@ -213,7 +212,7 @@ func (p *pluginList) loadSinglePluginFromFile(filepath, renameAs string) error {
// loadSinglePlugin reads the data from the reader and loads the plugin.
func (p *pluginList) loadSinglePlugin(r io.ReadCloser, renameAs string) error {
defer r.Close()
b, err := ioutil.ReadAll(r)
b, err := io.ReadAll(r)
if err != nil {
return errors.Wrap(err, "failed to read data for plugin")
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/sonobuoy/app/pluginList_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ package app

import (
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
"testing"

"github.com/vmware-tanzu/sonobuoy/pkg/plugin/manifest"
Expand All @@ -30,7 +30,7 @@ import (
func TestSetPluginList(t *testing.T) {
serveFile := func(filepath string) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
b, err := ioutil.ReadFile(filepath)
b, err := os.ReadFile(filepath)
if err != nil {
t.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/sonobuoy/app/sonobuoyconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package app

import (
"encoding/json"
"io/ioutil"
"os"
"reflect"

"github.com/pkg/errors"
Expand Down Expand Up @@ -48,7 +48,7 @@ func (c *SonobuoyConfig) Set(str string) error {
return errors.New("if a custom config file is set, it must be set before other flags that modify configuration fields")
}

bytes, err := ioutil.ReadFile(str)
bytes, err := os.ReadFile(str)
if err != nil {
return errors.Wrap(err, "couldn't open config file")
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/sonobuoy/app/splat.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package app
import (
"archive/tar"
"compress/gzip"
"io/ioutil"
"io"
"os"
"path/filepath"

Expand Down Expand Up @@ -96,7 +96,7 @@ func addFileToTarball(tarWriter *tar.Writer, filename string) error {
return err
}

fileContent, err := ioutil.ReadAll(file)
fileContent, err := io.ReadAll(file)
if err != nil {
return err
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/sonobuoy/app/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package app
import (
"bytes"
"io"
"io/ioutil"
"os"
"testing"

"github.com/vmware-tanzu/sonobuoy/pkg/plugin"
Expand Down Expand Up @@ -89,9 +89,9 @@ func TestPrintStatus(t *testing.T) {
}

if *update {
ioutil.WriteFile(tc.expectFile, b.Bytes(), 0666)
os.WriteFile(tc.expectFile, b.Bytes(), 0666)
} else {
fileData, err := ioutil.ReadFile(tc.expectFile)
fileData, err := os.ReadFile(tc.expectFile)
if err != nil {
t.Fatalf("Failed to read golden file %v: %v", tc.expectFile, err)
}
Expand Down
Loading