Project

General

Profile

Actions

Architecture #10825

closed

Bad comparison in unique variable

Added by François ARMAND almost 7 years ago. Updated almost 7 years ago.

Status:
Released
Priority:
N/A
Category:
Architecture - Internal libs
Target version:
Effort required:
Name check:
Fix check:
Regression:

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!
      }
Actions #1

Updated by François ARMAND almost 7 years 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.

Actions #2

Updated by François ARMAND almost 7 years 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
Actions #3

Updated by François ARMAND almost 7 years ago

  • Status changed from Pending technical review to Pending release
Actions #4

Updated by Alexis Mousset almost 7 years 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.

Actions

Also available in: Atom PDF