Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Push cleanup methods in on_startup to ensure proper execution order #14172

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

daniel-goldstein
Copy link
Contributor

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.

Copy link
Contributor

@iris-garden iris-garden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@danking danking merged commit cff9dc5 into hail-is:main Jan 18, 2024
5 checks passed
danking pushed a commit that referenced this pull request Feb 14, 2024
This change makes it harder to get the order of `on_cleanup` wrong. An
extension of #14172 to `auth` and `monitoring`.

---------

Co-authored-by: iris <84595986+iris-garden@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants