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

Upgrade minimum required Go version to 1.20 #2754

Merged
merged 6 commits into from
Mar 1, 2024
Merged

Conversation

cthulhu-rider
Copy link
Contributor

@cthulhu-rider cthulhu-rider commented Feb 27, 2024

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 48.71795% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 21.89%. Comparing base (3b7d09b) to head (2ff412c).

Files Patch % Lines
cmd/neofs-adm/internal/modules/morph/container.go 0.00% 6 Missing ⚠️
cmd/blobovnicza-to-peapod/blobovniczatree/put.go 0.00% 3 Missing ⚠️
cmd/neofs-cli/internal/client/sdk.go 0.00% 2 Missing ⚠️
pkg/local_object_storage/writecache/flush.go 0.00% 2 Missing ⚠️
cmd/neofs-cli/internal/key/raw.go 66.66% 1 Missing ⚠️
pkg/local_object_storage/engine/engine.go 50.00% 1 Missing ⚠️
pkg/local_object_storage/metabase/control.go 0.00% 1 Missing ⚠️
pkg/local_object_storage/metabase/shard_id.go 0.00% 1 Missing ⚠️
pkg/local_object_storage/util/logicerr/error.go 66.66% 1 Missing ⚠️
pkg/services/policer/check.go 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2754      +/-   ##
==========================================
- Coverage   28.65%   21.89%   -6.76%     
==========================================
  Files         427      787     +360     
  Lines       33109    46643   +13534     
==========================================
+ Hits         9486    10213     +727     
- Misses      22771    35554   +12783     
- Partials      852      876      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cthulhu-rider cthulhu-rider marked this pull request as draft February 27, 2024 11:07
@cthulhu-rider cthulhu-rider force-pushed the 2251-byte-clone branch 2 times, most recently from 219f159 to 3710b3a Compare February 28, 2024 13:10
@cthulhu-rider cthulhu-rider marked this pull request as ready for review February 28, 2024 13:11
Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

pkg/util/salt.go can be improved wrt slice cloning, but looks good otherwise.

@cthulhu-rider
Copy link
Contributor Author

pkg/util/salt.go can be improved

done

@roman-khimov
Copy link
Member

Conflicts.

Copy link
Member

@carpawell carpawell left a comment

Choose a reason for hiding this comment

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

Something is wrong with int tests. Otherwise, I am fine except nolint again.

@roman-khimov
Copy link
Member

Conflicts now.

Go 1.22 was recently released. As always, we require minimum version
before last.

Functionality of stdlib `math/rand` package was marked as deprecated,
but used for test code only.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
New stdlib function was introduced in Go 1.20. It completely replaces
the previously used `slice.Copy` utility. Manual `make`+`copy` no longer
needed too.

Closes #2251.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Starting from 1.20, std Go error system supports wrapping of multiple
errors. This allows to:
 * wrap several errors using `fmt.Errorf`;
 * get rid of error-wrapping types like `logicerr.Logical`.

Closes #2250.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
`status.Code` function supports wrapped errors, so it's redundant to do
`errors.Unwrap` before.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
NeoFS SDK is full friendly with Go std error system used in `errors`
package.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
@roman-khimov roman-khimov merged commit d7c7aba into master Mar 1, 2024
13 of 15 checks passed
@roman-khimov roman-khimov deleted the 2251-byte-clone branch March 1, 2024 08:54
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.

3 participants