saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.1k stars 5.47k forks source link

SLS rendering errors could be more helpful #44501

Open jdshewey opened 6 years ago

jdshewey commented 6 years ago

Description of Issue/Question

When referencing a pillar that does not exist, an error is thrown such as:

Rendering SLS 'base:katello.server' failed: Jinja variable 'str object' has no attribute 'gpg_key' this error could be more helpful by including the line number of the SLS or the ID Declaration. This is particularly useful in large files where a variable like gpg_key could be referenced often and it is difficult to find the instance that was fat-fingered.

gtmanfred commented 6 years ago

Yeah, that seems reasonable, I am marking this as a feature request.

Thanks, Daniel

stale[bot] commented 5 years ago

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.

jdshewey commented 5 years ago

bump

stale[bot] commented 5 years ago

Thank you for updating this issue. It is no longer marked as stale.

helephant commented 5 years ago

I'm also currently wishing for line numbers :)

I'm getting the somewhat baffling: "Trying to populate non string value into a string for variable ${deep:4}. Please make sure the value of the property is a string."

driskell commented 5 years ago

I spend most of my hours finding errors in big SLS files. This is not so much a feature request but a big requirement.

stale[bot] commented 4 years ago

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.

jdshewey commented 4 years ago

bump

stale[bot] commented 4 years ago

Thank you for updating this issue. It is no longer marked as stale.