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

Update Linux bridge Dockerfile to install Golang based on version in … #1953

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ashokpariya0
Copy link
Contributor

…go.mod

Modified Dockerfile to dynamically install the correct Go version based on the version specified in the go.mod file.

What this PR does / why we need it:

Issue:
The latest tags (e.g., v1.6.1, v1.6.0, etc.) from the containernetworking/plugins GitHub repository require Go version 1.23. However, due to the current configuration in the cluster-network-addons-operator repository, the Dockerfile by default installs Go version 1.22.

Solution:
We need to modify the installation process to dynamically install the Go version based on the version specified in the go.mod file.

If the go.mod file specifies a complete Go version (e.g., major.minor.patch), the exact version will be downloaded and installed.
If the go.mod file specifies only the major and minor version (e.g., major.minor), the latest patch version for that minor version will be downloaded and installed.

Special notes for your reviewer:

Release note:

None

…go.mod

Modified Dockerfile to dynamically install the correct Go version
based on the version specified in the go.mod file.

Signed-off-by: Ashok Pariya <[email protected]>
@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Dec 17, 2024
@kubevirt-bot
Copy link
Collaborator

Hi @ashokpariya0. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubevirt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign qinqon for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@oshoval
Copy link
Collaborator

oshoval commented Dec 17, 2024

Thanks
I would say that once we do this, we just bump version on go.mod, and remove the auto detection
wdyt?

@ashokpariya0
Copy link
Contributor Author

Thanks I would say that once we do this, we just bump version on go.mod, and remove the auto detection wdyt?

sorry, I did not get this, in this pr go.mod is refers to https://github.com/containernetworking/plugins/blob/7f756b411efc3d3730c707e2cc1f2baf1a66e28c/go.mod#L3

@oshoval
Copy link
Collaborator

oshoval commented Jan 1, 2025

I still need to understand deeper, but lets wait with this PR
Better to keep it simple

Also note please that we can't use go 1.23 for now
Once we can, we would able to align all required repos.
For now lets stick please to the "static" method we discussed

@ashokpariya0
Copy link
Contributor Author

I still need to understand deeper, but lets wait with this PR Better to keep it simple

Also note please that we can't use go 1.23 for now Once we can, we would able to align all required repos. For now lets stick please to the "static" method we discussed

Okay sure,
For the latest tags, v1.6.0 and v1.6.1, we need Go version 1.23. The previous version works with Go 1.22.

We can hold off on this PR for now and proceed with a static approach using the v1.5.1 tag, which is compatible with Go 1.22 ??

@oshoval
Copy link
Collaborator

oshoval commented Jan 1, 2025

Yes please,
but we need to wait to Petr for that in order to create the images i think

@ashokpariya0
Copy link
Contributor Author

Yes please, but we need to wait to Petr for that in order to create the images i think

Okay, Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. release-note-none Denotes a PR that doesn't merit a release note. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants