Skip to content

Deprecate legacy shutdown API in signals (prerequisite for torrust-tracker SI-18) #3

Closed

Description

@josecelano-bot

Problem

torrust-server-lib 0.4.0 shipped the legacy shutdown API in torrust_server_lib::signals without #[deprecated] and without release notes: Halted, shutdown_signal, shutdown_signal_with_message and global_shutdown_signal.

The torrust-tracker EPIC 1488 (Overhaul: Tracker Shutdown) needs these deprecated before it can deprecate (SI-18) and later remove (SI-19) its own use of them.

Plan

Source-level deprecation only: no behaviour change, nothing removed.

  • Add #[deprecated(since = "0.5.0", note = "...")] to the four symbols, naming the replacement and the planned removal in 0.6.0:
    • Halted -> inject a tokio_util::sync::CancellationToken
    • shutdown_signal, shutdown_signal_with_message -> cancellation_signal (plus a log line)
    • global_shutdown_signal -> executables, not libraries, subscribe to SIGINT/SIGTERM
  • Started and cancellation_signal stay.
  • Add a CHANGELOG.md entry with migration steps and the support window (kept through 0.5.x, removed in 0.6.0, a later breaking release).
  • Bump the version to 0.5.0. Publishing to crates.io is a separate maintainer action.

Activity

  1. self-assigned this
    on Nov 6, 2026
  2. added a commit that references this issue on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions