Skip to content

chore: update to go1.24 #3912

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

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VARIANT="1.23"
ARG VARIANT="1.24"
FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT}
RUN apt-get update && \
export DEBIAN_FRONTEND=noninteractive && \
Expand All @@ -8,4 +8,6 @@ RUN apt-get update && \
skopeo \
vim \
fzf \
ripgrep
ripgrep \
jq \
curl
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "1.23-bullseye",
"VARIANT": "1.24",
"NODE_VERSION": "none"
}
},
Expand Down
21 changes: 0 additions & 21 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,6 @@ updates:
versions: [">=0.35.0"]
- dependency-name: "k8s.io/kubectl"
versions: [">=0.35.0"]
- package-ecosystem: "gomod"
directory: "/build/tools"
schedule:
interval: "daily"
commit-message:
prefix: "deps"
labels: [ "dependencies" ]
open-pull-requests-limit: 10
ignore:
- dependency-name: "k8s.io/api"
versions: [">=0.35.0"]
- dependency-name: "k8s.io/apiextensions-apiserver"
versions: [">=0.35.0"]
- dependency-name: "k8s.io/apimachinery"
versions: [">=0.35.0"]
- dependency-name: "k8s.io/client-go"
versions: [">=0.35.0"]
- dependency-name: "k8s.io/kubelet"
versions: [">=0.35.0"]
- dependency-name: "k8s.io/kubectl"
versions: [">=0.35.0"]
- package-ecosystem: "gomod"
directory: "/dropgz"
schedule:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/baseimages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
- uses: actions/setup-go@v5
with:
go-version: '1.23'
go-version-file: go.mod
- name: go env
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
- name: Render Dockerfiles
run: make dockerfiles
- name: Fail if base images are outdated
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@ jobs:
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
- name: Checkout repository
uses: actions/checkout@v4
go-version-file: go.mod
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/crdgen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@ on:
- checks_requested
jobs:
crdgen:
strategy:
matrix:
go-version: ['1.22', '1.23']
os: [ubuntu-latest]
name: CRDs are Generated
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version-file: go.mod
- name: Regenerate NodeNetworkConfig CRD
run: make -C crd/nodenetworkconfig
- name: Regenerate MultitenantNetworkContainer CRD
Expand All @@ -36,4 +32,8 @@ jobs:
- name: Regenerate OverlayExtensionConfig CRD
run: make -C crd/overlayextensionconfig
- name: Fail if the tree is dirty
run: test -z "$(git status --porcelain)"
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Changes detected. Please run 'make regenerate-crd' locally to regenerate crds."
exit 1
fi
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: "^1.23"
go-version-file: go.mod

- name: Setup Kind
uses: helm/kind-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cyclonus-netpol-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '^1.23'
go-version-file: go.mod

- name: Setup Kind
uses: helm/kind-action@v1
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,17 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ['1.22.x', '1.23.x']
os: [ubuntu-latest, windows-latest]
name: Lint
needs: generate
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Download generated code
uses: actions/download-artifact@v4
with:
Expand All @@ -54,5 +53,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61
args: ${{ github.event_name == 'pull_request' && format('--new-from-rev=origin/{0}', github.base_ref) || '' }} --config=.golangci.yml --timeout=25m
version: latest
args: ${{ github.event_name == 'pull_request' && format('--new-from-rev=origin/{0}', github.base_ref) || '' }} --config=.golangci.yml --timeout=25m
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ ipam-*.xml
*.test

controller-gen
build/tools/bin
npm/debug/http

go.work*
Expand Down
Loading
Loading