From 348408e16e992978ed7272e87d3e08e4bc92836b Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Wed, 28 Sep 2022 22:05:48 +0300 Subject: [PATCH 1/2] Build with Go 1.19 Signed-off-by: Stefan Prodan --- .github/workflows/bootstrap.yaml | 2 +- .github/workflows/e2e-arm64.yaml | 2 +- .github/workflows/e2e-azure.yaml | 2 +- .github/workflows/e2e.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/scan.yaml | 2 +- .github/workflows/update.yaml | 2 +- CONTRIBUTING.md | 2 +- Makefile | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/bootstrap.yaml b/.github/workflows/bootstrap.yaml index f1af6800..2b7effd3 100644 --- a/.github/workflows/bootstrap.yaml +++ b/.github/workflows/bootstrap.yaml @@ -23,7 +23,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: 1.18.x + go-version: 1.19.x - name: Setup Kubernetes uses: engineerd/setup-kind@v0.5.0 with: diff --git a/.github/workflows/e2e-arm64.yaml b/.github/workflows/e2e-arm64.yaml index 62a886ac..53fb7650 100644 --- a/.github/workflows/e2e-arm64.yaml +++ b/.github/workflows/e2e-arm64.yaml @@ -16,7 +16,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: 1.18.x + go-version: 1.19.x - name: Prepare id: prep run: | diff --git a/.github/workflows/e2e-azure.yaml b/.github/workflows/e2e-azure.yaml index 102644b4..1019949e 100644 --- a/.github/workflows/e2e-azure.yaml +++ b/.github/workflows/e2e-azure.yaml @@ -23,7 +23,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: 1.18.x + go-version: 1.19.x - name: Install libgit2 run: | sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 6b8566e9..29af71d6 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -27,7 +27,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: 1.18.x + go-version: 1.19.x - name: Setup Kubernetes uses: engineerd/setup-kind@v0.5.0 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0d95facd..cc969451 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: 1.18.x + go-version: 1.19.x - name: Setup QEMU uses: docker/setup-qemu-action@v2 - name: Setup Docker Buildx diff --git a/.github/workflows/scan.yaml b/.github/workflows/scan.yaml index 7799570c..d7e064f0 100644 --- a/.github/workflows/scan.yaml +++ b/.github/workflows/scan.yaml @@ -57,7 +57,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.19.x - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: diff --git a/.github/workflows/update.yaml b/.github/workflows/update.yaml index b557ffc3..062c05fb 100644 --- a/.github/workflows/update.yaml +++ b/.github/workflows/update.yaml @@ -16,7 +16,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: 1.18.x + go-version: 1.19.x - name: Update component versions id: update run: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 282b4c95..9579bdf3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,7 +67,7 @@ for source changes. Prerequisites: -* go >= 1.17 +* go >= 1.19 * kubectl >= 1.20 * kustomize >= 4.4 * coreutils (on Mac OS) diff --git a/Makefile b/Makefile index 9699bca6..cee323e9 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,8 @@ rwildcard=$(foreach d,$(wildcard $(addsuffix *,$(1))),$(call rwildcard,$(d)/,$(2 all: test build tidy: - go mod tidy -compat=1.18 - cd tests/azure && go mod tidy -compat=1.18 + go mod tidy -compat=1.19 + cd tests/azure && go mod tidy -compat=1.19 fmt: go fmt ./... From d7dadb442534cbe324e9e03869bcc2f58479a82b Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Wed, 28 Sep 2022 22:07:41 +0300 Subject: [PATCH 2/2] e2e: Update bootstrap test to Kubernetes 1.25.2 Signed-off-by: Stefan Prodan --- .github/workflows/bootstrap.yaml | 4 ++-- cmd/flux/create.go | 12 ++++++------ cmd/flux/get.go | 1 - 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/bootstrap.yaml b/.github/workflows/bootstrap.yaml index 2b7effd3..e35b9176 100644 --- a/.github/workflows/bootstrap.yaml +++ b/.github/workflows/bootstrap.yaml @@ -27,8 +27,8 @@ jobs: - name: Setup Kubernetes uses: engineerd/setup-kind@v0.5.0 with: - version: v0.11.1 - image: kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6 + version: v0.16.0 + image: kindest/node:v1.25.2@sha256:9be91e9e9cdf116809841fc77ebdb8845443c4c72fe5218f3ae9eb57fdb4bace - name: Setup Kustomize uses: fluxcd/pkg//actions/kustomize@main - name: Build diff --git a/cmd/flux/create.go b/cmd/flux/create.go index ee339775..b0eb0e83 100644 --- a/cmd/flux/create.go +++ b/cmd/flux/create.go @@ -79,12 +79,12 @@ type upsertable interface { // want to update. The mutate function is nullary -- you mutate a // value in the closure, e.g., by doing this: // -// var existing Value -// existing.Name = name -// existing.Namespace = ns -// upsert(ctx, client, valueAdapter{&value}, func() error { -// value.Spec = onePreparedEarlier -// }) +// var existing Value +// existing.Name = name +// existing.Namespace = ns +// upsert(ctx, client, valueAdapter{&value}, func() error { +// value.Spec = onePreparedEarlier +// }) func (names apiType) upsert(ctx context.Context, kubeClient client.Client, object upsertable, mutate func() error) (types.NamespacedName, error) { nsname := types.NamespacedName{ Namespace: object.GetNamespace(), diff --git a/cmd/flux/get.go b/cmd/flux/get.go index 84a7573a..2236e36e 100644 --- a/cmd/flux/get.go +++ b/cmd/flux/get.go @@ -214,7 +214,6 @@ func getRowsToPrint(getAll bool, list summarisable) ([][]string, error) { return rows, nil } -// // watch starts a client-side watch of one or more resources. func (get *getCommand) watch(ctx context.Context, kubeClient client.WithWatch, cmd *cobra.Command, args []string, listOpts []client.ListOption) error { w, err := kubeClient.Watch(ctx, get.list.asClientList(), listOpts...)