Skip to content

adding check-latest:true#13328

Merged
mattfarina merged 1 commit intohelm:mainfrom
robertsirc:adjusting-go-setup-check-latest
Oct 1, 2024
Merged

adding check-latest:true#13328
mattfarina merged 1 commit intohelm:mainfrom
robertsirc:adjusting-go-setup-check-latest

Conversation

@robertsirc
Copy link
Copy Markdown
Member

I am fixing the go setup to check for latest. Based on the docs here.

tested it with my actions and it resolves correctly:
Run actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 Setup go version spec 1.22 Attempting to resolve the latest version from the manifest... matching 1.22... Resolved as '1.22.[7](https://github.com/robertsirc/helm/actions/runs/10835235498/job/30066292590#step:3:8)'

What this PR does / why we need it:

Special notes for your reviewer:

If applicable:

  • this PR contains user facing changes (the docs needed label should be applied if so)
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 12, 2024
@mattfarina mattfarina added this to the 3.16.2 milestone Sep 12, 2024
@mattfarina mattfarina added the Has One Approval This PR has one approval. It still needs a second approval to be merged. label Sep 12, 2024
Comment on lines +23 to +24
go-version: '1.22'
check-latest: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just use go-version-file: go.mod

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good point. I can address that in another PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The go directive in the go.mod file sets the minimum version of Go that can be used to compile the code. When we build Helm, we want to use the latest patch version on the minor version we are using. This way we get all of the bug and security fixes.

If Helm does use the go.mod file (either the go or toolchain directives) than we will need to update this file with every new Go release to ensure we build against the latest patch version of Go.

I'm not in favor of this extra work. If we went this way we would need to automate the updates to the go.mod file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think with the change I made, it selects the latest version of whatever is specified in the go.mod file.

@mattfarina mattfarina merged commit b2286c4 into helm:main Oct 1, 2024
@mattfarina mattfarina added the picked Indicates that a PR has been cherry-picked into the next release candidate. label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Has One Approval This PR has one approval. It still needs a second approval to be merged. picked Indicates that a PR has been cherry-picked into the next release candidate. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants