-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Another exception that is caused by a syntax error #7905
Comments
I'm not sure if this is the case here but the exception might also be raised due to a missing -. |
A missing dash where? Also, we could use |
|
vagrant@precise64:~$ salt --versions-report |
Ah, yes, that's almost certainly the issue. We just need to catch that and log a more useful error. Thanks for the report! |
:todo: Add testcase to confirm #8174 fix. Assigned to me for the test case. |
@s0undt3ch I think here the error is coming from I made a test for that: # C should fail with bad list error message B: # ok file.exist: - name: /foo/bar/foobar # ok /foo/bar/foobar: file.exist # nok C: /foo/bar/foobar: file.exist I wrote an integration test for that (and the #8174 issue, in fact), but I cannot make it running with |
I don't know the answer but could it be a stale |
mmmh, made a silly typo, I'll push a the tests soon |
… sls syntax errors
I'll verify that this works tomorrow. |
It reports the error, however the error message is incorrect.
The parser shouldn't expect a ':' after a missing '-'. |
@thedrow: could you post your sls file containing the postgresql-9.3/- pgadmin3 syntax error? |
@regilero Sure, I'll do so by the end of the day :) |
Oh nevermind it's already open so there you go: postgres:
pkgrepo.managed:
- name: deb http://apt.postgresql.org/pub/repos/apt/ squeeze-pgdg main
- key_url: http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc
pkg.installed:
- pkgs:
postgresql-9.3
- pgadmin3 |
Made some tests. This is quite unrelated with previous syntax error. This is a yaml render bad syntax detection, which is catched, so maybe not even a bug. The problem is there are two missing spaces before # syntax ok A: file.exists: - name: foo # syntax not ok A: file.exists: - name: bar |
So while it doesn't crash it won't report the error correctly. Can you take it upstream if possible? |
What do you mean by "take it upstream if possible"? We will cherry-pick this fix for 0.17.2, if that's what you mean. |
Oh I thought you meant the yaml parser. If the problem is with your yaml renderer (stateconf) I'll file another issue about this. |
@thedrow: if you are unhappy with the pyyaml output message for theses missing spaces, then it's an issue for pyyaml project. ScannerError: while scanning a simple key in "", line 8, column 7: postgresql-9.3 ^ could not found expected ':' in "", line 9, column 7: - pgadmin3 But it ias maybe a valid pyyaml message, as it is parsing your postgresql-9.3 as a key, and expect a ':' after that. Previous key in the list, for the parser was 'pkgs:' and is maybe just a simple null value key. |
This is with the latest develop branch.
The text was updated successfully, but these errors were encountered: