Project

General

Profile

Actions

Bug #18009

open

File in INI section method does not work as intended

Added by Félix DALLIDET over 4 years ago. Updated 5 months ago.

Status:
Pending technical review
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 | Rudder settings | Plugins
Effort required:
Small
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

There is a very misleading bug in this GM.

You can write whatever you want in a section of an inifile, so I used to write the header section of the next section using this method,
even if it is supposed to create a given section if undefined, just to be sure of the section order.

The issue is that the new section header will be written without newline after it. But the section matcher seems to requires a newline after a section name to match it...
So I end up with my technique which:
-Creates a section header under an already existing section, like

[My_section]
some lines
[My_second_section]

-But when it tries to write a line under the second section, it does not detect it since there is no newline after it
-And tries to create the second section, which is detected and so, not created... and so the method does not write the lines under it

The worst part is that it reports a success everywhere.


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #8638: file_ensure_lines_present_in_ini_section.cf test fails with CFEngine 3.9ReleasedNicolas CHARLESActions
Actions #1

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 5.0.18 to 5.0.19
Actions #2

Updated by François ARMAND over 4 years ago

  • Assignee set to Félix DALLIDET
Actions #3

Updated by Félix DALLIDET over 4 years ago

  • Status changed from New to In progress
Actions #4

Updated by Félix DALLIDET over 4 years ago

  • Related to Bug #8638: file_ensure_lines_present_in_ini_section.cf test fails with CFEngine 3.9 added
Actions #5

Updated by Félix DALLIDET over 4 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Félix DALLIDET to Alexis Mousset
  • Pull Request set to https://github.com/Normation/ncf/pull/1233
Actions #6

Updated by Vincent MEMBRÉ about 4 years ago

  • Target version changed from 5.0.19 to 5.0.20
  • Priority changed from 100 to 99
Actions #7

Updated by Vincent MEMBRÉ about 4 years ago

  • Target version changed from 5.0.20 to 797
  • Priority changed from 99 to 96
Actions #8

Updated by Benoît PECCATTE over 3 years ago

  • Target version changed from 797 to 6.1.14
  • Priority changed from 96 to 84
Actions #9

Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 6.1.14 to 6.1.15
  • Priority changed from 84 to 83
Actions #10

Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 6.1.15 to 6.1.16
Actions #11

Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 6.1.16 to 6.1.17
Actions #12

Updated by Benoît PECCATTE about 3 years ago

  • Project changed from 41 to Rudder
  • Category changed from Generic methods - File Management to Generic methods
Actions #13

Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 6.1.17 to 6.1.18
Actions #14

Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 6.1.18 to 6.1.19
Actions #15

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.1.19 to 6.1.20
Actions #16

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.1.20 to 6.1.21
Actions #18

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.1.21 to old 6.1 issues to relocate
  • Priority changed from 83 to 56
Actions #19

Updated by Alexis Mousset over 1 year ago

  • Target version changed from old 6.1 issues to relocate to old 6.2 issues to relocate
  • Priority changed from 56 to 0
Actions #20

Updated by Alexis Mousset over 1 year ago

  • Target version changed from old 6.2 issues to relocate to 7.2.11
  • Regression set to No
Actions #21

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 7.2.11 to 1046
Actions #22

Updated by Alexis Mousset about 1 year ago

  • Target version changed from 1046 to 7.3.8
Actions #23

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 7.3.8 to 7.3.9
Actions #24

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 7.3.9 to 7.3.10
Actions #25

Updated by Vincent MEMBRÉ 12 months ago

  • Target version changed from 7.3.10 to 7.3.11
Actions #26

Updated by Vincent MEMBRÉ 10 months ago

  • Target version changed from 7.3.11 to 7.3.12
Actions #27

Updated by Vincent MEMBRÉ 9 months ago

  • Target version changed from 7.3.12 to 7.3.13
Actions #28

Updated by Vincent MEMBRÉ 9 months ago

  • Target version changed from 7.3.13 to 7.3.14
Actions #29

Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 7.3.14 to 7.3.15
Actions #30

Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 7.3.15 to 7.3.16
Actions #31

Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 7.3.16 to 7.3.17
Actions

Also available in: Atom PDF