Skip to content

[Deprecation] ldapname Fact Option and Accessor #87

@silug

Description

@silug

Summary

ldapname on custom facts is deprecated and logs a warning that it will be removed.

Evidence

  • lib/facter/custom_facts/util/fact.rb:21 marks ldapname accessor as deprecated.
  • lib/facter/custom_facts/util/fact.rb:146 marks extract_ldapname_option! as deprecated.
  • lib/facter/custom_facts/util/fact.rb:150 logs: ldapname is deprecated and will be removed in a future version.
  • spec/custom_facts/util/fact_spec.rb:53 asserts the deprecation warning.

Proposed Change

  • Remove attr_accessor :ldapname from Facter::Util::Fact.
  • Remove option extraction for :ldapname.
  • Remove collection-level forwarding to extract_ldapname_option! (lib/facter/custom_facts/util/collection.rb:166).

Compatibility / Risk

  • Medium risk for custom facts that still pass ldapname: or read fact.ldapname.
  • Behavior is already flagged at runtime; this is a planned hard removal.

Implementation Notes

  • Remove warning path after API removal.
  • Update tests that assert warning behavior to assert unsupported option behavior.
  • Document migration: use fact name and modern custom fact metadata instead of LDAP-specific aliasing.

Acceptance Criteria

  • ldapname is no longer accepted as a fact option.
  • Facter::Util::Fact no longer exposes ldapname.
  • No deprecation warning about ldapname remains in runtime logs.

Suggested Tests

  • Unit test that ldapname: option is rejected or ignored per final policy.
  • Unit test that no ldapname accessor is present.

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