Note that the second PrerenderResource writes to the same /foo.txt file, but with different contents. Currently, the multi-renderer just writes /foo.txt twice and the last one wins. If users generate these files in parallel, this could result in a possible race condition which causes non-hermetic builds.
If this ever happens it is almost certainly a bug in user code. The multi-renderer should check for this case as each resource is provided and fail if the same path is given twice.
Consider the following renderer program:
Note that the second
PrerenderResource
writes to the same/foo.txt
file, but with different contents. Currently, the multi-renderer just writes/foo.txt
twice and the last one wins. If users generate these files in parallel, this could result in a possible race condition which causes non-hermetic builds.If this ever happens it is almost certainly a bug in user code. The multi-renderer should check for this case as each resource is provided and fail if the same path is given twice.