stevestorey commented on issue #14114:
URL: https://github.com/apache/maven/issues/14114#issuecomment-7127644930
Worth noting that `BuildPlanExecutor` already guards against this for
aggregator steps:
```java
private boolean aggregationWorkSucceeded(BuildStep step) {
// Cleanup steps may finish successfully after nested work failed or was
skipped.
// They are not proof that the work required by an aggregator completed.
return step.allPredecessors()
.filter(predecessor -> predecessor != step)
.allMatch(predecessor -> predecessor.exception == null
&& predecessor.status.get() != FAILED
&& (!predecessor.hasExecutions() ||
predecessor.status.get() == EXECUTED));
}
```
`processStep` only applies it to `$aggregator:` steps, though. Other steps
rely on `allPredecessorsExecuted`, which looks at direct predecessors only:
```java
shouldExecute = !status.isHalted()
&& !status.isBlackListed(step.project)
&& allPredecessorsExecuted
&& (!step.name.startsWith("$aggregator:") ||
aggregationWorkSucceeded(step));
```
For `app`'s `deploy`, `test` is an indirect predecessor, so the transitive
check should see its failure. One possible fix is therefore to apply the same
check to ordinary steps, but I haven't tested that change.
--
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]