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

Fixes #33577 - Only enable Foreman Puppet plugin with Foreman #723

Merged
merged 1 commit into from
Sep 30, 2021

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Sep 28, 2021

If the user passed in --no-enable-foreman then the Foreman plugin should not be enabled.

@ekohl
Copy link
Member Author

ekohl commented Sep 28, 2021

I chose to change the existing migration so we don't end up in a bad state, but I wonder if we should instead create another migration as well that disables it if foreman itself is disabled. Users who are affected couldn't have upgraded to 3.0.0 (https://community.theforeman.org/t/foreman-proxy-3-0-installation-fails-with-parameter-config-file-group-expects-a-string-value/25438) so perhaps it's ok, but it may not be the cleanest.

Copy link
Contributor

@wbclark wbclark left a comment

Choose a reason for hiding this comment

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

I would personally vote for a new migration that disables the plugin if foreman itself is disabled, for the reason that it would reduce the number of accidentally broken configurations in the wild (vs. the solution here which stops adding to them but doesn't correct those which already exist)

Perhaps the difference is minimal or low impact but I like the practice of trying to reduce that drift wherever possible, as that can prevent future problems.

If the user passed in --no-enable-foreman then the Foreman plugin should
not be enabled. The same is true for the CLI side of it.

The add-cli migration is changed to respect an already present option
that is false in order to properly test this change.
@ekohl ekohl force-pushed the 33577-fix-puppet-migration branch from 1b39736 to ce89a30 Compare September 29, 2021 15:21
@ekohl
Copy link
Member Author

ekohl commented Sep 29, 2021

Updated. Now also contains the CLI part of it (as reported by the user) and tests. I've started a new pattern for the tests and want to look at using for all other tests. The reporting of what failed is much clearer to me. We can also pull the let blocks to a higher level to share them between tests.

@ekohl ekohl merged commit ce89a30 into theforeman:develop Sep 30, 2021
@ekohl ekohl deleted the 33577-fix-puppet-migration branch September 30, 2021 20:55
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