Project

General

Profile

Actions

Bug #7459

closed

Architecture #7155: Stable class identifier

Architecture #7156: Modify generic methods to define and use the new class_prefix

Reporting is broken for several ncf generic methods because the new class_prefix is not computed without this.callers_promisers, and any conditions using class_prefix are incorrectly evaluated

Added by Jonathan CLARKE almost 9 years ago. Updated about 3 years ago.

Status:
Released
Priority:
N/A
Category:
-
Target version:
-
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:

Description

For example, in command_execution.cf:

  vars:
      "old_class_prefix"  string => canonify("command_execution_${command_name}");
      "class_prefix"      string => canonify(join("_", "this.callers_promisers"));
      "args"               slist => { "${command_name}" };

  methods:
      "report"                                                                                                                                                                                                                        
        usebundle  => _log("Execute the command ${command_name}", "${old_class_prefix}", "${class_prefix}", @{args}),
        ifvarclass => "(!has_promiser_stack.${old_class_prefix}_reached)|(has_promiser_stack.${class_prefix}_reached)";

In this case, the last ifvarclass will evaluate to FALSE because ${class_prefix} is an undefined variable, because "this.callers_promisers" does not exist. This obvisouly breaks reporting, since "_log" is never called.


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #7461: classes_* methods should refuse to copy classes to a prefix which is an empty stringReleasedBenoît PECCATTEActions
Actions

Also available in: Atom PDF