Skip to content

CNF-23374: Migrate away from deprecated ioutil#202

Open
sebrandon1 wants to merge 1 commit into
openshift:masterfrom
sebrandon1:ioutil_deprecation
Open

CNF-23374: Migrate away from deprecated ioutil#202
sebrandon1 wants to merge 1 commit into
openshift:masterfrom
sebrandon1:ioutil_deprecation

Conversation

@sebrandon1

@sebrandon1 sebrandon1 commented Nov 24, 2025

Copy link
Copy Markdown
Member

ioutil has been deprecated since Go 1.16: https://go.dev/doc/go1.16#ioutil

Tracking issue: redhat-best-practices-for-k8s/telco-bot#52

Core updates to file and stream reading:

  • Replaced ioutil.ReadAll with io.ReadAll for reading from streams and HTTP response bodies across authentication, OAuth, and server-related packages. [1] [2] [3] [4] [5] [6] [7]
  • Replaced ioutil.ReadFile with os.ReadFile for reading files in configuration and OAuth server logic, such as loading secrets and certificates. [1] [2] [3] [4] [5]

Test code modernization:

  • Updated tests to use os.CreateTemp instead of ioutil.TempFile and os.WriteFile instead of ioutil.WriteFile for creating and writing temporary files. [1] [2] [3] [4] [5]
  • Updated imports and usage in test files to use io.ReadAll instead of ioutil.ReadAll for reading HTTP response bodies. [1] [2] [3] [4]

General import cleanup:

These updates ensure the codebase is up-to-date with the latest Go standards and removes reliance on deprecated APIs.

Summary by CodeRabbit

  • Chores
    • Updated deprecated file and request-body reading helpers to Go’s current standard library equivalents across authentication, OAuth, server, and configuration components.
    • Adjusted related test utilities to use the modern APIs for reading HTTP bodies and writing temporary files, keeping test behavior unchanged.

@ibihim

ibihim commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 1, 2025
@liouk

liouk commented Dec 1, 2025

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Dec 1, 2025
@openshift-ci

openshift-ci Bot commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ibihim, liouk, sebrandon1

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 3, 2025
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 16, 2026
@openshift-ci

openshift-ci Bot commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 16, 2026
@sebrandon1

Copy link
Copy Markdown
Member Author

/retest

@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 79f0f08d-9cdb-4714-8b85-e5d975583a7d

📥 Commits

Reviewing files that changed from the base of the PR and between c1dafda and b5c492c.

📒 Files selected for processing (9)
  • pkg/authenticator/password/basicauthpassword/basicauthpassword.go
  • pkg/authenticator/password/keystonepassword/keystonepassword_test.go
  • pkg/config/stringsource.go
  • pkg/oauth/external/gitlab/gitlab_oauth.go
  • pkg/oauth/external/openid/openid.go
  • pkg/oauthserver/auth.go
  • pkg/oauthserver/oauth_apiserver_test.go
  • pkg/server/login/login_test.go
  • pkg/server/selectprovider/selectprovider_test.go
✅ Files skipped from review due to trivial changes (6)
  • pkg/oauth/external/openid/openid.go
  • pkg/authenticator/password/keystonepassword/keystonepassword_test.go
  • pkg/server/login/login_test.go
  • pkg/authenticator/password/basicauthpassword/basicauthpassword.go
  • pkg/oauth/external/gitlab/gitlab_oauth.go
  • pkg/oauthserver/auth.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/server/selectprovider/selectprovider_test.go

Walkthrough

Refactor replacing deprecated io/ioutil calls with stdlib alternatives: io.ReadAll for body reads, os.ReadFile for file reads, and os.CreateTemp/os.WriteFile in tests. No behavior or control flow changes.

Changes

Replace ioutil usage

Layer / File(s) Summary
Body reads
pkg/authenticator/password/basicauthpassword/basicauthpassword.go, pkg/authenticator/password/keystonepassword/keystonepassword_test.go, pkg/oauth/external/gitlab/gitlab_oauth.go, pkg/oauth/external/openid/openid.go, pkg/server/login/login_test.go, pkg/server/selectprovider/selectprovider_test.go
io.ReadAll replaces ioutil.ReadAll for HTTP body reads in authentication, OAuth, and server test code.
File reads
pkg/config/stringsource.go, pkg/oauthserver/auth.go
os.ReadFile replaces ioutil.ReadFile for config value, key, and ClientCA loading.
Test temp/file write APIs
pkg/oauthserver/oauth_apiserver_test.go
os.CreateTemp and os.WriteFile replace deprecated temp-file and write helpers in session secret tests.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: replacing deprecated ioutil usage with standard library APIs.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Changed test files use only static Go Test functions; no Ginkgo It/Describe/Context/When titles or dynamic test names were introduced.
Test Structure And Quality ✅ Passed No Ginkgo tests were changed; the touched tests are plain table-driven Go tests without It/BeforeEach/Eventually patterns.
Microshift Test Compatibility ✅ Passed Touched tests are plain Go unit tests, not Ginkgo e2e specs, and no MicroShift-unsupported OpenShift APIs/features were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The touched test files are plain Go unit tests (Test*), with no new Ginkgo e2e tests or SNO/HA assumptions added.
Topology-Aware Scheduling Compatibility ✅ Passed Only ioutil→io/os I/O changes in auth/OAuth/server code and tests; no manifests, replicas, affinity, node selectors, or topology-aware scheduling logic changed.
Ote Binary Stdout Contract ✅ Passed Touched files only swap ioutil APIs; no main/init/TestMain/BeforeSuite/AfterSuite stdout writes were added. The one init() just installs a scheme.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; touched tests use standard testing and no IPv4-only or external internet assumptions were found.
No-Weak-Crypto ✅ Passed Touched files only replace ioutil with io/os; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret-comparison changes were introduced.
Container-Privileges ✅ Passed Changed files are Go/tests plus harmless build/audit YAML; scanning all touched files found no privileged/hostPID/hostNetwork/hostIPC/SYS_ADMIN/allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed Touched files only swap ioutil APIs; diff search found no added/changed log statements or new sensitive-data fields.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
pkg/oauthserver/oauth_apiserver_test.go (1)

29-101: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Close os.CreateTemp file handles before os.WriteFile (prevents leaks/flaky cleanup).

In each test, os.CreateTemp returns an open *os.File, but it’s never closed before writing via os.WriteFile(tmpfile.Name(), ...). This is a resource leak and can cause flaky failures on platforms that restrict deleting/opening temp files (commonly Windows), since os.Remove is deferred.

🔧 Proposed fix
 func TestGetInvalidSessionSecretsFile(t *testing.T) {
-	tmpfile, err := os.CreateTemp("", "invalid.yaml")
+	tmpfile, err := os.CreateTemp("", "invalid.yaml")
 	if err != nil {
 		t.Fatalf("unexpected error: %v", err)
 	}
-	defer os.Remove(tmpfile.Name())
+	name := tmpfile.Name()
+	if err := tmpfile.Close(); err != nil {
+		t.Fatalf("unexpected error: %v", err)
+	}
+	defer os.Remove(name)

-	if err := os.WriteFile(tmpfile.Name(), []byte("invalid content"), os.FileMode(0600)); err != nil {
+	if err := os.WriteFile(name, []byte("invalid content"), os.FileMode(0600)); err != nil {
 		t.Fatal(err)
 	}

-	_, err = getSessionSecrets(tmpfile.Name())
+	_, err = getSessionSecrets(name)
 	if err == nil {
 		t.Errorf("Expected error, got none")
 	}
 }

 func TestGetEmptySessionSecretsFile(t *testing.T) {
-	tmpfile, err := os.CreateTemp("", "empty.yaml")
+	tmpfile, err := os.CreateTemp("", "empty.yaml")
 	if err != nil {
 		t.Fatalf("unexpected error: %v", err)
 	}
-	defer os.Remove(tmpfile.Name())
+	name := tmpfile.Name()
+	if err := tmpfile.Close(); err != nil {
+		t.Fatalf("unexpected error: %v", err)
+	}
+	defer os.Remove(name)

 	secrets := &osinv1.SessionSecrets{
 		Secrets: []osinv1.SessionSecret{},
 	}
 ...
-	if err := os.WriteFile(tmpfile.Name(), []byte(yaml), os.FileMode(0600)); err != nil {
+	if err := os.WriteFile(name, []byte(yaml), os.FileMode(0600)); err != nil {
 		t.Fatal(err)
 	}

-	_, err = getSessionSecrets(tmpfile.Name())
+	_, err = getSessionSecrets(name)
 	if err == nil {
 		t.Errorf("Expected error, got none")
 	}
 }

 func TestGetValidSessionSecretsFile(t *testing.T) {
-	tmpfile, err := os.CreateTemp("", "valid.yaml")
+	tmpfile, err := os.CreateTemp("", "valid.yaml")
 	if err != nil {
 		t.Fatalf("unexpected error: %v", err)
 	}
-	defer os.Remove(tmpfile.Name())
+	name := tmpfile.Name()
+	if err := tmpfile.Close(); err != nil {
+		t.Fatalf("unexpected error: %v", err)
+	}
+	defer os.Remove(name)
 ...
-	if err := os.WriteFile(tmpfile.Name(), []byte(yaml), os.FileMode(0600)); err != nil {
+	if err := os.WriteFile(name, []byte(yaml), os.FileMode(0600)); err != nil {
 		t.Fatal(err)
 	}

-	readSecrets, err := getSessionSecrets(tmpfile.Name())
+	readSecrets, err := getSessionSecrets(name)
 	if err != nil {
 		t.Errorf("Unexpected error: %v", err)
 	}
 	if !reflect.DeepEqual(readSecrets, expectedSecrets) {
 		t.Errorf("Unexpected %v, got %v", expectedSecrets, readSecrets)
 	}
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/oauthserver/oauth_apiserver_test.go` around lines 29 - 101, Each test
(TestGetInvalidSessionSecretsFile, TestGetEmptySessionSecretsFile,
TestGetValidSessionSecretsFile) opens a temp file with os.CreateTemp and then
calls os.WriteFile on its name without closing the *os.File handle, which can
leak resources and cause flaky behavior on some platforms; fix by calling
tmpfile.Close() (or defer tmpfile.Close()) immediately after successful
os.CreateTemp returns and before calling os.WriteFile/tmpfile.Name(), ensuring
the file handle is released before getSessionSecrets reads it.
pkg/server/login/login_test.go (1)

248-257: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Don’t ignore io.ReadAll errors in tests.

The test discards the error from io.ReadAll(resp.Body) (data, _ := ...). If reading fails, you’ll get misleading assertion failures.

💡 Suggested fix
-			data, _ := io.ReadAll(resp.Body)
-			body := string(data)
+			data, err := io.ReadAll(resp.Body)
+			if err != nil {
+				t.Fatalf("%s: failed to read response body: %v", k, err)
+			}
+			body := string(data)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/server/login/login_test.go` around lines 248 - 257, The test currently
ignores the error returned by io.ReadAll(resp.Body) in the block handling
testCase.ExpectContains; change the code to capture and check the error (e.g.
data, err := io.ReadAll(resp.Body)), and if err != nil call t.Fatalf or t.Errorf
with the error (including context like which test case key `k`) instead of
proceeding to string conversion and substring assertions; update references in
this block (resp.Body read, variable `body`, and the t.Errorf checks for missing
substrings) so assertions only run when the read succeeded.
pkg/server/selectprovider/selectprovider_test.go (1)

98-107: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Don’t ignore io.ReadAll errors in selectprovider test.

data, _ := io.ReadAll(resp.Body) drops the error. If reading fails, your strings.Contains assertions may report missing substrings for the wrong reason.

💡 Suggested fix
-			data, _ := io.ReadAll(resp.Body)
-			body := string(data)
+			data, err := io.ReadAll(resp.Body)
+			if err != nil {
+				t.Fatalf("%s: failed to read response body: %v", k, err)
+			}
+			body := string(data)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/server/selectprovider/selectprovider_test.go` around lines 98 - 107, The
test is ignoring the error from io.ReadAll(resp.Body) which can mask I/O
failures; change the read to capture the error (replace the underscore) and if
err != nil call t.Fatalf or t.Errorf (including the test case key `k` and the
error) before using `body`, then continue with the existing `strings.Contains`
checks that reference `testCase.ExpectContains` and `t.Errorf` for missing
substrings.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/authenticator/password/keystonepassword/keystonepassword_test.go`:
- Around line 61-64: The test HTTP handler currently ignores errors from
io.ReadAll(r.Body) causing json.Unmarshal to mask read failures; change the
handler to capture and assert the read error before unmarshalling (e.g., check
the error returned by io.ReadAll and call th.AssertNoErr or t.Fatalf with that
error and return), so the code around the AuthRequest parsing (variables x
AuthRequest, the io.ReadAll call and subsequent json.Unmarshal) fails fast with
a clear error if the body read fails.

In `@pkg/oauthserver/oauth_apiserver_test.go`:
- Around line 36-38: Update the octal file mode literals in
oauth_apiserver_test.go to use Go's modern form: replace occurrences of
os.FileMode(0600) with os.FileMode(0o600) wherever os.WriteFile is called (e.g.,
the os.WriteFile(tmpfile.Name(), ... , os.FileMode(0600)) invocations around the
tmpfile writes at the three places noted). Keep the same type and semantics,
only change the numeric literal to 0o600 for readability and consistency.

---

Outside diff comments:
In `@pkg/oauthserver/oauth_apiserver_test.go`:
- Around line 29-101: Each test (TestGetInvalidSessionSecretsFile,
TestGetEmptySessionSecretsFile, TestGetValidSessionSecretsFile) opens a temp
file with os.CreateTemp and then calls os.WriteFile on its name without closing
the *os.File handle, which can leak resources and cause flaky behavior on some
platforms; fix by calling tmpfile.Close() (or defer tmpfile.Close()) immediately
after successful os.CreateTemp returns and before calling
os.WriteFile/tmpfile.Name(), ensuring the file handle is released before
getSessionSecrets reads it.

In `@pkg/server/login/login_test.go`:
- Around line 248-257: The test currently ignores the error returned by
io.ReadAll(resp.Body) in the block handling testCase.ExpectContains; change the
code to capture and check the error (e.g. data, err := io.ReadAll(resp.Body)),
and if err != nil call t.Fatalf or t.Errorf with the error (including context
like which test case key `k`) instead of proceeding to string conversion and
substring assertions; update references in this block (resp.Body read, variable
`body`, and the t.Errorf checks for missing substrings) so assertions only run
when the read succeeded.

In `@pkg/server/selectprovider/selectprovider_test.go`:
- Around line 98-107: The test is ignoring the error from io.ReadAll(resp.Body)
which can mask I/O failures; change the read to capture the error (replace the
underscore) and if err != nil call t.Fatalf or t.Errorf (including the test case
key `k` and the error) before using `body`, then continue with the existing
`strings.Contains` checks that reference `testCase.ExpectContains` and
`t.Errorf` for missing substrings.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 86780ec2-73c0-40cb-9007-667113b35dcd

📥 Commits

Reviewing files that changed from the base of the PR and between 3aa95c0 and 472e50b.

📒 Files selected for processing (9)
  • pkg/authenticator/password/basicauthpassword/basicauthpassword.go
  • pkg/authenticator/password/keystonepassword/keystonepassword_test.go
  • pkg/config/stringsource.go
  • pkg/oauth/external/gitlab/gitlab_oauth.go
  • pkg/oauth/external/openid/openid.go
  • pkg/oauthserver/auth.go
  • pkg/oauthserver/oauth_apiserver_test.go
  • pkg/server/login/login_test.go
  • pkg/server/selectprovider/selectprovider_test.go

Comment on lines 61 to 64
var x AuthRequest
body, _ := ioutil.ReadAll(r.Body)
body, _ := io.ReadAll(r.Body)
th.AssertNoErr(t, json.Unmarshal(body, &x))
domainName := x.Auth.Identity.Password.User.Domain.Name

@coderabbitai coderabbitai Bot Apr 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Handle request-body read errors in the Keystone test handler.

The handler ignores errors from io.ReadAll(r.Body) (body, _ := ...). If that fails, the subsequent json.Unmarshal assertion won’t clearly indicate the underlying read problem.

💡 Suggested fix
-		var x AuthRequest
-		body, _ := io.ReadAll(r.Body)
-		th.AssertNoErr(t, json.Unmarshal(body, &x))
+		var x AuthRequest
+		body, err := io.ReadAll(r.Body)
+		th.AssertNoErr(t, err)
+		th.AssertNoErr(t, json.Unmarshal(body, &x))
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/authenticator/password/keystonepassword/keystonepassword_test.go` around
lines 61 - 64, The test HTTP handler currently ignores errors from
io.ReadAll(r.Body) causing json.Unmarshal to mask read failures; change the
handler to capture and assert the read error before unmarshalling (e.g., check
the error returned by io.ReadAll and call th.AssertNoErr or t.Fatalf with that
error and return), so the code around the AuthRequest parsing (variables x
AuthRequest, the io.ReadAll call and subsequent json.Unmarshal) fails fast with
a clear error if the body read fails.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1, this seems like a valid addition/fix here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@liouk, thanks for the confirmation! Here is the suggested fix for the PR author to apply:

 		var x AuthRequest
-		body, _ := io.ReadAll(r.Body)
-		th.AssertNoErr(t, json.Unmarshal(body, &x))
+		body, err := io.ReadAll(r.Body)
+		th.AssertNoErr(t, err)
+		th.AssertNoErr(t, json.Unmarshal(body, &x))

This ensures a body-read failure surfaces immediately with a clear error, rather than being silently swallowed and potentially causing a confusing json.Unmarshal failure downstream.

Comment on lines +36 to 38
if err := os.WriteFile(tmpfile.Name(), []byte("invalid content"), os.FileMode(0600)); err != nil {
t.Fatal(err)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use 0o600 instead of 0600 for file mode literals (style/clarity).

These tests use os.FileMode(0600) when writing temp files. Consider switching to os.FileMode(0o600) (Go’s modern octal literal form) for readability/consistency.

Also applies to: 61-63, 90-92

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/oauthserver/oauth_apiserver_test.go` around lines 36 - 38, Update the
octal file mode literals in oauth_apiserver_test.go to use Go's modern form:
replace occurrences of os.FileMode(0600) with os.FileMode(0o600) wherever
os.WriteFile is called (e.g., the os.WriteFile(tmpfile.Name(), ... ,
os.FileMode(0600)) invocations around the tmpfile writes at the three places
noted). Keep the same type and semantics, only change the numeric literal to
0o600 for readability and consistency.

@sebrandon1 sebrandon1 changed the title Migrate away from deprecated ioutil CNF-23374: Migrate away from deprecated ioutil Apr 30, 2026
@openshift-ci-robot

openshift-ci-robot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

@sebrandon1: This pull request references CNF-23374 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

ioutil has been deprecated since Go 1.16: https://go.dev/doc/go1.16#ioutil

Tracking issue: redhat-best-practices-for-k8s/telco-bot#52

Core updates to file and stream reading:

  • Replaced ioutil.ReadAll with io.ReadAll for reading from streams and HTTP response bodies across authentication, OAuth, and server-related packages. [1] [2] [3] [4] [5] [6] [7]
  • Replaced ioutil.ReadFile with os.ReadFile for reading files in configuration and OAuth server logic, such as loading secrets and certificates. [1] [2] [3] [4] [5]

Test code modernization:

  • Updated tests to use os.CreateTemp instead of ioutil.TempFile and os.WriteFile instead of ioutil.WriteFile for creating and writing temporary files. [1] [2] [3] [4] [5]
  • Updated imports and usage in test files to use io.ReadAll instead of ioutil.ReadAll for reading HTTP response bodies. [1] [2] [3] [4]

General import cleanup:

These updates ensure the codebase is up-to-date with the latest Go standards and removes reliance on deprecated APIs.

Summary by CodeRabbit

  • Chores
  • Updated internal code to use current Go standard library APIs.

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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 30, 2026
@sebrandon1

Copy link
Copy Markdown
Member Author

/retest

@sebrandon1 sebrandon1 force-pushed the ioutil_deprecation branch from 472e50b to c1dafda Compare June 5, 2026 16:18
@sebrandon1 sebrandon1 force-pushed the ioutil_deprecation branch from c1dafda to b5c492c Compare June 30, 2026 21:46
@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@sebrandon1: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants