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

Boolean plugin has random behavior #2222

Open
Piankero opened this Issue Sep 3, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@Piankero
Contributor

Piankero commented Sep 3, 2018

I tried to use the boolean plugin. After changing a value from a previously set value the plugin rejects it with a nonsense error.

sudo kdb mount bool.conf /bool dump boolean
kdb setmeta /bool/b type boolean
#>Using keyname spec/bool/b
kdb set /bool/b true
#>Using name system/bool/b
#>Create a new key system/bool/b with string "true"
kdb get /bool/b
#>1
kdb set /bool/b false
#>Using name system/bool/b
#>The command kdb set failed while accessing the key database with the info:
#>Sorry, the error (#153) occurred ;(
#>Description: not a valid boolean value
#>Reason: true is not a valid boolean value
#>Ingroup: plugin
#>Module: boolean
#>At: /media/wespe/extended/repository/piankero-libelektra/src/plugins/boolean/boolean.c:345
#>Mountpoint: system/bool
#>Configfile: /etc/kdb/bool.conf.16220:1535989849.48285.tmp

What did I do wrong?

@markus2330

This comment has been minimized.

Show comment
Hide comment
@markus2330

markus2330 Sep 4, 2018

Contributor

Thank you for reporting the issue!

"random" is a bit misleading here, it means that sometimes it does what it should and after executing the same commands, it sometimes does not.

And are you sure you used the commands exactly as mentioned above? You did not even add the boolean plugin?

To avoid such problems, why not simply creating a PR modifying the Example in the boolean plugin and let the build server check that the problem you want to show actually occurs.

I am not sure what you tried and can not reproduce the problem.

What I did see, however, that the documentation is lacking to mention "check/type" next to "type" and infos/metadata is completely empty. The docu also hides which values are "true/false" by default (only shown on the very bottom).

Contributor

markus2330 commented Sep 4, 2018

Thank you for reporting the issue!

"random" is a bit misleading here, it means that sometimes it does what it should and after executing the same commands, it sometimes does not.

And are you sure you used the commands exactly as mentioned above? You did not even add the boolean plugin?

To avoid such problems, why not simply creating a PR modifying the Example in the boolean plugin and let the build server check that the problem you want to show actually occurs.

I am not sure what you tried and can not reproduce the problem.

What I did see, however, that the documentation is lacking to mention "check/type" next to "type" and infos/metadata is completely empty. The docu also hides which values are "true/false" by default (only shown on the very bottom).

@Piankero

This comment has been minimized.

Show comment
Hide comment
@Piankero

Piankero Sep 11, 2018

Contributor

proof

This is an actual screenshot from my system.

And are you sure you used the commands exactly as mentioned above? You did not even add the boolean plugin?

I typed in the commands manually, looks like i did a mistake there when taking over the commands from the console. But the problem remains.

Contributor

Piankero commented Sep 11, 2018

proof

This is an actual screenshot from my system.

And are you sure you used the commands exactly as mentioned above? You did not even add the boolean plugin?

I typed in the commands manually, looks like i did a mistake there when taking over the commands from the console. But the problem remains.

@markus2330

This comment has been minimized.

Show comment
Hide comment
@markus2330

markus2330 Sep 11, 2018

Contributor

Sorry, seems like we had a misunderstanding: I had no doubt that you have this problem, it is only that I could not reproduce it. The goal is to improve Elektra, not to demonstrate who is right. And if I type the text from the screenshot, this won't increase the chance that I'll be able to reproduce (I might mistype something, something that happened before might be relevant, ...). With a PR and reproducibility on the buildserver there is no possibility of misunderstanding/typing errors/... on both sides.

And in this case the PR is useful anyway because the boolean docu is not very good.

Contributor

markus2330 commented Sep 11, 2018

Sorry, seems like we had a misunderstanding: I had no doubt that you have this problem, it is only that I could not reproduce it. The goal is to improve Elektra, not to demonstrate who is right. And if I type the text from the screenshot, this won't increase the chance that I'll be able to reproduce (I might mistype something, something that happened before might be relevant, ...). With a PR and reproducibility on the buildserver there is no possibility of misunderstanding/typing errors/... on both sides.

And in this case the PR is useful anyway because the boolean docu is not very good.

@Piankero

This comment has been minimized.

Show comment
Hide comment
@Piankero

Piankero Sep 11, 2018

Contributor

Alright, I thought that the typos in my initial Comment made you believe the plugin actually worked but I might have misconfigured something.

To avoid such problems, why not simply creating a PR modifying the Example in the boolean plugin and let the build server check that the problem you want to show actually occurs.

What do you mean by "Example"? Do you mean a Testcase?

Contributor

Piankero commented Sep 11, 2018

Alright, I thought that the typos in my initial Comment made you believe the plugin actually worked but I might have misconfigured something.

To avoid such problems, why not simply creating a PR modifying the Example in the boolean plugin and let the build server check that the problem you want to show actually occurs.

What do you mean by "Example"? Do you mean a Testcase?

@markus2330

This comment has been minimized.

Show comment
Hide comment
@markus2330

markus2330 Sep 12, 2018

Contributor

Yes, simply extend the example in the readme. Or add one more example.

Contributor

markus2330 commented Sep 12, 2018

Yes, simply extend the example in the readme. Or add one more example.

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