mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-08-19 04:06:35 +00:00
🌱 chore: upgrade to go 1.26 (#1571)
* chore: upgrade to go 1.26 Upgrades Go version from 1.25 to 1.26. Changes: - go.mod — go directive updated to 1.26.0 - .github/workflows/*.yml — GO_VERSION updated to 1.26 (5 workflows) - build/Dockerfile.* — base image updated to golang:1.26-bookworm (5 Dockerfiles) - pkg/placement/controllers/scheduling/scheduling_controller.go — fix pre-existing printf format mismatch (%q -> %d for int args) surfaced by stricter Go 1.26 linter Relates to: https://github.com/open-cluster-management-io/ocm/issues/1555 Signed-off-by: Tesshu Flower <tflower@redhat.com> * fix: pin engineerd/setup-kind to working commit SHA Pin engineerd/setup-kind to commit SHA ecfad61750951586a9ef973db567df1d28671bdc which is the tip of the v0.6.2 branch and includes the required dist/ build artifact. The v0.6.2 tag currently resolves to a different commit that is missing dist/main/index.js, causing e2e CI to fail. Signed-off-by: Tesshu Flower <tflower@redhat.com> --------- Signed-off-by: Tesshu Flower <tflower@redhat.com>
This commit is contained in:
@@ -14,7 +14,7 @@ on:
|
||||
- release-*
|
||||
|
||||
env:
|
||||
GO_VERSION: '1.25'
|
||||
GO_VERSION: '1.26'
|
||||
GO_REQUIRED_MIN_VERSION: ''
|
||||
|
||||
permissions:
|
||||
|
||||
@@ -15,7 +15,7 @@ on:
|
||||
- release-*
|
||||
|
||||
env:
|
||||
GO_VERSION: '1.25'
|
||||
GO_VERSION: '1.26'
|
||||
GO_REQUIRED_MIN_VERSION: ''
|
||||
USE_EXISTING_CLUSTER: false # set to true to use an existing kind cluster for debugging with act
|
||||
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Setup kind
|
||||
uses: engineerd/setup-kind@v0.6.2
|
||||
uses: engineerd/setup-kind@ecfad61750951586a9ef973db567df1d28671bdc # v0.6.2
|
||||
with:
|
||||
version: v0.22.0
|
||||
skipClusterCreation: ${{ env.USE_EXISTING_CLUSTER }}
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Setup kind
|
||||
uses: engineerd/setup-kind@v0.6.2
|
||||
uses: engineerd/setup-kind@ecfad61750951586a9ef973db567df1d28671bdc # v0.6.2
|
||||
with:
|
||||
version: v0.22.0
|
||||
skipClusterCreation: ${{ env.USE_EXISTING_CLUSTER }}
|
||||
@@ -90,7 +90,7 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Setup kind
|
||||
uses: engineerd/setup-kind@v0.6.2
|
||||
uses: engineerd/setup-kind@ecfad61750951586a9ef973db567df1d28671bdc # v0.6.2
|
||||
with:
|
||||
version: v0.22.0
|
||||
skipClusterCreation: ${{ env.USE_EXISTING_CLUSTER }}
|
||||
@@ -117,7 +117,7 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Setup kind
|
||||
uses: engineerd/setup-kind@v0.6.2
|
||||
uses: engineerd/setup-kind@ecfad61750951586a9ef973db567df1d28671bdc # v0.6.2
|
||||
with:
|
||||
version: v0.22.0
|
||||
skipClusterCreation: ${{ env.USE_EXISTING_CLUSTER }}
|
||||
|
||||
@@ -13,7 +13,7 @@ on:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.25'
|
||||
GO_VERSION: '1.26'
|
||||
GO_REQUIRED_MIN_VERSION: ''
|
||||
|
||||
permissions:
|
||||
|
||||
@@ -13,7 +13,7 @@ on:
|
||||
- release-*
|
||||
|
||||
env:
|
||||
GO_VERSION: '1.25'
|
||||
GO_VERSION: '1.26'
|
||||
GO_REQUIRED_MIN_VERSION: ''
|
||||
|
||||
permissions:
|
||||
|
||||
@@ -6,7 +6,7 @@ on:
|
||||
- 'v*.*.*'
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.25'
|
||||
GO_VERSION: '1.26'
|
||||
GO_REQUIRED_MIN_VERSION: ''
|
||||
GOPATH: '/home/runner/work/ocm/ocm/go'
|
||||
GITHUB_REF: ${{ github.ref }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.25-bookworm AS builder
|
||||
FROM golang:1.26-bookworm AS builder
|
||||
ARG OS=linux
|
||||
ARG ARCH=amd64
|
||||
WORKDIR /go/src/open-cluster-management.io/ocm
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.25-bookworm AS builder
|
||||
FROM golang:1.26-bookworm AS builder
|
||||
ARG OS=linux
|
||||
ARG ARCH=amd64
|
||||
WORKDIR /go/src/open-cluster-management.io/ocm
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.25-bookworm AS builder
|
||||
FROM golang:1.26-bookworm AS builder
|
||||
ARG OS=linux
|
||||
ARG ARCH=amd64
|
||||
WORKDIR /go/src/open-cluster-management.io/ocm
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.25-bookworm AS builder
|
||||
FROM golang:1.26-bookworm AS builder
|
||||
ARG OS=linux
|
||||
ARG ARCH=amd64
|
||||
WORKDIR /go/src/open-cluster-management.io/ocm
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.25-bookworm AS builder
|
||||
FROM golang:1.26-bookworm AS builder
|
||||
ARG OS=linux
|
||||
ARG ARCH=amd64
|
||||
WORKDIR /go/src/open-cluster-management.io/ocm
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module open-cluster-management.io/ocm
|
||||
|
||||
go 1.25.0
|
||||
go 1.26.0
|
||||
|
||||
require (
|
||||
github.com/aws/aws-sdk-go-v2 v1.41.11
|
||||
|
||||
@@ -591,7 +591,7 @@ func (c *schedulingController) createOrUpdatePlacementDecision(
|
||||
clusterDecisions := placementDecision.Status.Decisions
|
||||
|
||||
if len(clusterDecisions) > maxNumOfClusterDecisions {
|
||||
return fmt.Errorf("the number of clusterdecisions %q exceeds the max limitation %q", len(clusterDecisions), maxNumOfClusterDecisions)
|
||||
return fmt.Errorf("the number of clusterdecisions %d exceeds the max limitation %d", len(clusterDecisions), maxNumOfClusterDecisions)
|
||||
}
|
||||
|
||||
existPlacementDecision, err := c.placementDecisionLister.PlacementDecisions(placementDecision.Namespace).Get(placementDecisionName)
|
||||
|
||||
Reference in New Issue
Block a user