Project

General

Profile

Actions

Bug #13890

closed

Constant error message in Technique Editor when an invalid technique as been created

Added by Nicolas CHARLES over 5 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
N/A
Category:
Web - Technique editor
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Very Small
Priority:
84
Name check:
Fix check:
Regression:

Description

If we create a technique, with a parameter finishing with \ , we get an error message at save
But the file is still saved, and when we go back to tehcnique editor we have again a message

An Error occured! Could not parse Technique 'invalid_technique'
Details:

 caused by : Error while running post-hook command cf-promises -pjson -f /var/rudder/configuration-repository/ncf/50_techniques/invalid_technique/invalid_technique.cf
/var/rudder/configuration-repository/ncf/50_techniques/invalid_technique/invalid_technique.cf:9:126: error: syntax error
    "method_call_context_0" usebundle => _method_reporting_context("File absent", "/tmp/some_broken_file\");
                                                                                                                             ^
/var/rudder/configuration-repository/ncf/50_techniques/invalid_technique/invalid_technique.cf:9:126: error: Invalid function argument, wrong input 'method_call'
    "method_call_context_0" usebundle => _method_reporting_context("File absent", "/tmp/some_broken_file\");
                                                                                                                             ^
/var/rudder/configuration-repository/ncf/50_techniques/invalid_technique/invalid_technique.cf:9:154: error: Expected ',', wrong input '" usebundle => file_absent("'
    "method_call_context_0" usebundle => _method_reporting_context("File absent", "/tmp/some_broken_file\");
                                                                                                                                                         ^
/var/rudder/configuration-repository/ncf/50_techniques/invalid_technique/invalid_technique.cf:9:155: error: Invalid function argument, wrong input '/'
    "method_call_context_0" usebundle => _method_reporting_context("File absent", "/tmp/some_broken_file\");
                                                                                                                                                          ^
/var/rudder/configuration-repository/ncf/50_techniques/invalid_technique/invalid_technique.cf:9:158: error: Expected ',', wrong input 'tmp'
    "method_call_context_0" usebundle => _method_reporting_context("File absent", "/tmp/some_broken_file\");

The only way to get out of that is to modify the .cf file

We should be able to check the file before saving, or if it's not possible, save it somewhere safe first, validate, and move it to final position

Targeting to 4.3, but the full lfix may be too hard to get there


Related issues 3 (0 open3 closed)

Related to Rudder - Bug #10723: Escaping backslash+double quote in NCF method file_ensure_lines_presentResolvedActions
Related to Rudder - Bug #7745: \ are not escaped in technique editorResolvedActions
Related to Rudder - Bug #11348: Impossible to save a new technique when last char in a parameter is a backslashResolvedVincent MEMBRÉActions
Actions

Also available in: Atom PDF