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

Upgrade Porch to Go 1.22 #41

Merged
merged 2 commits into from
May 14, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/porch-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '>=1.21.5'
go-version: '>=1.22.2'
- name: Setup kubectl
uses: azure/setup-kubectl@v3
- name: Install kpt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/porchctl-cli-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '>=1.21.5'
go-version: '>=1.22.2'
- name: Setup kubectl
uses: azure/setup-kubectl@v3
- name: Install kpt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '>=1.21.5'
go-version: '>=1.22.2'
- name: Checkout
uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/nephio-project/porch/api

go 1.21
go 1.22

require (
k8s.io/apimachinery v0.29.2
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


FROM golang:1.21.4-bookworm as builder
FROM golang:1.22.2-bookworm as builder

WORKDIR /go/src

Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile.apiserver
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.21.4-bookworm as builder
FROM golang:1.22.2-bookworm as builder

WORKDIR /workspace/src
RUN git clone https://github.com/kubernetes/kubernetes --branch v1.23.2 --depth=1
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile.etcd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.21.3-bookworm as builder
FROM golang:1.22.2-bookworm as builder

WORKDIR /workspace
ARG ETCD_VER=v3.5.1
Expand Down
2 changes: 1 addition & 1 deletion controllers/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.21.4-bookworm as builder
FROM golang:1.22.2-bookworm as builder

WORKDIR /go/src
COPY porch/ .
Expand Down
2 changes: 1 addition & 1 deletion controllers/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/nephio-project/porch/controllers

go 1.21
go 1.22

replace (
github.com/go-git/go-git/v5 v5.4.3-0.20220408232334-4f916225cb2f => github.com/platkrm/go-git/v5 v5.4.3-0.20220410165046-c76b262044ce
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func evalExpr(expr string, inputs map[string]interface{}) (string, error) {
return "", err
}

result, err := val.ConvertToNative(reflect.TypeOf(""))
result, err := val.ConvertToNative(reflect.TypeFor[string]())
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion default-go-lint.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


GOLANG_CI_VER ?= v1.52
GOLANG_CI_VER ?= v1.57
GIT_ROOT_DIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
include $(GIT_ROOT_DIR)/detect-container-runtime.mk

Expand Down
2 changes: 1 addition & 1 deletion default-go-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

GO_VERSION ?= 1.20.2
GO_VERSION ?= 1.22.2
TEST_COVERAGE_FILE=lcov.info
TEST_COVERAGE_HTML_FILE=coverage_unit.html
TEST_COVERAGE_FUNC_FILE=func_coverage.out
Expand Down
2 changes: 1 addition & 1 deletion default-gosec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

GOSEC_VER ?= 2.15.0
GOSEC_VER ?= 2.19.0
GIT_ROOT_DIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
include $(GIT_ROOT_DIR)/detect-container-runtime.mk

Expand Down
2 changes: 1 addition & 1 deletion examples/apps/hello-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.21.4-bookworm as builder
FROM golang:1.22.2-bookworm as builder

WORKDIR /src
COPY go.mod go.sum ./
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/hello-server/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/nephio-project/porch/config/samples/apps/hello

go 1.21
go 1.22
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/nephio-project/porch

go 1.21
go 1.22

replace (
github.com/go-git/go-git/v5 v5.4.3-0.20220408232334-4f916225cb2f => github.com/platkrm/go-git/v5 v5.4.3-0.20220410165046-c76b262044ce
Expand Down
2 changes: 1 addition & 1 deletion test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


FROM golang:1.21.4-bookworm as builder
FROM golang:1.22.2-bookworm as builder

WORKDIR /go/src

Expand Down
Loading