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

Further clarifications on "unless" and "onlyif" requisites. #29729

Merged
merged 3 commits into from Dec 16, 2015

Conversation

Projects
None yet
3 participants
@rallytime
Contributor

rallytime commented Dec 15, 2015

Fixes #14634

  • "unless" is actually a NAND operator
  • remove usage of "opposite of unless" as that is confusing
  • add note about using shell's concept of T/F vs Python's concept

rallytime added some commits Dec 15, 2015

Further clarifications on "unless" and "onlyif" requisites.
Fixes #14634

- "unless" is actually a NAND operator
- remove usage of "opposite of unless" as that is confusing

cachedout added a commit that referenced this pull request Dec 16, 2015

Merge pull request #29729 from rallytime/fix-14634
Further clarifications on "unless" and "onlyif" requisites.

@cachedout cachedout merged commit 1f4810b into saltstack:2015.8 Dec 16, 2015

2 of 5 checks passed

default Merged build finished.
Details
jenkins/salt-pr-linode-ubuntu14.04-n Salt PR - Linode Ubuntu 14.04 #3120 — FAILURE
Details
jenkins/salt-pr-rs-cent7-n Salt PR - RS CentOS 7 #10627 — FAILURE
Details
jenkins/salt-pr-clone Salt PR - Clone Repository #12056 — SUCCESS
Details
jenkins/salt-pr-lint-n Salt PR - Code Lint #11758 — SUCCESS
Details

@rallytime rallytime deleted the rallytime:fix-14634 branch Dec 16, 2015

@lorengordon

This comment has been minimized.

Show comment
Hide comment
@lorengordon

lorengordon Dec 16, 2015

Contributor

This is funny, because these changes make it more clear that onlyif uses AND logic (all conditions are true), and so it actually is the opposite of unless (NAND literally is the opposite of AND). What previously was confusing to me was interpreting the condition reversal, 'any of false' vs 'all of true'; I actually resorted to a truth table to prove to myself 'any of false' was just NAND. :D

Contributor

lorengordon commented Dec 16, 2015

This is funny, because these changes make it more clear that onlyif uses AND logic (all conditions are true), and so it actually is the opposite of unless (NAND literally is the opposite of AND). What previously was confusing to me was interpreting the condition reversal, 'any of false' vs 'all of true'; I actually resorted to a truth table to prove to myself 'any of false' was just NAND. :D

@rallytime

This comment has been minimized.

Show comment
Hide comment
@rallytime

rallytime Dec 16, 2015

Contributor

@lorengordon oh! You're right. I had to pull out the truth table too, to make sure the NAND instead of NOR change was correct, because the words were getting muddled in my head. I guess I could add the opposite wording back in and add the AND for onlyif.

Contributor

rallytime commented Dec 16, 2015

@lorengordon oh! You're right. I had to pull out the truth table too, to make sure the NAND instead of NOR change was correct, because the words were getting muddled in my head. I guess I could add the opposite wording back in and add the AND for onlyif.

@lorengordon

This comment has been minimized.

Show comment
Hide comment
@lorengordon

lorengordon Dec 17, 2015

Contributor

@rallytime, heh, no, probably unnecessary. I think it gets too confusing to think of them as opposites due to the difference between them in testing a false vs true return. True and false are opposites too! I'd guess that few would appreciate the AND/NAND significance. I think the most confusing of the wording is gone now and it is much more clear than it was before. I just remembered having this same confusion with the docs, seeing the reported issue and the confusion there, and so I was actually grateful to see the PR and couldn't restrain myself from commenting. Thanks! 😄

Contributor

lorengordon commented Dec 17, 2015

@rallytime, heh, no, probably unnecessary. I think it gets too confusing to think of them as opposites due to the difference between them in testing a false vs true return. True and false are opposites too! I'd guess that few would appreciate the AND/NAND significance. I think the most confusing of the wording is gone now and it is much more clear than it was before. I just remembered having this same confusion with the docs, seeing the reported issue and the confusion there, and so I was actually grateful to see the PR and couldn't restrain myself from commenting. Thanks! 😄

@rallytime

This comment has been minimized.

Show comment
Hide comment
@rallytime

rallytime Dec 17, 2015

Contributor

@lorengordon No problem! I'll leave it. Thanks for the feedback!

Contributor

rallytime commented Dec 17, 2015

@lorengordon No problem! I'll leave it. Thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment