fix(glue): make DeleteJob idempotent (#3866)

Match AWS DeleteJob behavior by tolerating deletion of a missing job definition and cover repeated deletion in the Glue service test.
This commit is contained in:
Chiara Forresi authored and GitHub committed 2026-09-21 11:16:07 -04:00
1 parent 0108b9653a
commit 992b80f8f7
3 files changed
+52 -3

No files matched your search

@@ -1714,9 +1714,6 @@ public class GlueService {
validateRequired(name, "JobName");
// Jobs and crawlers skip normalizeName because AWS preserves their case
String normalizedName = name;
if (jobStore.get(normalizedName).isEmpty()) {
throw new AwsException("EntityNotFoundException", "Job " + name + " not found.", 400);
}
jobStore.delete(normalizedName);
resourceGroupsTaggingService.deleteResources(List.of(jobArn(region, normalizedName)), region);
LOG.infov("Deleted Glue Job: {0}", name);