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

Replace deprecated ioutil package #6230

Merged
merged 3 commits into from
Oct 8, 2022
Merged

Conversation

dereknola
Copy link
Member

@dereknola dereknola commented Oct 7, 2022

Signed-off-by: Derek Nola [email protected]

Proposed Changes

  • Most functions in ioutil package was deprecated in go 1.16 and even more in 1.17. This PR replaces all deprecated functions from ioutil with their replacements. Most are a drop in name change, but ioutil.ReadDir -> os.ReadDir required a bit more change.
  • Fixes flaky secrets encrypt rotation test

Types of Changes

Deprecation package replacement.

Verification

make passes

Testing

N/A

Linked Issues

#6231

User-Facing Change


Further Comments

Signed-off-by: Derek Nola <[email protected]>
@dereknola dereknola requested a review from a team as a code owner October 7, 2022 17:03
@dereknola dereknola changed the title Replace ioutil package Replace deprecated ioutil package Oct 7, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2022

Codecov Report

Base: 9.74% // Head: 9.76% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (4fbef71) compared to base (b44d81a).
Patch coverage: 15.05% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #6230      +/-   ##
=========================================
+ Coverage    9.74%   9.76%   +0.01%     
=========================================
  Files         139     139              
  Lines       10120   10130      +10     
=========================================
+ Hits          986     989       +3     
- Misses       8932    8937       +5     
- Partials      202     204       +2     
Flag Coverage Δ
unittests 9.76% <15.05%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/agent/config/config.go 0.00% <0.00%> (ø)
pkg/agent/containerd/config_linux.go 0.00% <0.00%> (ø)
pkg/agent/containerd/containerd.go 0.00% <0.00%> (ø)
pkg/agent/loadbalancer/config.go 33.33% <0.00%> (ø)
pkg/agent/run_linux.go 0.00% <0.00%> (ø)
pkg/bootstrap/bootstrap.go 20.51% <0.00%> (ø)
pkg/cgroups/cgroups_linux.go 0.00% <0.00%> (ø)
pkg/cli/cert/cert.go 0.00% <0.00%> (ø)
pkg/cli/secretsencrypt/secrets_encrypt.go 0.00% <0.00%> (ø)
pkg/clientaccess/kubeconfig.go 0.00% <0.00%> (ø)
... and 22 more

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link

@VestigeJ VestigeJ left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Derek Nola <[email protected]>
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