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

validate_string fails for integer #28

Closed
NoodlesNZ opened this issue Nov 19, 2014 · 5 comments
Closed

validate_string fails for integer #28

NoodlesNZ opened this issue Nov 19, 2014 · 5 comments

Comments

@NoodlesNZ
Copy link
Contributor

When running ganglia::web with the defaults it produces this error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 8652 is not a string. It looks to be a Fixnum on node ganglia.example.com

It looks like in future parser it is more strict and $ganglia_port = 8652 fails validate_string().

@jhoblitt
Copy link
Owner

Did it give you a line number? I'm not surprised by the future parser failing on it but I don't understand why the future parser runs in the travis matrix aren't failing at that point.

@NoodlesNZ
Copy link
Contributor Author

Does travis use future parser and future evaluator? Things are a little vague, but it seems that it evaluates bare word numbers as Fixnum. This can be worked around by setting --evaluator=current

@NoodlesNZ
Copy link
Contributor Author

Actually I think --evaluator was removed recently.

If you want to test this out you can use the following as test.pp:

$var = 123
validate_string($var)

and run puppet apply --parser future test.pp
It should error out

If you change $var = 123 to $var = "123" then that should pass the validate_string() check

I'm still not sure why travis doesn't pick this up

@NoodlesNZ
Copy link
Contributor Author

Have added a PR #32 to address this

@jhoblitt
Copy link
Owner

#32 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants