Project

General

Profile

Bug #12693

Reporting context is not set correctly when using an iterator somewhere

Added by Alexis MOUSSET 7 months ago. Updated 6 months ago.

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

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

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

Related issues

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

Associated revisions

Revision 102dc566 (diff)
Added by Nicolas CHARLES 6 months ago

Fixes #12693: Reporting context is not set correctly when using an iterator somewhere

History

#1 Updated by Nicolas CHARLES 7 months 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

#2 Updated by Nicolas CHARLES 7 months 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

#3 Updated by Benoît PECCATTE 7 months ago

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

#4 Updated by Benoît PECCATTE 7 months 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

#5 Updated by Nicolas CHARLES 7 months ago

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

#6 Updated by Nicolas CHARLES 7 months 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

#7 Updated by Nicolas CHARLES 6 months ago

  • Status changed from Pending technical review to Pending release

#8 Updated by Vincent MEMBRÉ 6 months ago

  • Status changed from Pending release to Released

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

Also available in: Atom PDF