Project

General

Profile

Actions

Bug #23389

open

Wrong class_prefix used when parameters contains ${something} expression

Added by Alexis Mousset about 1 year ago. Updated 5 months ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Generic methods
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

For example, if a file_content is called with a content containing ${releasever} (for a rpm repo URL), the class prefix won't be correctly defined.

In file_content.cf:

vars:
   # this variable keeps previous value is report_param constains an expression looking like an non-expanded variable
   "full_class_prefix" string => canonify("file_lines_present_${report_param}");

reports:
  pass2.!pass3::
    "full_class_prefix = ${full_class_prefix} (editing ${path})";

This will lead to re-using the full class prefix of the previous call to method and lead to incorrect reporting.

E| compliant     technique                 File content              /tmp/plop          Insert content into /tmp/plop was correct
2023-09-05T21:37:51+00:00 R: full_class_prefix = file_lines_present__tmp_plop_plop_true (editing /tmp/plop)
E| compliant     technique                 File content              /tmp/test          Insert content into /tmp/test was correct
2023-09-05T21:37:51+00:00 R: full_class_prefix = file_lines_present__tmp_plop_plop_true (editing /tmp/test)

Files

clipboard-202309052335-adxxd.png (20.3 KB) clipboard-202309052335-adxxd.png Alexis Mousset, 2023-09-05 23:35
Actions #2

Updated by Alexis Mousset about 1 year ago

  • Description updated (diff)
Actions #3

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 7.2.11 to 1046
Actions #4

Updated by Alexis Mousset about 1 year ago

  • Target version changed from 1046 to 7.3.8
Actions #5

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 7.3.8 to 7.3.9
Actions #6

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 7.3.9 to 7.3.10
Actions #7

Updated by Vincent MEMBRÉ 12 months ago

  • Target version changed from 7.3.10 to 7.3.11
Actions #8

Updated by Vincent MEMBRÉ 10 months ago

  • Target version changed from 7.3.11 to 7.3.12
Actions #9

Updated by Vincent MEMBRÉ 9 months ago

  • Target version changed from 7.3.12 to 7.3.13
Actions #10

Updated by Vincent MEMBRÉ 9 months ago

  • Target version changed from 7.3.13 to 7.3.14
Actions #11

Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 7.3.14 to 7.3.15
Actions #12

Updated by Alexis Mousset 7 months ago

There is not much we can do without some heavy lifting, as we need to be independent from parameters for reporting and the solution is to use report_id (logger v4) everywhere, it it should be prioritized.

Actions #13

Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 7.3.15 to 7.3.16
Actions #14

Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 7.3.16 to 7.3.17
Actions

Also available in: Atom PDF