-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[Magnesium RC] Fix bug introduced in #58238 feature flag implementation #58744
Conversation
@krionbsd Could you please tag this PR with the |
The docs still contain feature flag name that differs from the actual implementation. And something needs to be improved in the unit-test so it actually checks the desired behaviour. |
@mlasevich It would be useful to fix the typos from #58238 here as well: |
I am a bit hesitant to update those as they were not added by me, but typos are typos - so might as well update :-) |
@mlasevich Please address @max-arnold's comment about adding a test to actually verify this functionality. |
Yeah, I looked at it yesterday - the only thing that was not covered was the feature flag wrapper, which is why the unit tests passed despite the bug. I wrote a unit test for feature flag stuff, but have not been able to test it as for whatever reason, nox does not work with this project for me. I'll throw together a VM this morning and get it tested and committed. |
After @max-arnold suggested the idea, I've run tests across ~85 formulas, including this fix and using the feature flag in the minion configuration, for both
Generally, all is working well. Having a problem with the Testing locally, the issue is the configuration passed through to provisioner:
name: salt_solo
...
salt_minion_extra_config:
features:
enable_slsvars_fixes: true
|
… feature/58238-bugfix
I just wanted to start with unit tests. If unit tests cover functionality AND flag selection (which they do in this case now), this sort of a thing would not be a problem :-) There is some value in higher level tests, but those are more to catch deficiencies in unit tests :-) |
Added unit tests to cover flag selection. |
What does this PR do?
Fix bug introduced in 9380b56 in #58238
What issues does this PR fix or reference?
Fixes bug in #58238
Previous Behavior
A typo in commit dropped a return statement from a function
New Behavior
add return statement
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.