Architecture #2880
closedChange promise generation to have one promise by rule and no more multiplexation
Description
Today, when two directives are applied to the same node, we generate only one promise with the parameters of the two directives merged in one big parameter array.
That was done because we didn't have a simple way to have several promises with the same name in a bundle sequence back in that time, and that it seemed to be easier to merge parameter versus managing unique name generation and handling for bundles (and all their content).
Now, in CFEngine 3.4, we DO have namespace, and so, managing unique name is MUCH easier (only one name, the bundle name, have to be unique).
So we should change the way promises are generated to have one promise by directive.
That will give us:
- much easier generation logic (and today, it is still a real can of worms)
- much easier debuging, as we could:
- link an erroneous cf-check result with a rule and a directive, what is impossible today
- actually look to generated bundlesequence and promise and understand what is happening without knowing Rudder internal multiplexing logic
- generally, much simplier behaviour, has we don't couple things which are not, and coupling is the root of all evil.