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

Remove references to io/ioutil package #45

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

austinvazquez
Copy link
Member

Package io/ioutil has been marked deprecated in Go 1.16.

Signed-off-by: Austin Vazquez macedonv@amazon.com

@austinvazquez austinvazquez marked this pull request as ready for review November 10, 2022 05:58
.golangci.yml Outdated Show resolved Hide resolved
@austinvazquez austinvazquez force-pushed the remove-ioutil branch 4 times, most recently from 85dd95c to 12b5c42 Compare February 22, 2023 18:59
fuseoverlayfs.go Outdated
Comment on lines 186 to 187
if err != nil {
return nil, fmt.Errorf("failed to get snapshot %s from storage: %w", key, err)
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Resolves ineffectual assignment of err. If storage.GetSnapshot call fails then s == snapshots.Snapshot{} or empty snapshot struct. From my read it made sense to propagate the error here instead of continuing and attempting to mount an empty snapshot. Lmk your thoughts.

fuseoverlayfs.go Outdated
@@ -182,9 +181,12 @@ func (o *snapshotter) Mounts(ctx context.Context, key string) ([]mount.Mount, er
if err != nil {
return nil, err
}
defer t.Rollback()
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved just for readability / matches the standard practice of other functions in this snapshotter.

Copy link
Member

Choose a reason for hiding this comment

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

This should be another PR

@austinvazquez
Copy link
Member Author

@AkihiroSuda, I removed some not required changes if you would take a second look. Enabling errcheck could probably be its own PR as most of its warnings are around checking of rollback errors on non-writable transactions which is unlikely to fail.

env:
GO111MODULE: on
GO_VERSION: 1.20.x
Copy link
Member

Choose a reason for hiding this comment

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

No need to define env

@@ -5,6 +5,10 @@ on:
push:
branches:
- master

env:
GO_VERSION: 1.20.x
Copy link
Member

Choose a reason for hiding this comment

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

No need to define env

@AkihiroSuda
Copy link
Member

Sorry, overlooked this, needs rebase

@thaJeztah
Copy link
Member

@austinvazquez could you address the review comments?

Package io/ioutil has been marked deprecated in Go 1.16.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
@austinvazquez
Copy link
Member Author

@thaJeztah, updated. Thanks for the ping.

@thaJeztah
Copy link
Member

Thanks! I stumbled on this one when I opened a PR here 😂

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah requested a review from AkihiroSuda January 15, 2025 15:56
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 8a6b752 into containerd:master Jan 16, 2025
6 checks passed
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