Merge pull request #3153 from fluxcd/build-go1.19

Build with Go 1.19
pull/3154/head
Stefan Prodan 2 years ago committed by GitHub
commit 72d90b5692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -23,12 +23,12 @@ jobs:
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: 1.18.x go-version: 1.19.x
- name: Setup Kubernetes - name: Setup Kubernetes
uses: engineerd/setup-kind@v0.5.0 uses: engineerd/setup-kind@v0.5.0
with: with:
version: v0.11.1 version: v0.16.0
image: kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6 image: kindest/node:v1.25.2@sha256:9be91e9e9cdf116809841fc77ebdb8845443c4c72fe5218f3ae9eb57fdb4bace
- name: Setup Kustomize - name: Setup Kustomize
uses: fluxcd/pkg//actions/kustomize@main uses: fluxcd/pkg//actions/kustomize@main
- name: Build - name: Build

@ -16,7 +16,7 @@ jobs:
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: 1.18.x go-version: 1.19.x
- name: Prepare - name: Prepare
id: prep id: prep
run: | run: |

@ -23,7 +23,7 @@ jobs:
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: 1.18.x go-version: 1.19.x
- name: Install libgit2 - name: Install libgit2
run: | run: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138

@ -27,7 +27,7 @@ jobs:
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: 1.18.x go-version: 1.19.x
- name: Setup Kubernetes - name: Setup Kubernetes
uses: engineerd/setup-kind@v0.5.0 uses: engineerd/setup-kind@v0.5.0
with: with:

@ -20,7 +20,7 @@ jobs:
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: 1.18.x go-version: 1.19.x
- name: Setup QEMU - name: Setup QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx - name: Setup Docker Buildx

@ -57,7 +57,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: 1.18 go-version: 1.19.x
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v2 uses: github/codeql-action/init@v2
with: with:

@ -16,7 +16,7 @@ jobs:
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: 1.18.x go-version: 1.19.x
- name: Update component versions - name: Update component versions
id: update id: update
run: | run: |

@ -67,7 +67,7 @@ for source changes.
Prerequisites: Prerequisites:
* go >= 1.17 * go >= 1.19
* kubectl >= 1.20 * kubectl >= 1.20
* kustomize >= 4.4 * kustomize >= 4.4
* coreutils (on Mac OS) * coreutils (on Mac OS)

@ -17,8 +17,8 @@ rwildcard=$(foreach d,$(wildcard $(addsuffix *,$(1))),$(call rwildcard,$(d)/,$(2
all: test build all: test build
tidy: tidy:
go mod tidy -compat=1.18 go mod tidy -compat=1.19
cd tests/azure && go mod tidy -compat=1.18 cd tests/azure && go mod tidy -compat=1.19
fmt: fmt:
go fmt ./... go fmt ./...

@ -79,12 +79,12 @@ type upsertable interface {
// want to update. The mutate function is nullary -- you mutate a // want to update. The mutate function is nullary -- you mutate a
// value in the closure, e.g., by doing this: // value in the closure, e.g., by doing this:
// //
// var existing Value // var existing Value
// existing.Name = name // existing.Name = name
// existing.Namespace = ns // existing.Namespace = ns
// upsert(ctx, client, valueAdapter{&value}, func() error { // upsert(ctx, client, valueAdapter{&value}, func() error {
// value.Spec = onePreparedEarlier // value.Spec = onePreparedEarlier
// }) // })
func (names apiType) upsert(ctx context.Context, kubeClient client.Client, object upsertable, mutate func() error) (types.NamespacedName, error) { func (names apiType) upsert(ctx context.Context, kubeClient client.Client, object upsertable, mutate func() error) (types.NamespacedName, error) {
nsname := types.NamespacedName{ nsname := types.NamespacedName{
Namespace: object.GetNamespace(), Namespace: object.GetNamespace(),

@ -214,7 +214,6 @@ func getRowsToPrint(getAll bool, list summarisable) ([][]string, error) {
return rows, nil return rows, nil
} }
//
// watch starts a client-side watch of one or more resources. // 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 { 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...) w, err := kubeClient.Watch(ctx, get.list.asClientList(), listOpts...)

Loading…
Cancel
Save