kbuntrock commented on code in PR #92:
URL: 
https://github.com/apache/maven-build-cache-extension/pull/92#discussion_r1301908821


##########
src/main/java/org/apache/maven/buildcache/BuildCacheMojosExecutionStrategy.java:
##########
@@ -129,7 +129,8 @@ public void execute(
             boolean restored = result.isSuccess(); // if partially restored 
need to save increment
             if (restorable) {
                 restored &= restoreProject(result, mojoExecutions, 
mojoExecutionRunner, cacheConfig);
-            } else {
+            }
+            if (!restored) {

Review Comment:
   I agree that seeing a second clean phase seems a bit "off" but I could be in 
piece with it since it is a abnormal edge case (and we will write a beautiful 
log to explain it. :p)
   
   Trying to summarize the exchange in order to check if we have a consensus in 
a situation where the cache fails the restoration
   - the build was requested without clean phase : we do not change the actual 
behaviour.
   - the build was requested with a clean phase : an extra clean phase will be 
executed before the actual behaviour (= the whole build is executed).
   
   We change generically the log "Cannot restore project artifacts, continuing 
with non cached build" by : 
   "Cannot restore project artifacts, continuing with non cached build (clean 
phase will be re-executed if requested)".
   
   And in another PR, the remote download could be enhanced by doing it in two 
steps : downloading in a temp directory + moving it
   Reducing the risk of leftovers files. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to