@Jason You are correct. Fan-in wouldn't solve the problem with current setup and that's why I said '
if the pipelines are configured properly'.And by pipelines being configured properly I meant exactly what you said 'a common upstream dependency to make it a true "diamond" dependency'.
I thought it would be easier to explain the configuration, if the OP understands the fan-in concept first. Also, the OP didn't provide any detail on materials. But now I think, I should have gone ahead with the explanation :)
If the pipelines triggers out of the same material, the configuration is quite straight forward.
-> a1 -> a2 -> a3 -> a4 --
| |
material---> b1 -> b2 -> b3 -> b4 --+-> (the downstream pipeline)
| |
-> c1 -> c2 -> c3 -> c4 ---
However, if the pipelines trigger out of different materials, the pipelines which don't depend on a material, say M1, could still have M1 as a blacklisted material. This would still acknowledge fan-in and the required configuration could be achieved. The setup should blacklist everything in that material, may be with something like **/*.* Each material would go as blacklisted material to the other two pipelines which don't depend on the said material. I will try to show it graphically but i'm bad at art!
material1 -> a1 -> a2 -> a3 -> a4 -------------------
| ^ |
| | |
(bcklstd) | |
| ========+======== |
| || | | |
| || (bcklstd) | |
| || material2 -+ -> b1 -> b2 -> b3 -> b4 ----+----> (the downstream pipeline)
| || (bcklstd) | |
| || | | |
|---------+---------- |
|| | |
(bcklstd) | |
|| | |
material3 --+-> c1 -> c2 -> c3 -> c4 ----------------
There is a caveat though. Pipelines wouldn't reflect changes for the blacklisted material unless the material (the not blacklisted one) triggers the pipeline.
Example scenario: Let's say pipelines 'a' and 'b' have triggered with version 'x' of material3, and pipeline 'c' has triggered with version 'x+1' of material3, the changes wouldn't come down for version 'x+1' of material3. The blacklisting wouldn't trigger the pipelines 'a' and 'b' with 'x+1' version of material3 unless material1 and material2 trigger pipelines 'a' and 'b' respectively.
Hope this helps. Please feel free to get back if the explanation above is not clear.