-
Notifications
You must be signed in to change notification settings - Fork 124
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
Enhance tmt --environment to also handle bool and numeric variables and values. #3279
Comments
Just realized, could you try False, not false? |
We did both already. Problem is the quotes. |
Have you tried |
One more question, is it really |
In the plan they have
and control the value through this variable. |
Thank you, that explains what’s happening. |
Because it will quote whatever is sent, 0 also ends up not disabling this one. Short answer, i did try 0 :) . So in main.fmf
And in the plan.fmf, as Karel mentioned above. |
Yes, I understand your problem now. A couple of notes for myself: values of environment variables are internally handled as strings. After all, it's how they are delivered to tmt by OS, and Need to check when the validation happens, it should really complain about the field where the boolean is expected to be a string, any of them, plus need to check the normalization mixin whether it could apply some extra normalization of trivial data types. It all lets sneak a string to a place where a boolean is expected, which should never be allowed to happen. |
Trying to pass a boolean,
False
, to try and disablepune:
, did not end up disabling prune.After collaborating with others on this we found the problem was the
False
ended up being passed in quotes to `prune:`` and so it did not disable it.e,g,
So when manually set in the plan it passes :
But through the env variable using tmt
We have a workaround to make this case work but in general it would be nice to allow passing bool from the command line environment variable.
cc: @kkaarreell
The text was updated successfully, but these errors were encountered: