Skip to content

[Deprecation] Puppet::Util Environment Wrapper Helpers #342

@silug

Description

@silug

Summary

Several Puppet::Util helpers are explicitly deprecated in favor of direct ENV usage.

Evidence

  • lib/puppet/util.rb:44 get_env deprecated.
  • lib/puppet/util.rb:51 get_environment deprecated.
  • lib/puppet/util.rb:58 clear_environment deprecated.
  • lib/puppet/util.rb:65 set_env deprecated.
  • lib/puppet/util.rb:72 merge_environment deprecated.

Proposed OpenVox 9 Change

  • Remove deprecated wrapper methods.
  • Update internal callers to use ENV directly or withenv where scoped overrides are needed.

Compatibility / Risk

  • Medium risk for external code importing these helpers.
  • Internal migration is straightforward.

Implementation Notes

  • Identify internal call sites with rg before removal.
  • Keep withenv behavior if still actively used and not deprecated.
  • Update developer docs that reference deprecated wrappers.

Acceptance Criteria

  • Deprecated wrapper methods no longer exist in Puppet::Util.
  • Internal codebase contains no calls to removed wrappers.
  • Environment manipulation behavior is unchanged where supported APIs remain.

Suggested Tests

  • Unit tests for environment-sensitive code paths.
  • Scoped environment restoration tests around withenv.

Metadata

Metadata

Assignees

No one assigned

    Labels

    deprecationThis issue pertains to an item/topic which has been deprecated.

    Type

    No type

    Projects

    Status

    Deprecated

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions