In such cases, the engine needs to decide what to do: should it keep the last file? should it report an error? should it concatenate the files together?
Transforms that need to take such decisions can be configured with a conflict resolution: - Combo uses UseLast by default, but can be configured to do otherwise - authors can also explicitly end a transform Chain with a UniquePath, which by default uses Fail (again, this is customizable)
type: Combo # often omitted merge: - <transform> chain: - <transform> - ... onConflict: <conflict resolution> # defaults to 'UseLast'
type: Chain # or implicitly using Combo transformations: - <transform> - <transform> - type: UniquePath strategy: <conflict resolution> # defaults to 'Fail'
The following values and behaviours are available:
Fail: stop processing on the first file that exhibits
UseFirst: for each conflicting file, the file produced first (typically by a transform appearing earlier in the yaml definition) is retained
UseLast: for each conflicting file, the file produced last (typically by a transform appearing later in the yaml definition) is retained
Append: the conflicting versions of files are concatenated (as if using
cat file1 file2 ...), with files produced first appearing first.