Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo controlled build go version #99

Merged
merged 3 commits into from
Dec 6, 2023

Conversation

xdu31
Copy link
Contributor

@xdu31 xdu31 commented Nov 11, 2023

Follow KEP-3744 to make aws-encryption-provider to stay on supported Go versions.

This PR follows kubernetes/kubernetes#114660 and kubernetes/kubernetes#115377 for repo-controlled go version to use in CI.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 11, 2023
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 11, 2023
@@ -12,7 +12,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.20.10
Copy link
Member

Choose a reason for hiding this comment

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

Why use a point release and not just 1.20?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Member

Choose a reason for hiding this comment

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

my question was why use 1.XX.YY instead of just 1.XX? then we won't have to update for every point release

Copy link
Contributor Author

@xdu31 xdu31 Nov 15, 2023

Choose a reason for hiding this comment

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

my question was why use 1.XX.YY instead of just 1.XX? then we won't have to update for every point release

@micahhausler the YY bump could mean some CVE fixes in Golang minor version, thus we can follow to patch the component and cut a new image tag for the Go version bump. Otherwise, there is no change in the component and we can't cut a new image tag.

Copy link
Contributor Author

@xdu31 xdu31 Nov 15, 2023

Choose a reason for hiding this comment

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

@micahhausler not sure why, but with 1.20 in the github workflow has failure in CI build job: https://github.com/kubernetes-sigs/aws-encryption-provider/actions/runs/6873400343, 1.20.10 is working fine

Copy link
Member

Choose a reason for hiding this comment

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

We do this in kubernetes so it's still a controlled PR to upgrade and builds are more reproducible (this isn't itself enough to get reproducible builds however) but YMMV.

Copy link
Contributor Author

@xdu31 xdu31 Nov 23, 2023

Choose a reason for hiding this comment

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

@BenTheElder With this PR, everything about Go version is predictable in this repo, leveraging .go-image-tag (currently there is a small gap for me to adopt .go-version).

With this change to adopt gimme, in both pre-merge tests in Prow and local environment, the build system will choose the Go version in .go-image-tag as the Go version for building binary, running tests and building image.

With a0c85ee, GitHub action is also able to leverage .go-image-tag to set up Go version to release binaries.

What's your thought @micahhausler ?

@xdu31
Copy link
Contributor Author

xdu31 commented Nov 15, 2023

/retest

@nckturner
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 6, 2023
@nckturner
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nckturner, xdu31

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 6, 2023
@k8s-ci-robot k8s-ci-robot merged commit 2d868b8 into kubernetes-sigs:master Dec 6, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants