Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Push cleanup methods in on_startup to ensure proper execution or…
…der (#14172) The current `on_cleanup` code carefully attempts to close resources in the correct order (if B depends on A, we should close B before we close A). Doing so is pretty error prone though and we have messed it up in the past, leading to noisy error logs when pods are shut down. If we instead push `.close` methods onto a stack immediately after they are initialized, the exit stack cannot be executed in the wrong order.
- Loading branch information