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 a circular loading issue with mongodb::repo #474

Merged
merged 3 commits into from
Jul 15, 2018

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Jun 25, 2018

mongodb::globals includes mongodb::repo mongodb::repo inherits from
mongodb::params mongodb::params inherits from globals

We work around this by removing the inheritance from mongodb::repo and
requiring explicit parameters. We then pass in the parameters explicitly in
mongodb::globals. Since repo is a private class this shouldn't be
considered breaking an API. While we're at it we add types to the
parameters we change.

Fixes #428

Also ensures the yumrepo is absent rather than disabled.

$ensure = $mongodb::params::ensure,
$version = $mongodb::params::version,
Variant[Enum['present', 'absent'], Boolean] $ensure = 'present',
Optional[String] $version = undef,
$repo_location = undef,
$proxy = undef,
$proxy_username = undef,
$proxy_password = undef,
Copy link
Member

Choose a reason for hiding this comment

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

can you please align the = please?

Copy link
Member Author

Choose a reason for hiding this comment

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

Should we align or remove all alignment? With puppet data types I think alignment makes it harder to read.

mongodb::globals includes mongodb::repo
mongodb::repo inherits from mongodb::params
mongodb::params inherits from globals

We work around this by removing the inheritance from mongodb::repo and
requiring explicit parameters. We then pass in the parameters explicitly
in mongodb::globals. Since repo is a private class this shouldn't be
considered breaking an API. While we're at it we add types to the
parameters we change.

Fixes voxpupuli#428
Rather than disabling it, we should actually remove it. This is cleaner.
@ekohl
Copy link
Member Author

ekohl commented Jun 28, 2018

Updated with another commit added to only use local vars in mongodb::repo so it really is a standalone class.

@pschichtel
Copy link

I have these changes running and can confirm the repo management works.

@pschichtel
Copy link

What is blocking this?

@ekohl ekohl added the bug Something isn't working label Jul 12, 2018
@ekohl
Copy link
Member Author

ekohl commented Jul 12, 2018

@bastelfreak could you re-review this?

@bastelfreak
Copy link
Member

thanks for the patch @ekohl !

@bastelfreak bastelfreak merged commit ef84654 into voxpupuli:master Jul 15, 2018
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.

3 participants