Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Improvement of Nested Fact Handling in facts_hash #134

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lcharreau
Copy link

In the facts_hash method, when encountering multiple facts with nested elements sharing the same base name (e.g., multiple facts related to networking), the current logic concatenated the keys to make them unique (e.g., "networking_hostname_networking_fqdn" instead of "networking_hostname" and "networking_fqdn"). This behaviour was incorrect as it treated them as a single fact instead of separate ones.

Improvements to fact queries:

Enhancements to nested keys processing:

  • lib/puppetdb/parser_helper.rb: Updated the facts_hash method to group nested keys individually, create unique names, and return nested results as an array of hashes to be added individually. This change ensures that nested results are handled properly and avoids redundant assignments.

Louis Charreau added 2 commits November 17, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant