: NO-ISSUE: Migrate away from deprecated ioutil#1160
: NO-ISSUE: Migrate away from deprecated ioutil#1160sebrandon1 wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
@sebrandon1 thanks so much for this! Unfortunately, the changes done under the staging directory need to happen upstream first and then get downstreamed.
that bring your proposed changes to the upstream components. Could you please revert the changes under staging and just check in the pkg/profiling/config changes? |
|
@sebrandon1 please consider rebasing this change to fix issues in the |
a4ca444 to
dd3ff27
Compare
|
@sebrandon1: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sebrandon1, tmshort The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
|
/retitle: NO-ISSUE: Migrate away from deprecated ioutil |
|
@sebrandon1: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
ioutilhas been deprecated since Go 1.16: https://go.dev/doc/go1.16#ioutilTracking issue: redhat-best-practices-for-k8s/telco-bot#52
Migration from
ioutiltoosfor file and directory operations:Replaced
ioutil.ReadFilewithos.ReadFileandioutil.ReadDirwithos.ReadDirin core configuration and bundle loading logic, such as inpkg/profiling/config/config.goandstaging/api/pkg/manifests/bundleloader.go. [1] [2] [3] [4]Updated validation and testing files to use
os.ReadFileinstead ofioutil.ReadFile, including files likestaging/api/pkg/validation/internal/community.go,crd_test.go,csv_test.go,object_test.go, andoperatorgroup_test.go. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Updated additional internal and registry logic to use
os.ReadFile,os.WriteFile, andos.MkdirTempin place of theirioutilcounterparts, such as inoperatorhub.go,buildahregistry/_options.go, andprovisioner_kind.go. [1] [2] [3] [4] [5] [6]