Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c39f46b
refactor(udp-server): [#2801] remove the legacy Halted shutdown API
josecelano-bot Nov 10, 2026
ef59834
refactor(axum-servers): [#2801] remove the legacy Halted shutdown API
josecelano-bot Nov 10, 2026
bc3548b
refactor: [#2801] remove HaltSignal and NestedServerTask and bump tor…
josecelano-bot Nov 10, 2026
553088f
docs(shutdown-process): [#2801] record the removal of the legacy shut…
josecelano-bot Nov 10, 2026
d816542
docs(issues): [#2801] record the verification evidence of the legacy …
josecelano-bot Nov 10, 2026
eba3e38
refactor: [#2801] cover the token-aware server owner and fix the docs…
josecelano-bot Nov 10, 2026
2a7aaaa
docs(issues): [#2801] correct the SI-19 spec and evidence after the r…
josecelano-bot Nov 10, 2026
f742998
docs(pr-reviews): [#2807] add the review audit record
josecelano-bot Nov 10, 2026
9b74ade
docs(issues): [#2801] paste the real live-spec search and its full ou…
josecelano-bot Nov 10, 2026
decf74b
docs(issues): [#2801] record the ten signal verification invocations
josecelano-bot Nov 10, 2026
21b251e
docs(issues): [#2801] say that live specs still describe the removed API
josecelano-bot Nov 10, 2026
62f4fc4
docs(issues): [#2801] point the spec branch at the implementation branch
josecelano-bot Nov 10, 2026
8d02004
docs(issues): [#2801] log the second review round in the SI-19 spec
josecelano-bot Nov 10, 2026
0557f31
docs(issues): [#2801] state only what the evidence shows about the 0.…
josecelano-bot Nov 10, 2026
584089e
docs(pr-reviews): [#2807] align the audit with the bytes and record t…
josecelano-bot Nov 10, 2026
17b006b
docs(issues): [#2801] cite the merge of the torrust-server-lib PR in …
josecelano-bot Nov 10, 2026
3f2b357
docs(issues): [#2801] describe the verification configuration as a re…
josecelano-bot Nov 10, 2026
91e1bc6
docs(issues): [#2801] stamp the second round log entry at its commit …
josecelano-bot Nov 10, 2026
be0fd0d
docs(pr-reviews): [#2807] correct the audit verification of the 0.6.0…
josecelano-bot Nov 10, 2026
703e342
docs(pr-reviews): [#2807] record the fourth review round in the audit
josecelano-bot Nov 10, 2026
3b43612
docs(pr-reviews): [#2807] record the fifth review round in the audit
josecelano-bot Nov 10, 2026
5a15d70
docs(pr-reviews): [#2807] record the sixth review round in the audit
josecelano-bot Nov 10, 2026
5103f88
docs(pr-reviews): [#2807] record the seventh review round in the audit
josecelano-bot Nov 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ torrust-tracker-axum-server = { version = "0.1.0", path = "packages/axum-server"
torrust-tracker-rest-api-client = { version = "0.1.0", path = "packages/rest-api-client" }
torrust-tracker-rest-api-runtime-adapter = { version = "0.1.0", path = "packages/rest-api-runtime-adapter" }
torrust-tracker-rest-api-protocol = { version = "0.1.0", path = "packages/rest-api-protocol" }
torrust-server-lib = "0.5.0"
torrust-server-lib = "0.6.0"
torrust-clock = "3.0.0"
torrust-tracker-configuration = { version = "3.0.0", path = "packages/configuration" }
torrust-tracker-primitives = { version = "3.0.0", path = "packages/primitives" }
Expand Down
2 changes: 1 addition & 1 deletion docs/features/shutdown-process/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ semantic-links:

Draft — implementation in progress under [EPIC #1488](../../issues/open/1488-overhaul-tracker-shutdown/ISSUE.md),
which tracks each sub-issue's status. The [legacy API migration guide](legacy-api-migration.md) maps each
deprecated shutdown symbol to its token-aware replacement. The [task inventory](task-inventory.md)
removed legacy shutdown symbol to its token-aware replacement. The [task inventory](task-inventory.md)
records the current state; for example, the standalone HTTP test environment
and example use the token-aware lifecycle after SI-16 (#2412).

Expand Down
20 changes: 12 additions & 8 deletions docs/features/shutdown-process/legacy-api-migration.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
---
doc-type: feature-supporting-analysis
status: draft
last-updated-utc: "2026-11-10 11:29"
last-updated-utc: "2026-11-10 15:30"
semantic-links:
related-artifacts:
- docs/features/shutdown-process/README.md
- docs/issues/closed/2751-1488-si-18-deprecate-legacy-shutdown-api/ISSUE.md
- docs/issues/open/2801-1488-si-19-remove-legacy-shutdown-api/ISSUE.md
---

# Migrating from the Legacy Shutdown API

EPIC [#1488](../../issues/open/1488-overhaul-tracker-shutdown/ISSUE.md) replaces the `Halted` oneshot-channel
shutdown with a `tokio_util::sync::CancellationToken` that the caller injects and cancels. SI-18 (issue #2751)
deprecates the legacy API at the source; nothing is removed and behavior is unchanged. SI-19 removes it.
deprecated the legacy API at the source, and SI-19 (issue #2801) removed it: the symbols in the first column
below no longer exist, and `torrust-server-lib` 0.6.0 removes its own. Use this guide to migrate code that still
calls them.

## What changed

Expand All @@ -23,12 +26,13 @@ deprecates the legacy API at the source; nothing is removed and behavior is unch
the drain outcome. The UDP server differs: its `CancellationRunning` holds only `local_addr` and one receive-loop
`task`, which returns `Ok(())` after cancellation, so await that task; there is no drain controller.
- **Do not subscribe to signals in a library.** The executable subscribes to SIGINT and SIGTERM and cancels the
token; `global_shutdown_signal` and `shutdown_signal*` are deprecated in `torrust-server-lib` 0.5.0.
token; `global_shutdown_signal` and `shutdown_signal*` were deprecated in `torrust-server-lib` 0.5.0 and are
removed in 0.6.0. No server library subscribes to operating-system signals.

## Replacement table

| Deprecated | Replacement |
| ---------- | ----------- |
| Removed (SI-19) | Replacement |
| --------------- | ----------- |
| `axum-http-server`: `HttpServer<Stopped>::start`, `start_with_health_check`, `RunningHttpServer` | `start_with_cancellation`, `start_with_cancellation_and_health_check` |
| `axum-http-server`: `Running`, `Running.halt_task`, `HttpServer<Running>::stop` | `CancellationRunning`; cancel the token and join `task` and `shutdown_controller` |
| `axum-rest-api-server`: `ApiServer<Stopped>::start`, `Launcher::start`, `RunningApiServer` | `ApiServer<Stopped>::start_with_cancellation` |
Expand All @@ -41,6 +45,6 @@ deprecates the legacy API at the source; nothing is removed and behavior is unch
| `torrust-tracker`: `HaltSignal`, `NestedServerTask` | a `CancellationToken` and the token-aware shutdown controller |
| `torrust-server-lib`: `Halted`, `shutdown_signal*`, `global_shutdown_signal` | `CancellationToken`, `cancellation_signal` (see the library's `CHANGELOG.md`) |

Each deprecation message names its replacement and says the removal is planned for the next breaking release of
the package. The five server package crates are unpublished and the root types are not in the published 3.0.0, so
these notes are in-repo guidance; only the `torrust-server-lib` deprecation has a support window (0.5.x).
The five server package crates are unpublished and the root types were never in a published release, so for them
this guide is in-repo history; only `torrust-server-lib` had a support window (0.5.x), which ended when the
maintainer approved 0.6.0 on 2026-11-10 (recorded in the start gate of the [SI-19 spec](../../issues/open/2801-1488-si-19-remove-legacy-shutdown-api/ISSUE.md), merged in torrust/torrust-tracker#2803).
8 changes: 3 additions & 5 deletions docs/features/shutdown-process/task-inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,9 @@ use of the root token is the legacy `udp_ban_cleanup` job.
library-level OS signals for any server component. The HTTP and UDP test
environments and examples use the token-aware path after SI-16 (#2412)
and SI-17 (#2448), and the REST API and health-check API test
environments do after SI-23 (#2449) and SI-24 (#2450). The legacy `Halted`
APIs remain for other legacy callers until deprecation and removal in
SI-18 and SI-19.
The legacy UDP launcher is now an adapter over
the token-aware receive loop, so it can no longer panic or detach it.
environments do after SI-23 (#2449) and SI-24 (#2450). SI-18 (#2751)
deprecated the legacy `Halted` APIs and SI-19 (#2801) removed them, together
with the legacy UDP launcher adapter.
5. HTTP, REST, and health-check drain controllers are component-owned and
joined. Aligning their drain budgets with the manager deadline is SI-20.
6. Health-check lifecycle uses the token-aware path after SI-13 but does not
Expand Down
Loading
Loading