Summary
Facter::Core::Execution.execute still accepts legacy timeout option aliases (time_limit, limit) even though only timeout is treated as valid. This is a soft deprecation signal inferred from behavior and tests.
Why This Is Soft / Inferred
There is no explicit @deprecated annotation or explicit deprecation warning string for time_limit / limit. However:
- implementation still maps legacy keys to timeout behavior, and
- tests label this path as
when passing deprecated arguments.
Evidence
lib/facter/custom_facts/core/execution/base.rb:117 maps timeout as:
options[:timeout] || options[:time_limit] || options[:limit]
lib/facter/custom_facts/core/execution/base.rb:122 warns unknown keys but does not reject legacy aliases.
spec/custom_facts/core/execution_spec.rb:69 explicitly uses context name when passing deprecated arguments.
spec/custom_facts/core/execution_spec.rb:70 exercises aliases %i[time_limit limit].
Proposed Plan
- Next major release:
- Keep
time_limit and limit behavior for compatibility.
- Add explicit deprecation warning when either alias is used.
- Add release-note and docs migration guidance to use
timeout.
- Subsequent major release:
- Remove support for
time_limit and limit aliases.
- Support only
timeout.
Compatibility / Risk
- Low risk in next major release (warning only).
- Medium risk in removal release for custom facts/plugins still using aliases.
Implementation Notes
- In
extract_options, detect alias usage before timeout calculation and log a dedicated deprecation warning.
- Keep existing unknown-key warning behavior consistent.
- Add tests for deprecation warning emission and one-time warning semantics if desired.
Acceptance Criteria
- Next major release emits explicit deprecation warning for
time_limit/limit usage.
- Behavior remains backward compatible in next major release.
- Changelog/docs include migration and removal timeline.
Follow-up Removal Issue
- Track removal in next major once deprecation window closes.
Suggested Tests
- Unit test:
timeout: works unchanged.
- Unit test:
time_limit: and limit: still work in next major release and emit deprecation warning.
Summary
Facter::Core::Execution.executestill accepts legacy timeout option aliases (time_limit,limit) even though onlytimeoutis treated as valid. This is a soft deprecation signal inferred from behavior and tests.Why This Is Soft / Inferred
There is no explicit
@deprecatedannotation or explicit deprecation warning string fortime_limit/limit. However:when passing deprecated arguments.Evidence
lib/facter/custom_facts/core/execution/base.rb:117maps timeout as:options[:timeout] || options[:time_limit] || options[:limit]lib/facter/custom_facts/core/execution/base.rb:122warns unknown keys but does not reject legacy aliases.spec/custom_facts/core/execution_spec.rb:69explicitly uses context namewhen passing deprecated arguments.spec/custom_facts/core/execution_spec.rb:70exercises aliases%i[time_limit limit].Proposed Plan
time_limitandlimitbehavior for compatibility.timeout.time_limitandlimitaliases.timeout.Compatibility / Risk
Implementation Notes
extract_options, detect alias usage before timeout calculation and log a dedicated deprecation warning.Acceptance Criteria
time_limit/limitusage.Follow-up Removal Issue
Suggested Tests
timeout:works unchanged.time_limit:andlimit:still work in next major release and emit deprecation warning.