pipecd icon indicating copy to clipboard operation
pipecd copied to clipboard

Update to Go 1.22

Open ffjlabo opened this issue 1 year ago • 1 comments

What would you like to be added:

TODO:

  • [x] Update the base image of Dockerfiles and go.mod in tools/
    • [x] actions-gh-release
    • [x] actions-plan-preview
    • [x] codegen
  • [x] Update the base image of Dockerfiles in docs/
  • [x] Update go version in docs document.
  • [x] Update env.GO_VERSION in github actions workflow definitions.
    • [x] test.yaml
    • [x] publish_image_chart.yaml
    • [x] publish_binary.yaml
    • [x] lint.yaml
    • [x] test_tool.yaml
    • [x] build.yaml
  • [x] Update go.mod in the root of the repo.

memo

  • docker image: golang:1.22.3-alpine3.19 https://hub.docker.com/layers/library/golang/1.22.3-alpine3.19/images/sha256-a52ec26b648564b6cef8adf7bea14348b499a32d08de3943823150ad268f0d77?context=explore
  • current go's stable version: 1.22.3 https://go.dev/dl/ Cursor_と_All_releases_-_The_Go_Programming_Language

Why is this needed:

After Go 1.22, we don't need to consider the loop var scope. https://go.dev/blog/loopvar-preview

ffjlabo avatar Apr 17 '24 10:04 ffjlabo

I updated the TODO above. These are based on the investigation of the github action workflow definitions and previous PRs for updating go version.

workflow definitions: .github/workflows/*

to 1.20.3

  • https://github.com/pipe-cd/pipecd/pull/4320
  • https://github.com/pipe-cd/pipecd/pull/4378

to 1.19

  • https://github.com/pipe-cd/pipecd/pull/3997
  • https://github.com/pipe-cd/pipecd/pull/4222

ffjlabo avatar May 20 '24 07:05 ffjlabo