Are resource leaks unavoidable for canceled builds?

Workflows/Jobs/etc… are stateful processes that can have any number of open resources.

These resources need to be closed whenever the job/workflow that contains it is closed, no matter what the circumstances, and especially on cancellation. There are a number of open tickets on this.

https://discuss.circleci.com/t/cancelled-build-post-hook-commands/5995

https://discuss.circleci.com/t/support-scriptable-teardown-section-in-circle-yml/1703

https://discuss.circleci.com/t/create-value-cancelled-for-run-s-when/12231

None of which has any response. What’s the status?

3 Likes

Sounds like a good hook to have. Have a look at circleci.com/ideas to see if it has been proposed already - and if not, please do add an idea. The forum does not automatically funnel ideas into the pot, as far as I know.