Re-think and document incremental workspaces better
Background
During the discussion of !812 (merged) we were reminded of an old feature that is very difficult to wrap your head around... Incremental workspaces!
In essence, there is some crafty code that revolves around trying to update timestamps where we technically have none. A more detailed description can be found here.
In-code documentation for this is currently lackluster, and the comments should be updated to explain edge cases and our workarounds.
Since the addition of artifact cache cleanup and failed build caching, this feature may also have grown new, un-covered edge cases for which tests need to be written, and perhaps we need to re-think the feature altogether, since there may be nicer ways to implement this now.
Task description
-
Document the incremental-build timestamping codepaths better -
Re-think these codepaths with cached failed builds in mind -
Write tests for edge cases introduced with cache cleanup
Acceptance Criteria
We should have a cleanly documented idea of how timestamps are handled with incremental builds and an implementation that takes into account failed build caching as well as artifact cache cleanup.