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

Fix datatype of attribute metadata #111

Merged
merged 2 commits into from
Dec 12, 2019

Conversation

mrolli
Copy link
Contributor

@mrolli mrolli commented Dec 11, 2019

Pull Request (PR) description

By adding datatypes in 4.1.0 the code now breaks as the attribute $metadata of class mrepo::repo actually does not only support a single string but also an array of strings. The strings are comprise of a set of keywords allowed to use.

This Pull Request (PR) fixes the following issues

n/a

Copy link

@genebean genebean left a comment

Choose a reason for hiding this comment

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

LGTM. I reviewed the template at templates/repo.conf.erb and this seems to match up to what is already in there.

Copy link
Member

@Dan33l Dan33l left a comment

Choose a reason for hiding this comment

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

Hi @mrolli thank you for the PR.
Please have a look to the inline comment.

Optional[String[1]] $ncc_username = undef,
Optional[String[1]] $ncc_password = undef,
Hash[String, String] $urls = {},
Variant[Enum['yum','apt','repomd','repoview'],Array[Enum['yum','apt','repomd','repoview']]] $metadata = 'repomd',
Copy link
Member

Choose a reason for hiding this comment

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

Like with bellow parameter update, it will be clearer to create a custom data type.

Choose a reason for hiding this comment

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

@mrolli - are you game to do the adjustment mentioned here? If not I am happy to do it.

Copy link
Contributor Author

@mrolli mrolli Dec 12, 2019

Choose a reason for hiding this comment

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

@Dan33l Hope this is what you meant. Didn't squash by intention to make the addition of the new datatype explicit.

Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure it's what he had in mind. Merged! Thanks for the fix.

Copy link
Member

@alexjfisher alexjfisher left a comment

Choose a reason for hiding this comment

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

LGTM

@alexjfisher alexjfisher added the bug Something isn't working label Dec 12, 2019
@alexjfisher alexjfisher merged commit fd630ef into voxpupuli:master Dec 12, 2019
@mrolli mrolli deleted the bugfix/metadata-wrong-type branch December 12, 2019 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants