Don't upload local cache results if no outputs were produced
This PR updates the local build cache upload functionality to not add an entry to the Action Cache if none of the expected outputs were produced. This really shouldn't be a thing that happens, but some edge cases might cause this behavior to happen. For example, if the directory recc
is running in gets cleaned up before the outputs can be uploaded or recc
didn't properly set the outputPaths
to capture. This cases should be rare, but if/when they do happen it leads to a cache poisoning event where subsequent cache hits will cause failures due to missing object files.
Updating recc
to not upload an ActionResult
to the Action Cache in the case where no output files were found will prevent this from happening, and IMO makes sense in any case.
Right now this just logs a warning and continues on similar to if the exit code of the ActionResult
is non-zero, but I can see having this be a more explicit error case. Let me know what y'all think!