Project

General

Profile

Architecture #10825

Bad comparison in unique variable

Added by François ARMAND 6 months ago. Updated 5 months ago.

Status:
Released
Priority:
N/A
Category:
Architecture - Internal libs
Target version:
Target version (plugin):
Effort required:

Description

We have a bad comparison in "def copyWithSetVariables(variables:Seq[Variable]) : Cf3PolicyDraft" which alway lead to always copy variables, changing their update time even if not needed.

      variableMap.get(variable.spec.name) match {
        case None => Some(variable)
        case Some(values) => if(values == variable.values) None else Some(variable)  //here, it is Some(otherVariable), not values!
      }

Associated revisions

Revision cdc9c108
Added by François ARMAND 6 months ago

Fixes #10825: Bad comparison in unique variable

History

#1 Updated by François ARMAND 6 months ago

  • Target version changed from 3.1.21 to 4.1.4

Only changing it in 4.1, because the impact seems to be at most in performance, and I don't want to add an unseen consistency bug in earlier version where the code is more complexe than 4.1.

#2 Updated by François ARMAND 6 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder/pull/1657

#3 Updated by François ARMAND 6 months ago

  • Status changed from Pending technical review to Pending release

#4 Updated by Alexis MOUSSET 5 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.4 which was not released (see changelog for details), and is available in Rudder 4.1.5.

Also available in: Atom PDF