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

Cleanup configuration file #340

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

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Aug 20, 2021

No description provided.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think this makes sense.

@@ -135,7 +134,7 @@ def modules
end

def module(name)
modules.find { |m| m.name == name }
modules.find { |m| m.identifier == name }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a bugfix. Could you provide a bit more info about why it's wrong?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to update the commit message with more information. The most telling is to look at the hook context documentation. Unfortunately, I think name in some areas of code refers to the Puppet naming scheme with :: and in other places it references this internal "name" construct that Kafo creates -- https://github.com/theforeman/kafo/blob/master/lib/kafo/puppet_module.rb#L175

ehelms added 2 commits August 23, 2021 12:12
The previous implementation relied on the name of the module to be
specified which is a specially constructured replacement of colons
with underscores. The hook context calls on this method and indicates
using the identifier as a typicaly Puppet user would encounter it.
For example, my_example::foo would be specified rather than a user
thinking to convert this to my_example_foo. Thus this worked for
single level classes, this would have failed for multilevel
classes.
@ehelms ehelms force-pushed the cleanup-configuration-file branch from c85e949 to 6defecf Compare August 23, 2021 16:14
@ehelms ehelms requested a review from ekohl September 3, 2021 12:27
@ehelms
Copy link
Member Author

ehelms commented Oct 12, 2021

@ekohl Could you revisit a review on this?

@ehelms ehelms requested a review from wbclark November 3, 2021 18:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants