-
Notifications
You must be signed in to change notification settings - Fork 58
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
Bump go version to 1.22, rook version to 1.15 and csi-addon to 0.9.0 #1525
Conversation
@@ -23,7 +23,7 @@ env: | |||
IMAGE_NAME: ${{ vars.IMAGE_NAME || 'ramen' }} | |||
OPERATOR_SUGGESTED_NAMESPACE: ${{ vars.OPERATOR_SUGGESTED_NAMESPACE || 'ramen-system' }} | |||
# Constants | |||
GO_VERSION: "1.21" | |||
GO_VERSION: "1.22" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squashing this commit to to the first one would be best.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But - there is a better way - instead of getting go version from this variable, which needs future maintenance, we can get it the go version from the go.mod file[1]
In each usage of setup-go:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
[1] https://github.com/actions/setup-go?tab=readme-ov-file#getting-go-version-from-the-gomod-file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squashed. The proposed changed can be made in another PR, it's not straigh-forward, GO_VERSION constant is in use afterwards.
api/go.mod
Outdated
@@ -1,6 +1,6 @@ | |||
module github.com/ramendr/ramen/api | |||
|
|||
go 1.21 | |||
go 1.22.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.22 works:
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/ramendr/ramen
-go 1.21
+go 1.22
Running go mod tidy
and make
does not change to 1.22.0. Did yo add it manually or some tool changed it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing to 1.22 and running go mod tidy gives me the following error:
go: downloading go1.22 (linux/amd64)
go: download go1.22 for linux/amd64: toolchain not available
Using 1.22.0 is fixing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe because you don't have go 1.22 installed on you machine?
You can install multiple go versions:
https://go.dev/doc/manage-install
If we depend automatic download of go version for building, we can require the latest version: 1.22.6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to do this change that Nir suggests.
Edit: I only refer to the part about keeping it go 1.22
and not go 1.22.0
. We can do the automatic download of go version in the CI later.
c20fbc0
to
7f287ec
Compare
github.com/csi-addons/kubernetes-csi-addons v0.8.0 | ||
github.com/go-logr/logr v1.3.0 | ||
github.com/google/uuid v1.3.1 | ||
github.com/csi-addons/kubernetes-csi-addons v0.8.1-0.20240822090723-89d4c5b45a32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this is the right version? we are using crds and images from 0.9.0, but api from 0.8.1-...? This looks wrong. How did you create this requirement?
I guess you did:
go get github.com/csi-addons/kubernetes-csi-addons@89d4c5b45a3258587d2e8054183470093385308c
When doing such unexpected changes (and specially in a big commit like this), we need to explain whats going on in the commit message. Something like:
We update csi-addon to 0.9.0, but we cannot build with this version because
... we have to build with commit (link the commit). The requirement was
created like this ...
Also a line about the need to update rook an csi-addons in the same time is helpful. Explain why we cannot update each component without the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to use specific commit from CSI because of the constants, that they forgot to expose in 0.9.0 and merged later. I don't like this situation also, if you can suggest a better solution - let's discuss it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine for a temporary change until we get a new 0.9.1 wit this fix.
@Madhu-1 do you plan to release 0.9.1 soon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not at the moment (at least not in 3 weeks unless we have bugs that need a release)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ELENAGER You can get a higher commit than 0.9.0. The line should look like v0.9.1-...
7f287ec
to
753bbe9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raghavendra-talur can you take a look at the go.mod and build (dockerfile) changes and we can merge if things look fine.
@ELENAGER if there is a CSI addons issue, we can link it to one of our issues to move to the right versions when it is released.
api/go.mod
Outdated
@@ -1,6 +1,6 @@ | |||
module github.com/ramendr/ramen/api | |||
|
|||
go 1.21 | |||
go 1.22.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move this to latest 1.22.z (which seems to be 6) (here and other places as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShyamsundarR Done.
@ShyamsundarR this is the CSI issue csi-addons/kubernetes-csi-addons#649 |
Signed-off-by: Elena Gershkovich <[email protected]>
Signed-off-by: Elena Gershkovich <[email protected]>
Updating kubernetes-csi-addon version demands also update in rook, because csi 0.9.0 requires sidecar 0.9.0 and cephcsi 3.12.0, that is rook 1.15 is bringing. Signed-off-by: Elena Gershkovich <[email protected]>
753bbe9
to
f095392
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is ok to merge assuming that we get 0.9.1 release in few weeks. Testing with latest rook early is important.
No description provided.