jenkins-x/jx

Upgrade Jenkins X repositories to go 1.23

msvticket opened this issue · 28 comments

When we were upgrading the go version to 1.18, we noticed that we are limited by the version of go in the goreleaser image. We are now building a custom image where we can set the version of go and install other packages we need. Once that is done, we can start this update work.

Golang supports only 2 major releases: https://endoflife.date/go
The latest version of golang is 1.22

Follow this guide for information on how to upgrade: https://jenkins-x.io/community/maintainer_guide/go-upgrades/

Before upgrading , we need to upgrade the version of golang in the catalog repository:
example (there are other files as well): https://github.com/jenkins-x/jx3-pipeline-catalog/blob/0f0f956d38ffe383ba38d93c1cfe7160a3bec93a/tasks/go/pullrequest.yaml#L37

This is the tentative list of repositories (list will be updated if we find any missing repositories) that we should upgrade:

In the list, there are some packages which need multiple packages updated before we update them, for example: before upgrading jx-api we should upgrade jx-logging.

NOTE: it's fine if you dont follow the order, the order is only there to limit the number of PRs we open as part of an upgrade effort

We will this issue to keep track of which repositories have been or are in the process of being upgraded.
If you are interested in contributing, please comment

I want to upgrade <repo-name>

When opening a PR in these repos to upgrade the go version, remember to include

related to jenkins-x/jx#8670

Don't use fixes as that will close this issue once your PR is merged.
Once your PR is merged, comment in this issue:

<reponame> has been upgraded to 1.22

I want to upgrade go-scm

I want to upgrade jx-kube-client

I want to upgrade lighthouse

go-scm has been upgraded to 1.22.3

lighthouse has been upgraded to 1.22.3

logrus-stackdriver-formatter and jx-kube-client has been upgraded.

I will upgrade jx-logging

jx-logging is upgraded

I will upgrade jx-api

I'll upgrade jx-git-operator

I will upgrade jx-helpers

jx-api is upgraded to go 1.22

I will upgrade jx-charter

jx-helpers is upgraded to 1.22

I'll upgrade jx-gitops

@msvticket i've done this one jenkins-x-plugins/jx-gitops#964 in order to reintroduce the CI as before with versionstream, but even locally I have this error :

go: finding module for package k8s.io/api/flowcontrol/v1alpha1
go: github.com/jenkins-x-plugins/jx-gitops/pkg/cmd/apply imports
        github.com/jenkins-x/jx-helpers/v3/pkg/kube imports
        k8s.io/client-go/kubernetes/fake imports
        k8s.io/api/flowcontrol/v1alpha1: module k8s.io/api@latest found (v0.30.2), but does not contain package k8s.io/api/flowcontrol/v1alpha1

seems like it's stuck from other repos (jx-helpers) that are using kubernetes/fake

@msvticket i've done this one jenkins-x-plugins/jx-gitops#964 in order to reintroduce the CI as before with versionstream, but even locally I have this error :

go: finding module for package k8s.io/api/flowcontrol/v1alpha1
go: github.com/jenkins-x-plugins/jx-gitops/pkg/cmd/apply imports
        github.com/jenkins-x/jx-helpers/v3/pkg/kube imports
        k8s.io/client-go/kubernetes/fake imports
        k8s.io/api/flowcontrol/v1alpha1: module k8s.io/api@latest found (v0.30.2), but does not contain package k8s.io/api/flowcontrol/v1alpha1

seems like it's stuck from other repos (jx-helpers) that are using kubernetes/fake

@JordanGoasdoue I fixed his issue in jenkins-x-plugins/jx-gitops#966. Please review!

I'll upgrade jx-promote

jx-promote is upgraded

I'll upgrade jx-updatebot

I'll upgrade jx-pipeline

jx-pipeline and jx-updatebot are updated