Actions
Bug #3210
closedWrong stringTemplate definition on a Technique result in a confusing error in the Rudder UI
Status:
Released
Priority:
2
Assignee:
Category:
Web - Config management
Target version:
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:
Description
Trying to use a bad stringTemplate definition on a Technique outputs a confusing error in the Rudder UI
While trying to develop a new Technique, I made a trivial mistake like this in my .st file:
&FOO, BAR:{foo, bar | "¬foo&" string => "&bar&"; }&
As you can see, ¬foo& here should be &foo& to make the mapping between the big FOO variable and the transformation in a CFEngine string variable.
However, instead of outputting an error like "The Technique XXX is broken (stringtemplate error)" and eventually ignoring the Technique and going on the deployment, Rudder outputs something like:
Exception caught during deployment process: no such attribute: notfoo in template context [anonymous anonymous]
The stacktrace in the webapp logs is roughly the same:
Exception caught during deployment process: java.util.NoSuchElementException: no such attribute: notfoo in template context [anonymous anonymous] at org.antlr.stringtemplate.StringTemplate.checkNullAttributeAgainstFormalArguments(StringTemplate.java:1311) ~[stringtemplate-3.2.1.jar:na]
This has been discovered in a 2.4.2 Rudder, but I suspect that it impacts 2.3 too.
Updated by François ARMAND about 12 years ago
- Status changed from New to Discussion
- Assignee changed from François ARMAND to Nicolas CHARLES
Updated by François ARMAND about 12 years ago
- Status changed from Discussion to 8
- Assignee changed from Nicolas CHARLES to François ARMAND
Updated by Vincent MEMBRÉ over 11 years ago
- Status changed from 8 to Pending technical review
- Pull Request set to https://github.com/Normation/cf-clerk/pull/24
Updated by François ARMAND over 11 years ago
- Status changed from Pending technical review to Discussion
- Assignee changed from François ARMAND to Vincent MEMBRÉ
Updated by Vincent MEMBRÉ over 11 years ago
- Assignee changed from Vincent MEMBRÉ to François ARMAND
Updated by Vincent MEMBRÉ over 11 years ago
- Status changed from Discussion to Pending technical review
Updated by Vincent MEMBRÉ over 11 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Updated by Nicolas PERRON over 11 years ago
- Subject changed from Trying to use a bad stringTemplate definition on a Technique outputs a confusing error in the Rudder UI to Wrong stringTemplate definition on a Technique result in a confusing error in the Rudder UI
Updated by Benoît PECCATTE about 10 years ago
- Category changed from 14 to Web - Config management
Actions