Project

General

Profile

Actions

Bug #8321

closed

File edit methods return a kept class even when they repaired the file

Added by Jonathan CLARKE over 8 years ago. Updated over 2 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

According to https://github.com/Normation/ncf/pull/357/files#r63663063:

Even if we edit a file, and the repaired class is set, because the file already exists, CFEngine thinks the promise is kept, therefore defining both result classes. Reason is most of them create the file if not existing, but if the file is already there, part of this promise is kept, hence the kept result

We should look into a workaround to avoid this confusing and nasty kept class. If it comes from the "create => true" part of the promise, maybe just separate this into two promises, and report only on the second? If not, how about a checksum before and after the file edit promise, and if the checksum differs, then force the repaired class, if not force the kept class?


Subtasks 3 (0 open3 closed)

Bug #8574: File edit methods return a kept class even when they repaired the fileRejectedActions
Bug #8651: Merge error in 8321ReleasedBenoît PECCATTEActions
Bug #8653: The cancel body doesn't existReleasedAlexis MoussetActions

Related issues 1 (0 open1 closed)

Has duplicate Rudder - Bug #8320: Most file edition generic method return kept and repaired when a file has been modifiedRejectedActions
Actions #1

Updated by Jonathan CLARKE over 8 years ago

  • Has duplicate Bug #8320: Most file edition generic method return kept and repaired when a file has been modified added
Actions #2

Updated by Jonathan CLARKE over 8 years ago

  • Subject changed from File edi methods return a kept class even when they repaired the file to File edit methods return a kept class even when they repaired the file
  • Description updated (diff)
Actions #3

Updated by Jonathan CLARKE over 8 years ago

Looks like we need a method to "sanitize" result classes (remove kept if there's >= 1 repaired, remove repaired if there's >= error)

Actions #4

Updated by Jonathan CLARKE over 8 years ago

  • Assignee set to Benoît PECCATTE
Actions #5

Updated by Benoît PECCATTE over 8 years ago

  • Status changed from New to In progress
Actions #6

Updated by Benoît PECCATTE over 8 years ago

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

Updated by Benoît PECCATTE over 8 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset commit:04dd796b50ec70b3c95e41917936ef249d312f84.

Actions #8

Updated by Vincent MEMBRÉ about 8 years ago

  • Status changed from Pending release to Released
Actions #9

Updated by Alexis Mousset over 2 years ago

  • Target version changed from 0.x to ncf-0.x
  • Priority set to 0
Actions #10

Updated by Alexis Mousset over 2 years ago

  • Project changed from 41 to Rudder
  • Category set to Generic methods
Actions

Also available in: Atom PDF