Project

General

Profile

Actions

Bug #12693

closed

Reporting context is not set correctly when using an iterator somewhere

Added by Alexis Mousset almost 6 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

When an iterator is used, the last evaluated value is used as context for the whole method.

This happens only in >4.3.


Subtasks 1 (0 open1 closed)

Bug #12759: Reporting bundle generated ae invalid : Conflicting arity in calling bundle log_rudder, expected 5 arguments, 4 givenReleasedVincent MEMBRÉActions

Related issues 1 (0 open1 closed)

Related to Rudder - Bug #12694: In Rudder 4.1, we cannot do reporting using a variable defined in a generic methodRejectedActions
Actions #1

Updated by Nicolas CHARLES almost 6 years ago

we are setting the context via

    "method_call_context" usebundle => _method_reporting_context("File absent", "/tmp/${variable.name}");

so all component values are iterated over, and the last one wins

Actions #2

Updated by Nicolas CHARLES almost 6 years ago

As discussed with Alexis, the solution we found is to rewrite the report method in 4.3.
Each generic method will change the call to the log method, to include the component_value, so that it fixes this issue
We need to keep the previous implementation as well, for compatibility

Actions #3

Updated by Benoît PECCATTE almost 6 years ago

  • Related to Bug #12694: In Rudder 4.1, we cannot do reporting using a variable defined in a generic method added
Actions #4

Updated by Benoît PECCATTE almost 6 years ago

  • Severity set to Major - prevents use of part of Rudder | no simple workaround
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings
  • Priority changed from 0 to 52
Actions #5

Updated by Nicolas CHARLES almost 6 years ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
Actions #6

Updated by Nicolas CHARLES almost 6 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/ncf/pull/765
Actions #7

Updated by Nicolas CHARLES almost 6 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:102dc566a80fbee64ea70a52b7afa0608b15c046.

Actions #8

Updated by Vincent MEMBRÉ almost 6 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.3.2 which was released today.

Actions #9

Updated by Alexis Mousset almost 2 years ago

  • Project changed from 41 to Rudder
  • Category changed from Generic methods to Generic methods
  • Priority changed from 52 to 0
Actions

Also available in: Atom PDF