-
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
Non-informative "Too many functions declared in state 'file' in SLS" #38098
Comments
@non7top can you explain how you are running into this specifically? Possibly a reproducable case? I'm just wondering if there is more information in the debug output as well. Thanks |
The offending snippet was like this which took me a while to identify. vim syntax highlighting helped as it colored - salt:// in white while normally attributes(or whatever it is) are cyan.
|
I had a similar run-in with this error message, and it was caused by doing this:
rather than this:
This seems eminently detectable - surely the error handler can spell out which 'function' was extra, and point the user more clearly to the problem. For example, say "Too many functions declared in state X in Y: please choose only one out of: uptodate, refresh, ..." Indeed, it could then also try to cross-reference the list of extra functions with the list of valid arguments to the state used, and pinpoint the error even more clearly. For example, "Too many functions declared in state X in Y: unknown function detected: 'refresh' - did you mean the boolean parameter to function uptodate?" |
Agreed I'll label this as a bug that we will need to get fixed up thanks :) Thanks for the particular examples that will help. |
I ran into this error message on a simple state shown below. The proximate cause turned-out to be using this:
...instead of this:
IOW lack of " " between ":" and "7".
|
FYI my indenting has been lost in the state quoted above..... |
Hello any news ? |
@marco-m no one is currently working on this issue due to other higher priority issues. Please feel free to take a stab at a fix for this particular use case |
As I mentioned on 10 November, my specific problem was fixed with a 1-character change: An additional space between the colon and the keyword, eg. "Mode: 770" instead of "Mode:770". |
Hi, |
If after mode: not write space, appears this error. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Thank you for updating this issue. It is no longer marked as stale. |
I found this issue being reproduced by this:
Fix:
|
Bit depressing to see this bug still exists five years later. Its the world's most useless error message. |
Going to the minion and 'tail -f /var/log/minion ' helped me to determine what the issue was..It wasn't spaces at all for me but that i had forgot to add a file that file.managed was pointing to.. |
Also got this error due to missing space.
This is pathetic. First, inability to implement RE parsing. Second, misleading error message. Even 'Something wrong. Error #123456' will be more beneficial to user. And the last, this shameful error exists for 6 years now. I am speechless. |
this should be fixed with the merge of #65212 |
This error message is non-informative at all. At very least it should report the ID where the issue happens and preferably the line in the file.
The text was updated successfully, but these errors were encountered: