Handle GitHub action cancellation gracefully.
- Dominant language
- Go
- Stars
- 15.8k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
#### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
Please search the existing issues for relevant feature requests, and use the
reaction feature
(https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/)
to add upvotes to pre-existing requests.
#### Description
When packer is invoked in GitHub action, if the job is cancelled, it may not shutdown resources associated with the build. This will cause the compute instance to remain on forever and incur a significant bill.
#### Use Case(s)
Run Packer in any CI pipeline
#### Potential configuration
Provide a github action handler for packer build step, and ensure it can always clean up resource with a post-run session.
#### Potential References
https://github.com/orgs/community/discussions/26311
Contributor guide
Research direction
No source files, tests, or entry points are named. Start by tracing Packer's build shutdown lifecycle and GitHub Actions cancellation behavior, then determine how a post-run session could reliably clean up resources. Done means cancelled builds do not leave associated compute instances running.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, go
- Domain
- ci-cd, devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100