User story #12841
openFile_content behaviour without enforce behaviour is error prone
Description
When the "ensure" field is set to "false", the GM does not take the duplicates lines into account, except if the file is empty or does not exist.
Here are some examples to make it more explicit:
chi
chi
will resolves in
chi
chi
if the file is empty or undefined at run start,
Now we can remove one of the 2 lines of the file, run the agent and the file will not be updated.
Same goes for ordering.
If I make a file with the following content:
chi
fu
mi
And apply a GM with the false mode on it with the following content:
mi
fu
chi
It will not update the file when the same GM with "true" mode will rewrite the file to update the ordering.
This behaviour is very deceptive and should be, at least, more explicit in the documentation since the GM name does not make mention at all of
a line by line interpretation.
Moreover I can not see the difference between this GM in "false" mode and the "File lines present" one.
Updated by Félix DALLIDET over 6 years ago
Since the name of the generic method and its behaviour can barely be changed, we will try to make the infos in the technique editor more clear and set the
enforce mode as the default mode.
The GM behaviour will not be changed.
Updated by François ARMAND about 6 years ago
- Tracker changed from Bug to User story
- Priority deleted (
0)
We don't have a short term solution. The long term solution is:
- deprecate that generic method whose behavior is broken
- create an other generic method, with a simpler and more consistent behavior. That need quite some up-front reflexion.
I'm changing its kin to user story and put it in the roadmap.
Updated by Benoît PECCATTE over 5 years ago
- Target version set to Ideas (not version specific)
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