mirror of
https://github.com/floci-io/floci.git
synced 2026-11-26 23:29:28 -05:00
fix(codepipeline): synchronize action abandonment with registration (#7634)
StopPipelineExecution traversed the action list while a worker could append to it under the execution monitor. Use the same monitor for abandonment so a concurrent registration cannot invalidate the traversal. Add a deterministic public-handler regression that registers an action while the stop waits and verifies that only in-progress actions are abandoned. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> Signed-off-by: Jackson Price <jxnprice@amazon.com>
This commit is contained in:
1 parent
cf96dadfd9
commit
cdcb79a832
2 files changed
+55
-6
No files matched your search
+8
-6
@@ -660,12 +660,14 @@ public class CodePipelineService {
|
||||
execution.getStageExecutionStatuses().put(execution.getCurrentStage(), "Stopping");
|
||||
}
|
||||
if (execution.isAbandon()) {
|
||||
execution.getActionExecutions().stream()
|
||||
.filter(a -> "InProgress".equals(a.getStatus()))
|
||||
.forEach(a -> {
|
||||
a.setStatus("Abandoned");
|
||||
a.setLastUpdateTime(now());
|
||||
});
|
||||
synchronized (execution) {
|
||||
execution.getActionExecutions().stream()
|
||||
.filter(a -> "InProgress".equals(a.getStatus()))
|
||||
.forEach(a -> {
|
||||
a.setStatus("Abandoned");
|
||||
a.setLastUpdateTime(now());
|
||||
});
|
||||
}
|
||||
}
|
||||
putExecution(execution);
|
||||
eventPublisher.pipelineStateChange(execution, "STOPPING");
|
||||
|
||||
Reference in new issue
Block a user