Skip to content

[Deprecation] Facter::Core::Execution.exec #88

@silug

Description

@silug

Summary

Facter::Core::Execution.exec is explicitly deprecated in favor of Facter::Core::Execution.execute.

Evidence

  • lib/facter/custom_facts/core/execution.rb:97 marks exec as deprecated with replacement guidance (Use #{execute} instead).
  • lib/facter/custom_facts/core/execution.rb:100 delegates exec to @@impl.execute(command, on_fail: nil).
  • spec/custom_facts/core/execution_spec.rb:39 verifies #exec delegation behavior.

Proposed Change

  • Remove Facter::Core::Execution.exec.
  • Keep execute as the public command execution API.

Compatibility / Risk

  • Medium risk for custom facts/plugins calling Facter::Core::Execution.exec.
  • Migration is direct and low-complexity (exec(cmd) -> execute(cmd, on_fail: nil) as needed).

Implementation Notes

  • Update internal call sites first.
  • Update public API docs/examples to only mention execute.
  • If needed, include a clear release-note migration snippet.

Acceptance Criteria

  • Facter::Core::Execution.exec no longer exists.
  • Internal code uses execute only.
  • Test suite no longer expects exec delegation.

Suggested Tests

  • Unit tests for execute success/failure behavior (on_fail, timeout, logger).
  • Negative API test for removed exec entry point if compatibility policy requires explicit error.

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