pipecd icon indicating copy to clipboard operation
pipecd copied to clipboard

Update go version to 1.22

Open ffjlabo opened this issue 1 year ago • 3 comments

What this PR does / why we need it:

Update go version to 1.22

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.

Which issue(s) this PR fixes:

Fixes #4874

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

ffjlabo avatar May 20 '24 09:05 ffjlabo

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 22.01%. Comparing base (9b82e65) to head (f2322e7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4919      +/-   ##
==========================================
- Coverage   29.32%   22.01%   -7.32%     
==========================================
  Files         323      518     +195     
  Lines       40984    57164   +16180     
==========================================
+ Hits        12020    12585     +565     
- Misses      28002    43561   +15559     
- Partials      962     1018      +56     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 20 '24 09:05 codecov[bot]

/review

t-kikuc avatar May 21 '24 07:05 t-kikuc

PR Analysis

Main theme

"Update Go versions"

PR summary

"This PR updates the Go version to 1.22.3 across various Dockerfiles, GitHub actions configurations, and go.mod files."

Type of PR

"Enhancement"

PR Feedback:

General suggestions

The PR increases the Go version used for building and testing to 1.22.3 across different workflows and Docker images. Updating to this version is beneficial for leveraging improvements and security fixes introduced in the latest Go release. It is crucial to ensure all dependencies are compatible with the new Go version and the upgrade does not introduce any building or testing issues. Verify through testing that the update does not break the existing functionality.

Code feedback

  • relevant file: .github/workflows/build.yaml suggestion: "Ensure that all dependencies and code are compatible with Go 1.22.3 as this will be the new version used in your build process." (important) relevant line: + GO_VERSION: 1.22.3

  • relevant file: docs/Dockerfile suggestion: "The use of Go 1.22.3 for building the documentation server should be validated to ensure that the building process is not affected by the version change." (important) relevant line: +FROM golang:1.22.3-alpine3.19 AS builder

  • relevant file: go.mod suggestion: "By updating the Go directive to 1.22, you are declaring that your code uses features or behaviors introduced in that Go version. This implies compatibility with Go 1.22's modules behavior. Make sure all module dependencies are tested and compatible with Go 1.22." (important) relevant line: +go 1.22

  • relevant file: go.sum suggestion: "It's good practice to verify that the checksums stored in go.sum after the Go version upgrade align with the expected hashes to ensure module authenticity." (medium) relevant line: +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=

  • relevant file: cmd/pipecd/README.md suggestion: "The update to Go 1.22 in the README should also link to Go's release notes or documentation providing users insights into what changes come with the Go 1.22 release." (medium) relevant line: +- [Go 1.22 or later](https://go.dev/)

Security concerns:

"no"

The changes are focused on the Go version update, which should not lead to any security concerns as long as the used dependencies are secure and up-to-date with the newer Go version. The maintainers should verify that dependencies are indeed compatible and free from vulnerabilities that might affect the newer environment.

github-actions[bot] avatar May 21 '24 07:05 github-actions[bot]

@ffjlabo I created this issue for codegen image update. Let's address the codegen problem by that issue and clean up this PR 👍 https://github.com/pipe-cd/pipecd/issues/4963

khanhtc1202 avatar Jun 10 '24 04:06 khanhtc1202

Thank you for the comment! I'm updating to go 1.22.4 now. 👍

ffjlabo avatar Jun 14 '24 04:06 ffjlabo