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

[Magnesium RC] Fix bug introduced in #58238 feature flag implementation #58744

Merged
merged 7 commits into from
Oct 19, 2020

Conversation

mlasevich
Copy link
Contributor

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.

@mlasevich mlasevich requested a review from a team as a code owner October 16, 2020 04:59
@mlasevich mlasevich requested review from garethgreenaway and removed request for a team October 16, 2020 04:59
@ghost ghost requested a review from krionbsd October 16, 2020 04:59
@max-arnold
Copy link
Contributor

@krionbsd Could you please tag this PR with the Magnesium milestone? The referenced PR was shipped in the Magnesium RC and this follow-up PR should fix the issue found while testing the RC.

@krionbsd krionbsd added the Magnesium Mg release after Na prior to Al label Oct 16, 2020
@s0undt3ch s0undt3ch changed the title Fix bug introduced in #58238 feature flag implementation [Magnesium RC] Fix bug introduced in #58238 feature flag implementation Oct 17, 2020
@max-arnold
Copy link
Contributor

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.

@myii
Copy link
Contributor

myii commented Oct 18, 2020

@mlasevich It would be useful to fix the typos from #58238 here as well:

@mlasevich
Copy link
Contributor Author

mlasevich commented Oct 18, 2020

@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 :-)

dwoz
dwoz previously approved these changes Oct 19, 2020
@dwoz
Copy link
Contributor

dwoz commented Oct 19, 2020

@mlasevich Please address @max-arnold's comment about adding a test to actually verify this functionality.

@dwoz dwoz self-requested a review October 19, 2020 15:15
@sagetherage sagetherage added this to the Magnesium milestone Oct 19, 2020
@mlasevich
Copy link
Contributor Author

@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.

@myii
Copy link
Contributor

myii commented Oct 19, 2020

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 master and tiamat pre-salted images:

Generally, all is working well. Having a problem with the tiamat jobs but that appears unrelated to this PR:

Testing locally, the issue is the configuration passed through to kitchen-salt:

provisioner:
  name: salt_solo
  ...
  salt_minion_extra_config:
    features:
      enable_slsvars_fixes: true
  • With a dirty hack to avoid salt_minion_extra_config, I was able to confirm that this PR is also working fine on tiamat as well.

@mlasevich
Copy link
Contributor Author

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 master and tiamat pre-salted images:

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 :-)

@mlasevich
Copy link
Contributor Author

@mlasevich Please address @max-arnold's comment about adding a test to actually verify this functionality.

Added unit tests to cover flag selection.

@dwoz dwoz merged commit 26629ef into saltstack:master Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-failing-test Magnesium Mg release after Na prior to Al
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants