flux2 icon indicating copy to clipboard operation
flux2 copied to clipboard

Move to Go 1.18

Open hiddeco opened this issue 2 years ago • 1 comments

Given Go 1.18 has been out for some time now, and seems to be stable expect for some minor issues with the performance of the newly introduced Generics, we should start moving to it.

This would also allow us to move to the most recent version of the github.com/Azure/azure-sdk-for-go/sdk/* modules, which require Go >=1.18.

:spiral_notepad: Projects

Prerequisites

  • [x] fluxcd/golang-with-libgit2: needs to pass tests using Go 1.18.
  • [x] fluxcd/pkg: low level packages all used by controllers.

Controllers

  • [x] fluxcd/notification-controller (depends on prerequisites)
  • [x] fluxcd/image-reflector-controller (depends on prerequisites)
  • [x] fluxcd/source-controller (depends on prerequisites)
  • [x] fluxcd/kustomize-controller (depends on fluxcd/source-controller)
  • [x] fluxcd/helm-controller (depends on fluxcd/source-controller)
  • [x] fluxcd/image-automation-controller (depends on fluxcd/source-controller and fluxcd/image-reflector-controller)

CLI

  • [x] fluxcd/flux2 (this repository)

Other fluxcd/flux2 umbrella projects

  • [ ] fluxcd/cues
  • [ ] fluxcd/terraform-provider-flux
  • [ ] fluxcd/source-watcher
  • [ ] fluxcd/go-git-providers

:factory_worker: Steps per project

  • Update CI configuration in .github/ to make use of Go 1.18.x
  • Update Dockerfile resources to make use of Go 1.18.x
  • Optionally: if we depend on github.com/Azure/azure-sdk-for-go/*, the go 1.17 in go.mod can be updated to go 1.18. As there is a hard constraint on this version. For other projects, I would keep this, as it gate-keeps introduction of generics for now.
  • Optionally: if go.mod was changed to include 1.18, ensure any -compat=1.17 rules in e.g. the Makefile of the project are changed to -compat=1.18. While preferably also moving it to a configurable flag option.
  • Optionally: bump any github.com/Azure/azure-sdk-for-go/* dependencies to their latest versions.

hiddeco avatar May 03 '22 12:05 hiddeco

@hiddeco regarding the bumping to 1.18 in go.mod if the project uses the Azure SDK. I would actually hold off on doing that in a separate PR as updating the SDK version has a bunch of breaking changes both to function signatures and some behavior.

phillebaba avatar Jul 06 '22 07:07 phillebaba