copilot-cli
copilot-cli copied to clipboard
Swallow errors when trying to delete jobs that don't exist
Ask
Today, trying to delete jobs copilot job delete in environments with no cluster result in the following error:
✘ Failed to stop running tasks of job reporter from environment bootstrap: no cluster found in environment bootstrap.
✘ execute job delete: stop tasks for environment bootstrap: no cluster found in environment bootstrap
Copilot should swallow the error if there are no jobs in the first place and exit successfully.
Reproduction steps
- Run
copilot env init -n bootstrapto create an environment with only IAM roles and no cluster yet. - Run
copilot job init -n reporterto create a scheduled job. - Run
copilot job deleteto trigger the error.
Note that after step 1, we did not run copilot env deploy to create the ECS cluster.