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

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.

lib/kafo/scenario_manager.rb Outdated Show resolved Hide resolved
test/kafo/configuration_test.rb Outdated Show resolved Hide resolved
lib/kafo/configuration.rb Outdated Show resolved Hide resolved
@@ -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

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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants