Skip to content

Replace use of ioutil with os/io equivalents.#545

Open
atombrella wants to merge 1 commit into
hashicorp:mainfrom
atombrella:feature/ioutil_deprecation
Open

Replace use of ioutil with os/io equivalents.#545
atombrella wants to merge 1 commit into
hashicorp:mainfrom
atombrella:feature/ioutil_deprecation

Conversation

@atombrella
Copy link
Copy Markdown
Contributor

Related Issue

Description

ioutil has been deprecated for quite some time. Except for the Mode() that is now Type() for the same file bits, it was just a few replace operations in my editor.

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

@radeksimko radeksimko marked this pull request as draft February 16, 2026 12:47
@radeksimko radeksimko marked this pull request as ready for review February 16, 2026 12:47
@radeksimko radeksimko force-pushed the feature/ioutil_deprecation branch from bdec33b to d24695d Compare February 16, 2026 12:49
Copy link
Copy Markdown
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

Looks like some of the changes, specifically relating to ioutil.TempDir & os.MkdirTemp are probably not equivalent as the modified tests are now failing due to permissions issues. See failed tests.

Perhaps we could resolve that by leveraging t.TempDir() as a parent directory, which - aside from being writable - also has the added benefit of being cleaned up automatically by the test itself (rather than OS).

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.

2 participants