fix(emr): reject steps after cluster termination (#6115)

* fix(emr): reject steps after cluster termination

* docs(emr): document terminated cluster step rejection
This commit is contained in:
Jimmy Liu Jia authored and GitHub committed 2026-10-21 00:07:18 -04:00
1 parent 03f87285a0
commit 0dab646373
3 files changed
+37 -3

No files matched your search

@@ -201,6 +201,10 @@ public class EmrService {
public synchronized List<String> addJobFlowSteps(String clusterId, List<EmrStep> steps) {
EmrCluster cluster = requireCluster(clusterId);
if ("TERMINATED".equals(cluster.getState())) {
throw new AwsException("ValidationException",
"A job flow that is shutting down, terminated, or finished may not be modified.", 400);
}
List<String> ids = new ArrayList<>();
for (EmrStep step : steps) {
initStep(step);