Amir Hadadi created MBUILDCACHE-79: -------------------------------------- Summary: MBUILDCACHE-67 broke the partial restore process Key: MBUILDCACHE-79 URL: https://issues.apache.org/jira/browse/MBUILDCACHE-79 Project: Maven Build Cache Extension Issue Type: Bug Components: remote build cache Affects Versions: 1.1.0 Reporter: Amir Hadadi
In MBUILDCACHE-67 a bug was introduced in BuildCacheMojosExecutionStrategy#execute. Due to the bug, after a partial restore from cache all executions that were restored are executed for the second time. The bug was introduced by changing: {code:java} boolean restorable = result.isSuccess() || result.isPartialSuccess(); boolean restored = result.isSuccess(); // if partially restored need to save increment if (restorable) { restored &= restoreProject(result, mojoExecutions, mojoExecutionRunner, cacheConfig); } else { for (MojoExecution mojoExecution : mojoExecutions) {{code} to: {code:java} boolean restorable = result.isSuccess() || result.isPartialSuccess(); boolean restored = result.isSuccess(); // if partially restored need to save increment if (restorable) { CacheRestorationStatus cacheRestorationStatus = restoreProject(result, mojoExecutions, mojoExecutionRunner, cacheConfig); restored &= CacheRestorationStatus.SUCCESS == cacheRestorationStatus; executeExtraCleanPhaseIfNeeded(cacheRestorationStatus, cleanPhase, mojoExecutionRunner); } if (!restored) { ...{code} Since partially restored builds have {code:java} restored == false{code} The {code:java} if (!restored){code} block is always executed, rerunning all the plugins (including the restored ones). -- This message was sent by Atlassian Jira (v8.20.10#820010)