Actions
Bug #23178
closed" are not correctly escaped in technique for classes_noop in rudder 8.0
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No
Description
With the attached technique, I got the following error at generation
⇨ Cannot write nodes configuration; cause was: Unexpected: Unexpected: Error when executing hooks: Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check'. [stdout:][stderr:/var/rudder/share/10583cb6-7a15-4c1a-ade2-52d73b61bf01/rules.new/cfengine-community/bobby/1.0/technique.cf:37:48: error: syntax error unless => "windows"; <pre> because generated code is <pre> bundle agent call_3a089398_9615_4118_8999_75f6c9abc326(c_name, c_key, report_id, args, class_prefix, command) { methods: "3a089398-9615-4118-8999-75f6c9abc326_${report_data.directive_id}" usebundle => _method_reporting_context_v4("${c_name}", "${c_key}", "${report_id}"); "3a089398-9615-4118-8999-75f6c9abc326_${report_data.directive_id}" usebundle => command_execution("${command}"), if => "windows"; "3a089398-9615-4118-8999-75f6c9abc326_${report_data.directive_id}" usebundle => _classes_noop(canonify("${class_prefix}_command_execution_echo "# ${boubou}"")), unless => "windows"; "3a089398-9615-4118-8999-75f6c9abc326_${report_data.directive_id}" usebundle => log_rudder("Skipping method 'Command execution' with key parameter 'echo "# ${boubou}"' since condition 'windows' is not reached", "echo "# ${boubou}"", canonify("${class_prefix}_command_execution_echo "# ${boubou}""), canonify("${class_prefix}_command_execution_echo "# ${boubou}""), @{args}), unless => "windows"; } </pre>
Files
Actions