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

feature: Shutdown Hook Order #27

Open
5 tasks
raamsri opened this issue Jan 5, 2025 · 0 comments
Open
5 tasks

feature: Shutdown Hook Order #27

raamsri opened this issue Jan 5, 2025 · 0 comments
Labels
Good to Have Non critical, and not priotirized yet. Needs Investigation The issue requires analysis to understand the root cause.

Comments

@raamsri
Copy link
Contributor

raamsri commented Jan 5, 2025

Feature Request

Summary

Implement reverse-order execution of shutdown hooks

Motivation

Shutdown hooks should execute in reverse registration order to properly handle dependencies

Detailed Design

  1. Hook Management:

    • Track hook registration order
    • Store metadata with each hook
    • Implement ordering logic
  2. Execution Flow:

    • Reverse iterate through hooks
    • Handle hook failures
    • Add timeout mechanism
    • Log execution status
  3. Dependencies:

    • Hook priority system
    • Failure handling policy
    • Timeout configuration

Acceptance Criteria

  • Hooks execute in reverse order
  • Failed hooks don't block shutdown
  • Configurable timeouts
  • Proper error handling
  • Shutdown status logging

Additional Context

Located in pkg/lifecycle/lifecycle.go in shutdown() function

@raamsri raamsri added Needs Investigation The issue requires analysis to understand the root cause. Good to Have Non critical, and not priotirized yet. labels Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good to Have Non critical, and not priotirized yet. Needs Investigation The issue requires analysis to understand the root cause.
Projects
None yet
Development

No branches or pull requests

1 participant