medik8s / fence-agents-remediation

Kubernetes Operator for providing high availability between nodes by automatically remediating them using well-known fence-agents.
https://www.medik8s.io/
Apache License 2.0
9 stars 8 forks source link

Set Golang version in Dockerfile #132

Closed razo7 closed 6 months ago

razo7 commented 6 months ago

Why we need this PR

Fix the way we set the Golang version in the Dockerfile. See the below error from post-submit job that blocks the container build, of the pushed code (after merging PR or setting new tag), and eventually pushing it to Quay.

. . . RUN export GO_VERSION=$(grep -E "go [[:digit:]].[[:digit:]][[:digit:]]" go.mod | awk ... go: downloading golang.org/dl v0.0.0-20240305174203-2885f567d808 go: golang.org/dl/go1.21@latest: module golang.org/dl@latest found (v0.0.0-20240305174203-2885f567d808), but does not contain package golang.org/dl/go1.21

It tries to use Golang v1.21 (latest installed Golang version) for installing Golang v1.20.

Changes made

Directly install a desired Go version instead of first installing what the builder image provides, and then using Golang CLI to get the desired version. It stems from an error we have seen in building the contianer at the post-submit job

Which issue(s) this PR fixes

No issues, but an error from post-submit job

openshift-ci[bot] commented 6 months ago

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

razo7 commented 6 months ago

/test 4.15-openshift-e2e

razo7 commented 6 months ago

/test 4.15-openshift-e2e

openshift-ci[bot] commented 6 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: razo7, slintes

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: - ~~[OWNERS](https://github.com/medik8s/fence-agents-remediation/blob/main/OWNERS)~~ [razo7,slintes] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
razo7 commented 6 months ago

/cherry-pick release-0.3

openshift-cherrypick-robot commented 6 months ago

@razo7: new pull request created: #134

In response to [this](https://github.com/medik8s/fence-agents-remediation/pull/132#issuecomment-2002325370): >/cherry-pick release-0.3 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.