-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[release/2.8] bump up golang version #3812
Conversation
Codecov ReportBase: 58.72% // Head: 58.71% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## release/2.8 #3812 +/- ##
===============================================
- Coverage 58.72% 58.71% -0.02%
===============================================
Files 102 102
Lines 7104 7102 -2
===============================================
- Hits 4172 4170 -2
Misses 2286 2286
Partials 646 646
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
just some quick comments (haven't looked at the code changes yet)
aec0dcc
to
8f43012
Compare
f4822b4
to
994987c
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.
Thanks! Looks like there's still some unrelated changes and changes not in main
in here; I left comments inline
if offset >= int64(len(f.data)) { | ||
return 0, io.EOF | ||
} |
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.
This looks like it's not directly related to the Go update, or if it's needed, should be in it's own commit (cherry-pick); coming from
Backporting that fix is good, but should not be stuffed in together with a go update (if it's a separate PR, we can also point to it in the release notes)
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.
this must be in, otherwise one UT will panic as mentioned in #3614
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.
For sure, the fix is good, but it's not directly related to go1.18? My issue is mainly that stuffing bug fixes into a commit that only mentions "update go version" hides them.
This makes it hard to find back fixes;
- When reading either git log
- When reading the release notes
- When trying to find out if TestFileReaderSeek fails on go1.18 #3614 made it into a release (and if so, which one)
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.
This is not directly related to Go 1.18, but without this change, UT would have failed.
If I first try to pick a fix, like #3815, there are some faults on Go 1.16 that I don't think are worth investigating.
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.
@wy65701436 do you want to rebase now that we've merged #3815
for cnt := range ctlg.Repositories { | ||
entries[cnt] = ctlg.Repositories[cnt] | ||
} | ||
copy(entries, ctlg.Repositories) |
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.
This looks unrelated as well; looks like it was part of fbdfd1a; which is
Not sure if we want to backport that as a whole (it seems rather large), but if we want, should be separate.
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.
copy(entries, ctlg.Repositories)
is to fix a goci-lint failure, it must be in.
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.
My approach for these is usually to update golangci-lint first, and any changes related to updated linters together with that update (same PR, depending on the number of fixes needed, same commit). This makes it transparent that updates were needed due to stricter linters.
Golang updates (besides the go install
/ @version
changes, and in some cases replacing deprecated functions) should not require changes to the code; if they do, Go broke their Go 1 compatibility contract, which should be reported. Keeping the changes related to the Go update itself together, shows "this is what was needed to update go" (which should be "only update the version")
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.
So, in general, you would want us to fix all the prerequisites for the go upgrade, and then have this pr focus only on the go version upgrade.
i understand, but, it's not easy to decouple the fix for golangci-lint from the version upgrade of go, because there is some correlation between the versions of go and golangci-lint. Put all these changes together because they are what is needed for the upgraded version from the point of view of code changes.
// used if the registry is run after a go get based install. | ||
// used if the registry is run after a go install based install. |
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.
Looks like we didn't update this in the main
branch; we should do it there as well;
https://github.com/distribution/distribution/blob/92d136e113cf34fcfd5f0c21fadf6eac2f39e803/version/version.sh#LL20
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.
will raise pr on main later.
if strings.HasPrefix(keyStr, "vars.") { | ||
keyStr = strings.TrimPrefix(keyStr, "vars.") | ||
} | ||
|
||
if v, ok := ctx.vars[keyStr]; ok { | ||
if v, ok := ctx.vars[strings.TrimPrefix(keyStr, "vars.")]; ok { |
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.
This change is unrelated, and looks to be part of 3b391d3;
I suggest reverting this; if we want the other changes, we should backport it as a whole and having this partial change will complicate that (result in merge conflicts)
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.
again, it's to fix a goci-lint failure.
994987c
to
d0d4c22
Compare
upgrade go version to v1.18.8 Signed-off-by: Wang Yan <wangyan@vmware.com>
d0d4c22
to
325a6f1
Compare
Ping @thaJeztah |
I had a look at the changes included in this PR, and where they came from; opened an alternative with those changes applied / cherry-picked separately (separate commits), and rebased this PR on top to check for the diff; see #3903 |
Closing, #3908 switched |
upgrade go version to v1.18.8
Signed-off-by: Wang Yan wangyan@vmware.com