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

Bump go version to 1.22, rook version to 1.15 and csi-addon to 0.9.0 #1525

Merged
merged 3 commits into from
Aug 26, 2024

Conversation

ELENAGER
Copy link
Member

No description provided.

@@ -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"
Copy link
Member

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.

Copy link
Member

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

Copy link
Member Author

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
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member

@raghavendra-talur raghavendra-talur Aug 26, 2024

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.

@ELENAGER ELENAGER force-pushed the bump_versions branch 2 times, most recently from c20fbc0 to 7f287ec Compare August 22, 2024 19:55
@nirs nirs self-requested a review August 23, 2024 00:46
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
Copy link
Member

@nirs nirs Aug 23, 2024

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.

Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member

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)

Copy link
Member

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-...

@ELENAGER ELENAGER marked this pull request as ready for review August 26, 2024 10:12
Copy link
Member

@ShyamsundarR ShyamsundarR left a 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
Copy link
Member

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)

Copy link
Member Author

Choose a reason for hiding this comment

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

@ELENAGER
Copy link
Member Author

@ShyamsundarR this is the CSI issue csi-addons/kubernetes-csi-addons#649

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]>
Copy link
Member

@nirs nirs left a 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.

@ShyamsundarR ShyamsundarR merged commit 0223e05 into RamenDR:main Aug 26, 2024
16 checks passed
@ELENAGER ELENAGER deleted the bump_versions branch August 27, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants