Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

legacy_facts: Deal with variables ending in facts #155

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

ekohl
Copy link

@ekohl ekohl commented Sep 29, 2023

Summary

The whole fact name is now matched, instead of just a subset. It also enhances the code to use a single regular expression, using back references and named capture groups.

Additional Context

A reproducer for this from a real module:

$interface_facts = $facts['networking']['interfaces'][$foreman_proxy::dhcp_interface]
$interface_facts['network']

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified.

@gavindidrichsen
Copy link

Hi @Ekhol. As you mentioned on here, once this PR #157 gets merged in you ought to be able to rebase this one to complete.

@ekohl ekohl force-pushed the fix-legacy-facts branch from 664969b to 24ecc3f Compare October 3, 2023 15:56
@ekohl
Copy link
Author

ekohl commented Oct 3, 2023

Rebase done.

A reproducer for this from a real module:
```puppet
$interface_facts = $facts['networking']['interfaces'][$foreman_proxy::dhcp_interface]
$interface_facts['network']
```

It also enhances the code to use a single regular expression, using back
references and named capture groups.
@ekohl ekohl force-pushed the fix-legacy-facts branch from 24ecc3f to 2c50811 Compare October 3, 2023 15:58
@bastelfreak bastelfreak added the bug Something isn't working label Oct 3, 2023
@ekohl
Copy link
Author

ekohl commented Oct 3, 2023

And green now.

@bastelfreak bastelfreak merged commit fa01ae6 into puppetlabs:main Oct 3, 2023
@ekohl ekohl deleted the fix-legacy-facts branch October 6, 2023 16:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants