Project

General

Profile

Bug #9695

Clearer template errors should be given during build review

Added by Martin Hovmöller about 6 years ago. Updated about 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

When putting a machine in build mode, if there is an error in the template the error message is very vague, like "Failure parsing <template name>: undefined method `<' for nil:NilClass.".
This makes debugging very hard. The error message should at least contain the line number for the line causing the error.


Related issues

Related to Foreman - Feature #746: Generate all the Host template when click on Build to avoid errors during installationClosed2011-03-15
Related to Foreman - Bug #18345: Better rescue from syntax error in template renderingClosed2017-02-01

History

#1 Updated by Dominic Cleal about 6 years ago

  • Project changed from Docker to Foreman
  • Subject changed from Clearer template errors should be given. to Clearer template errors should be given during build review
  • Category set to Templates

#2 Updated by Dominic Cleal about 6 years ago

  • Related to Feature #746: Generate all the Host template when click on Build to avoid errors during installation added

#3 Updated by Shlomi Zadok about 6 years ago

  • Assignee set to Shlomi Zadok

#4 Updated by Shlomi Zadok over 4 years ago

  • Assignee deleted (Shlomi Zadok)

#5 Updated by Marek Hulán about 4 years ago

  • Related to Bug #18345: Better rescue from syntax error in template rendering added

#6 Updated by Marek Hulán about 4 years ago

Error messages could be improved by using macros, that would have explicit checks on objects. There was a discussion on foreman-dev list recently that suggested using proxy objects on which we'd define such macros. The line number is technically possible only with safe mode disabled, #18432 adds this to the log at least.

Also available in: Atom PDF