puppetlabs / facter

Collect and display system facts
https://puppet.com/open-source/#osp
Apache License 2.0
616 stars 494 forks source link

Fix reference to unknown 'log' library in aggregate.rb #2714

Closed personjs closed 1 month ago

personjs commented 1 month ago

Describe the Bug

Line 115 of aggregate.rb tries to call 'log.warn', but 'log' is unknown, which breaks legacy builds.

Expected Behavior

Custom facts using legacy aggregate reference do not cause errors to be thrown during puppet install

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create new module with lib/facter/[customfact].rb that uses 'Facter.define_fact([name], type: :aggregate)' and 'define_resolution([name], type: :aggregate)
  2. Run puppet

Environment

Additional Context

github-actions[bot] commented 1 month ago

Migrated issue to FACT-3467

cthorn42 commented 1 month ago

@personjs thanks for the bug report, we'll look into this.

joshcooper commented 1 month ago

This should be fixed in https://github.com/puppetlabs/facter/pull/2722/commits/00bc4db614a2d97331cf1210f8261f2d965d1e1f

joshcooper commented 1 month ago

Fixed in https://github.com/puppetlabs/facter/pull/2722/commits/707e8f928135613033af5b9248f60254c9d17d91