diff --git a/.github/skills/dev/pr-reviews/fetch-review-threads/SKILL.md b/.github/skills/dev/pr-reviews/fetch-review-threads/SKILL.md index 85180386e..e6c505b78 100644 --- a/.github/skills/dev/pr-reviews/fetch-review-threads/SKILL.md +++ b/.github/skills/dev/pr-reviews/fetch-review-threads/SKILL.md @@ -8,6 +8,7 @@ metadata: related-artifacts: - .github/skills/dev/pr-reviews/fetch-review-threads/scripts/get-pr-review-threads.sh - .github/skills/dev/pr-reviews/fetch-review-threads/scripts/list-unresolved-threads.sh + - .github/skills/dev/pr-reviews/fetch-review-threads/scripts/show-unresolved-thread-bodies.sh --- # Fetching PR Review Threads @@ -55,15 +56,22 @@ Use GitHub CLI if you need to retrieve threads directly from the terminal. ## Available Scripts - `scripts/get-pr-review-threads.sh` - Fetches review threads into a JSON file. -- `scripts/list-unresolved-threads.sh` - Emits unresolved threads as JSON lines. +- `scripts/list-unresolved-threads.sh` - Emits unresolved threads as compact JSON lines (ID, path, URL). Use for triage and tracking. +- `scripts/show-unresolved-thread-bodies.sh` - Prints full thread details including comment bodies in human-readable form. Use to read suggestions before deciding. Recommended usage: ```bash +# 1. Fetch all threads once bash scripts/get-pr-review-threads.sh \ --pr-number 1707 \ --output-file /tmp/pr_threads_1707.json +# 2. Read full suggestion bodies +bash scripts/show-unresolved-thread-bodies.sh \ + --threads-file /tmp/pr_threads_1707.json + +# 3. Get compact IDs/paths for tracker population bash scripts/list-unresolved-threads.sh \ --threads-file /tmp/pr_threads_1707.json ``` diff --git a/.github/skills/dev/pr-reviews/fetch-review-threads/scripts/show-unresolved-thread-bodies.sh b/.github/skills/dev/pr-reviews/fetch-review-threads/scripts/show-unresolved-thread-bodies.sh new file mode 100755 index 000000000..6796bca6e --- /dev/null +++ b/.github/skills/dev/pr-reviews/fetch-review-threads/scripts/show-unresolved-thread-bodies.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash + +set -euo pipefail + +usage() { + cat <<'EOF' +Usage: show-unresolved-thread-bodies.sh --threads-file + +Print the full details of each unresolved review thread, including comment bodies. +Use this after running get-pr-review-threads.sh to read Copilot (or other reviewer) +suggestions before triaging them. + +Options: + --threads-file Path to review threads JSON file written by + get-pr-review-threads.sh (required) + -h, --help Show this help + +Output format (human-readable): + === Thread === + Path: + Outdated: + URL: + Author: + Body: + + --- +EOF +} + +THREADS_FILE="" + +while [[ $# -gt 0 ]]; do + case "$1" in + --threads-file) + THREADS_FILE=${2:-} + shift 2 + ;; + -h|--help) + usage + exit 0 + ;; + *) + echo "Error: unknown argument '$1'." >&2 + usage >&2 + exit 2 + ;; + esac +done + +if [[ -z "${THREADS_FILE}" ]]; then + echo "Error: --threads-file is required." >&2 + usage >&2 + exit 2 +fi + +if [[ ! -f "${THREADS_FILE}" ]]; then + echo "Error: file not found: ${THREADS_FILE}" >&2 + exit 2 +fi + +jq -r ' + .data.repository.pullRequest.reviewThreads.nodes[] + | select(.isResolved == false) + | "=== Thread \(.id) ===", + "Path: \(.path)", + "Outdated: \(.isOutdated)", + (.comments.nodes[] + | "URL: \(.url)", + "Author: \(.author.login)", + "Body:", + .body, + "---" + ) +' "${THREADS_FILE}" diff --git a/.github/skills/dev/pr-reviews/process-copilot-suggestions/SKILL.md b/.github/skills/dev/pr-reviews/process-copilot-suggestions/SKILL.md index 2b9bd2127..4f3ba5afc 100644 --- a/.github/skills/dev/pr-reviews/process-copilot-suggestions/SKILL.md +++ b/.github/skills/dev/pr-reviews/process-copilot-suggestions/SKILL.md @@ -9,6 +9,7 @@ metadata: - docs/templates/COPILOT-SUGGESTIONS-TEMPLATE.md - .github/skills/dev/pr-reviews/fetch-review-threads/scripts/get-pr-review-threads.sh - .github/skills/dev/pr-reviews/fetch-review-threads/scripts/list-unresolved-threads.sh + - .github/skills/dev/pr-reviews/fetch-review-threads/scripts/show-unresolved-thread-bodies.sh - .github/skills/dev/pr-reviews/resolve-review-threads/scripts/resolve-all-unresolved-threads.sh --- @@ -61,7 +62,14 @@ This saves all review threads (resolved, unresolved, outdated) to `/tmp/pr_threa ### 3. Populate the Tracker -Extract unresolved threads from the JSON: +Read the full suggestion bodies to understand each thread: + +```bash +bash ../fetch-review-threads/scripts/show-unresolved-thread-bodies.sh \ + --threads-file /tmp/pr_threads_.json +``` + +Then extract the compact list for populating the tracker table: ```bash bash ../fetch-review-threads/scripts/list-unresolved-threads.sh \ diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml index b544d1da2..08861ee26 100644 --- a/.github/workflows/deployment.yaml +++ b/.github/workflows/deployment.yaml @@ -61,13 +61,13 @@ jobs: cargo publish -p bittorrent-tracker-core cargo publish -p bittorrent-udp-tracker-core cargo publish -p bittorrent-udp-tracker-protocol - cargo publish -p torrust-axum-health-check-api-server - cargo publish -p torrust-axum-http-tracker-server - cargo publish -p torrust-axum-rest-tracker-api-server - cargo publish -p torrust-axum-server - cargo publish -p torrust-rest-tracker-api-client - cargo publish -p torrust-rest-tracker-api-core - cargo publish -p torrust-torrust-server-lib + cargo publish -p torrust-tracker-axum-health-check-api-server + cargo publish -p torrust-tracker-axum-http-server + cargo publish -p torrust-tracker-axum-rest-api-server + cargo publish -p torrust-tracker-axum-server + cargo publish -p torrust-tracker-rest-api-client + cargo publish -p torrust-tracker-rest-api-core + cargo publish -p torrust-server-lib cargo publish -p torrust-tracker cargo publish -p torrust-tracker-client cargo publish -p torrust-tracker-clock @@ -79,5 +79,5 @@ jobs: cargo publish -p torrust-tracker-primitives cargo publish -p torrust-tracker-swarm-coordination-registry cargo publish -p torrust-tracker-test-helpers - cargo publish -p torrust-tracker-torrent-benchmarking - cargo publish -p torrust-udp-tracker-server + cargo publish -p torrust-tracker-torrent-repository-benchmarking + cargo publish -p torrust-tracker-udp-server diff --git a/AGENTS.md b/AGENTS.md index c7c3db548..a94665714 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -60,10 +60,10 @@ All packages live under `packages/`. The workspace version is `3.0.0-develop`. | Package | Crate Name | Prefix / Layer | Description | | --------------------------------- | ------------------------------------------------- | -------------- | ---------------------------------------------- | -| `axum-health-check-api-server` | `torrust-axum-health-check-api-server` | `axum-*` | Health monitoring endpoint | -| `axum-http-tracker-server` | `torrust-axum-http-tracker-server` | `axum-*` | BitTorrent HTTP tracker server (BEP 3/23) | -| `axum-rest-tracker-api-server` | `torrust-axum-rest-tracker-api-server` | `axum-*` | Management REST API server | -| `axum-server` | `torrust-axum-server` | `axum-*` | Base Axum HTTP server infrastructure | +| `axum-health-check-api-server` | `torrust-tracker-axum-health-check-api-server` | `axum-*` | Health monitoring endpoint | +| `axum-http-tracker-server` | `torrust-tracker-axum-http-server` | `axum-*` | BitTorrent HTTP tracker server (BEP 3/23) | +| `axum-rest-tracker-api-server` | `torrust-tracker-axum-rest-api-server` | `axum-*` | Management REST API server | +| `axum-server` | `torrust-tracker-axum-server` | `axum-*` | Base Axum HTTP server infrastructure | | `clock` | `torrust-tracker-clock` | utilities | Mockable time source for deterministic testing | | `configuration` | `torrust-tracker-configuration` | domain | Config file parsing, environment variables | | `events` | `torrust-tracker-events` | domain | Domain event definitions | @@ -73,8 +73,8 @@ All packages live under `packages/`. The workspace version is `3.0.0-develop`. | `metrics` | `torrust-tracker-metrics` | domain | Prometheus metrics integration | | `peer-id` | `bittorrent-peer-id` | domain | Peer ID parsing and formatting utilities | | `primitives` | `torrust-tracker-primitives` | domain | Core domain types (InfoHash, PeerId, ...) | -| `rest-tracker-api-client` | `torrust-rest-tracker-api-client` | client tools | REST API client library | -| `rest-tracker-api-core` | `torrust-rest-tracker-api-core` | client tools | REST API core logic | +| `rest-tracker-api-client` | `torrust-tracker-rest-api-client` | client tools | REST API client library | +| `rest-tracker-api-core` | `torrust-tracker-rest-api-core` | client tools | REST API core logic | | `server-lib` | `torrust-server-lib` | shared | Shared server library utilities | | `swarm-coordination-registry` | `torrust-tracker-swarm-coordination-registry` | domain | Torrent/peer coordination registry | | `test-helpers` | `torrust-tracker-test-helpers` | utilities | Mock servers, test data generation | @@ -83,7 +83,7 @@ All packages live under `packages/`. The workspace version is `3.0.0-develop`. | `tracker-core` | `bittorrent-tracker-core` | `*-core` | Central tracker peer-management logic | | `udp-protocol` | `bittorrent-udp-tracker-protocol` | `*-protocol` | UDP tracker protocol (BEP 15) framing/parsing | | `udp-tracker-core` | `bittorrent-udp-tracker-core` | `*-core` | UDP-specific tracker domain logic | -| `udp-tracker-server` | `torrust-udp-tracker-server` | server | UDP tracker server implementation | +| `udp-tracker-server` | `torrust-tracker-udp-server` | server | UDP tracker server implementation | **Console tools** (under `console/`): diff --git a/Cargo.lock b/Cargo.lock index 23592b0d8..1f7430fee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5103,7 +5103,71 @@ dependencies = [ ] [[package]] -name = "torrust-axum-health-check-api-server" +name = "torrust-net-primitives" +version = "3.0.0-develop" +dependencies = [ + "rstest 0.25.0", + "serde", + "thiserror 2.0.18", + "url", +] + +[[package]] +name = "torrust-server-lib" +version = "3.0.0-develop" +dependencies = [ + "derive_more 2.1.1", + "tokio", + "torrust-net-primitives", + "tower-http", + "tracing", +] + +[[package]] +name = "torrust-tracker" +version = "3.0.0-develop" +dependencies = [ + "anyhow", + "axum-server", + "base64", + "bittorrent-http-tracker-core", + "bittorrent-primitives", + "bittorrent-tracker-client", + "bittorrent-tracker-core", + "bittorrent-udp-tracker-core", + "chrono", + "clap", + "pbkdf2", + "rand 0.10.1", + "regex", + "reqwest", + "serde", + "serde_json", + "sha1 0.11.0", + "sha2 0.11.0", + "tempfile", + "thiserror 2.0.18", + "tokio", + "tokio-util", + "toml 1.1.2+spec-1.1.0", + "torrust-server-lib", + "torrust-tracker-axum-health-check-api-server", + "torrust-tracker-axum-http-server", + "torrust-tracker-axum-rest-api-server", + "torrust-tracker-axum-server", + "torrust-tracker-clock", + "torrust-tracker-configuration", + "torrust-tracker-rest-api-client", + "torrust-tracker-rest-api-core", + "torrust-tracker-swarm-coordination-registry", + "torrust-tracker-test-helpers", + "torrust-tracker-udp-server", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "torrust-tracker-axum-health-check-api-server" version = "3.0.0-develop" dependencies = [ "axum", @@ -5114,23 +5178,23 @@ dependencies = [ "serde", "serde_json", "tokio", - "torrust-axum-health-check-api-server", - "torrust-axum-http-tracker-server", - "torrust-axum-rest-tracker-api-server", - "torrust-axum-server", "torrust-net-primitives", "torrust-server-lib", + "torrust-tracker-axum-health-check-api-server", + "torrust-tracker-axum-http-server", + "torrust-tracker-axum-rest-api-server", + "torrust-tracker-axum-server", "torrust-tracker-clock", "torrust-tracker-configuration", "torrust-tracker-test-helpers", - "torrust-udp-tracker-server", + "torrust-tracker-udp-server", "tower-http", "tracing", "url", ] [[package]] -name = "torrust-axum-http-tracker-server" +name = "torrust-tracker-axum-http-server" version = "3.0.0-develop" dependencies = [ "axum", @@ -5146,7 +5210,7 @@ dependencies = [ "hyper", "local-ip-address", "percent-encoding", - "rand 0.10.1", + "rand 0.9.4", "reqwest", "serde", "serde_bencode", @@ -5154,9 +5218,9 @@ dependencies = [ "serde_repr", "tokio", "tokio-util", - "torrust-axum-server", "torrust-net-primitives", "torrust-server-lib", + "torrust-tracker-axum-server", "torrust-tracker-clock", "torrust-tracker-configuration", "torrust-tracker-primitives", @@ -5169,7 +5233,7 @@ dependencies = [ ] [[package]] -name = "torrust-axum-rest-tracker-api-server" +name = "torrust-tracker-axum-rest-api-server" version = "3.0.0-develop" dependencies = [ "axum", @@ -5188,18 +5252,18 @@ dependencies = [ "serde_with", "thiserror 2.0.18", "tokio", - "torrust-axum-server", "torrust-net-primitives", - "torrust-rest-tracker-api-client", - "torrust-rest-tracker-api-core", "torrust-server-lib", + "torrust-tracker-axum-server", "torrust-tracker-clock", "torrust-tracker-configuration", "torrust-tracker-metrics", "torrust-tracker-primitives", + "torrust-tracker-rest-api-client", + "torrust-tracker-rest-api-core", "torrust-tracker-swarm-coordination-registry", "torrust-tracker-test-helpers", - "torrust-udp-tracker-server", + "torrust-tracker-udp-server", "tower", "tower-http", "tracing", @@ -5208,7 +5272,7 @@ dependencies = [ ] [[package]] -name = "torrust-axum-server" +name = "torrust-tracker-axum-server" version = "3.0.0-develop" dependencies = [ "axum-server", @@ -5227,100 +5291,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "torrust-net-primitives" -version = "3.0.0-develop" -dependencies = [ - "rstest 0.25.0", - "serde", - "thiserror 2.0.18", - "url", -] - -[[package]] -name = "torrust-rest-tracker-api-client" -version = "3.0.0-develop" -dependencies = [ - "hyper", - "reqwest", - "serde", - "thiserror 2.0.18", - "url", - "uuid", -] - -[[package]] -name = "torrust-rest-tracker-api-core" -version = "3.0.0-develop" -dependencies = [ - "bittorrent-http-tracker-core", - "bittorrent-tracker-core", - "bittorrent-udp-tracker-core", - "tokio", - "tokio-util", - "torrust-tracker-configuration", - "torrust-tracker-events", - "torrust-tracker-metrics", - "torrust-tracker-primitives", - "torrust-tracker-swarm-coordination-registry", - "torrust-tracker-test-helpers", - "torrust-udp-tracker-server", -] - -[[package]] -name = "torrust-server-lib" -version = "3.0.0-develop" -dependencies = [ - "derive_more 2.1.1", - "tokio", - "torrust-net-primitives", - "tower-http", - "tracing", -] - -[[package]] -name = "torrust-tracker" -version = "3.0.0-develop" -dependencies = [ - "anyhow", - "axum-server", - "base64", - "bittorrent-http-tracker-core", - "bittorrent-primitives", - "bittorrent-tracker-client", - "bittorrent-tracker-core", - "bittorrent-udp-tracker-core", - "chrono", - "clap", - "pbkdf2", - "rand 0.10.1", - "regex", - "reqwest", - "serde", - "serde_json", - "sha1 0.11.0", - "sha2 0.11.0", - "tempfile", - "thiserror 2.0.18", - "tokio", - "tokio-util", - "toml 1.1.2+spec-1.1.0", - "torrust-axum-health-check-api-server", - "torrust-axum-http-tracker-server", - "torrust-axum-rest-tracker-api-server", - "torrust-axum-server", - "torrust-rest-tracker-api-client", - "torrust-rest-tracker-api-core", - "torrust-server-lib", - "torrust-tracker-clock", - "torrust-tracker-configuration", - "torrust-tracker-swarm-coordination-registry", - "torrust-tracker-test-helpers", - "torrust-udp-tracker-server", - "tracing", - "tracing-subscriber", -] - [[package]] name = "torrust-tracker-client" version = "3.0.0-develop" @@ -5434,6 +5404,36 @@ dependencies = [ "torrust-tracker-clock", ] +[[package]] +name = "torrust-tracker-rest-api-client" +version = "3.0.0-develop" +dependencies = [ + "hyper", + "reqwest", + "serde", + "thiserror 2.0.18", + "url", + "uuid", +] + +[[package]] +name = "torrust-tracker-rest-api-core" +version = "3.0.0-develop" +dependencies = [ + "bittorrent-http-tracker-core", + "bittorrent-tracker-core", + "bittorrent-udp-tracker-core", + "tokio", + "tokio-util", + "torrust-tracker-configuration", + "torrust-tracker-events", + "torrust-tracker-metrics", + "torrust-tracker-primitives", + "torrust-tracker-swarm-coordination-registry", + "torrust-tracker-test-helpers", + "torrust-tracker-udp-server", +] + [[package]] name = "torrust-tracker-swarm-coordination-registry" version = "3.0.0-develop" @@ -5484,7 +5484,7 @@ dependencies = [ ] [[package]] -name = "torrust-udp-tracker-server" +name = "torrust-tracker-udp-server" version = "3.0.0-develop" dependencies = [ "bittorrent-primitives", @@ -5496,7 +5496,7 @@ dependencies = [ "futures", "futures-util", "mockall", - "rand 0.10.1", + "rand 0.9.4", "ringbuf", "serde", "thiserror 2.0.18", diff --git a/Cargo.toml b/Cargo.toml index ca1177c51..11738fd44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,17 +54,17 @@ thiserror = "2.0.12" tokio = { version = "1", features = [ "macros", "net", "rt-multi-thread", "signal", "sync" ] } tokio-util = "0.7.15" toml = "1" -torrust-axum-health-check-api-server = { version = "3.0.0-develop", path = "packages/axum-health-check-api-server" } -torrust-axum-http-tracker-server = { version = "3.0.0-develop", path = "packages/axum-http-tracker-server" } -torrust-axum-rest-tracker-api-server = { version = "3.0.0-develop", path = "packages/axum-rest-tracker-api-server" } -torrust-axum-server = { version = "3.0.0-develop", path = "packages/axum-server" } -torrust-rest-tracker-api-client = { version = "3.0.0-develop", path = "packages/rest-tracker-api-client" } -torrust-rest-tracker-api-core = { version = "3.0.0-develop", path = "packages/rest-tracker-api-core" } +torrust-tracker-axum-health-check-api-server = { version = "3.0.0-develop", path = "packages/axum-health-check-api-server" } +torrust-tracker-axum-http-server = { version = "3.0.0-develop", path = "packages/axum-http-tracker-server" } +torrust-tracker-axum-rest-api-server = { version = "3.0.0-develop", path = "packages/axum-rest-tracker-api-server" } +torrust-tracker-axum-server = { version = "3.0.0-develop", path = "packages/axum-server" } +torrust-tracker-rest-api-client = { version = "3.0.0-develop", path = "packages/rest-tracker-api-client" } +torrust-tracker-rest-api-core = { version = "3.0.0-develop", path = "packages/rest-tracker-api-core" } torrust-server-lib = { version = "3.0.0-develop", path = "packages/server-lib" } torrust-tracker-clock = { version = "3.0.0-develop", path = "packages/clock" } torrust-tracker-configuration = { version = "3.0.0-develop", path = "packages/configuration" } torrust-tracker-swarm-coordination-registry = { version = "3.0.0-develop", path = "packages/swarm-coordination-registry" } -torrust-udp-tracker-server = { version = "3.0.0-develop", path = "packages/udp-tracker-server" } +torrust-tracker-udp-server = { version = "3.0.0-develop", path = "packages/udp-tracker-server" } tracing = "0" tracing-subscriber = { version = "0", features = [ "json" ] } diff --git a/docs/issues/closed/1732-replace-aquatic-udp-protocol/step-3-bittorrent-primitives-problem.md b/docs/issues/closed/1732-replace-aquatic-udp-protocol/step-3-bittorrent-primitives-problem.md index a502ec6ce..ccd1f5c38 100644 --- a/docs/issues/closed/1732-replace-aquatic-udp-protocol/step-3-bittorrent-primitives-problem.md +++ b/docs/issues/closed/1732-replace-aquatic-udp-protocol/step-3-bittorrent-primitives-problem.md @@ -52,8 +52,8 @@ In zerocopy 0.8, `read_from` was renamed to `read_from_bytes` and its return typ | Package | Published on crates.io | | ------------------------------------------------- | ---------------------- | -| `torrust-axum-http-tracker-server` | No | -| `torrust-axum-rest-tracker-api-server` | No | +| `torrust-tracker-axum-http-server` | No | +| `torrust-tracker-axum-rest-api-server` | No | | `bittorrent-http-tracker-protocol` | No | | `bittorrent-http-tracker-core` | No | | `torrust-tracker-primitives` | **Yes** | @@ -62,7 +62,7 @@ In zerocopy 0.8, `read_from` was renamed to `read_from_bytes` and its return typ | `bittorrent-tracker-client` | No | | `bittorrent-tracker-core` | No | | `bittorrent-udp-tracker-core` | No | -| `torrust-udp-tracker-server` | No | +| `torrust-tracker-udp-server` | No | Also, the root workspace crate (`torrust-tracker`) has `bittorrent-primitives = "0.1.0"` in its `[dev-dependencies]`. diff --git a/docs/issues/closed/1804-use-cargo-machete-with-metadata-and-remove-unused-dev-deps.md b/docs/issues/closed/1804-use-cargo-machete-with-metadata-and-remove-unused-dev-deps.md index 7d009c477..14e4f2612 100644 --- a/docs/issues/closed/1804-use-cargo-machete-with-metadata-and-remove-unused-dev-deps.md +++ b/docs/issues/closed/1804-use-cargo-machete-with-metadata-and-remove-unused-dev-deps.md @@ -35,9 +35,9 @@ During a coupling analysis review (see [workspace-coupling-report.md](../open/1669-overhaul-packages/workspace-coupling-report.md)), four workspace dependencies were found to have zero references in any source file: -- `bittorrent-tracker-core` → `torrust-rest-tracker-api-client` [dev] +- `bittorrent-tracker-core` → `torrust-tracker-rest-api-client` [dev] - `bittorrent-udp-tracker-core` → `torrust-tracker-test-helpers` [dev] -- `torrust-axum-http-tracker-server` → `torrust-tracker-events` [dev] +- `torrust-tracker-axum-http-server` → `torrust-tracker-events` [dev] - `torrust-tracker-swarm-coordination-registry` → `torrust-tracker-test-helpers` [dev] Running `cargo machete` (plain, text-based scan) did **not** flag these — a false negative. Only diff --git a/docs/issues/closed/1813-1669-06-resolve-bittorrent-tracker-core-rest-api-layer-violation.md b/docs/issues/closed/1813-1669-06-resolve-bittorrent-tracker-core-rest-api-layer-violation.md index 389d7f1ea..2518fe65a 100644 --- a/docs/issues/closed/1813-1669-06-resolve-bittorrent-tracker-core-rest-api-layer-violation.md +++ b/docs/issues/closed/1813-1669-06-resolve-bittorrent-tracker-core-rest-api-layer-violation.md @@ -19,12 +19,12 @@ semantic-links: -# Issue #1813 - Resolve `bittorrent-tracker-core` ↔ `torrust-rest-tracker-api-client` layer violation +# Issue #1813 - Resolve `bittorrent-tracker-core` ↔ `torrust-tracker-rest-api-client` layer violation ## Goal Remove the stale dev dependency from `bittorrent-tracker-core` on -`torrust-rest-tracker-api-client`. A pre-implementation audit revealed that the dependency is +`torrust-tracker-rest-api-client`. A pre-implementation audit revealed that the dependency is declared in `packages/tracker-core/Cargo.toml` but is never imported or used anywhere in `src/` or `tests/`. The fix is a one-line `Cargo.toml` deletion. @@ -32,12 +32,12 @@ declared in `packages/tracker-core/Cargo.toml` but is never imported or used any The coupling analysis (F-05) found: -> `bittorrent-tracker-core` → `torrust-rest-tracker-api-client` [dev] +> `bittorrent-tracker-core` → `torrust-tracker-rest-api-client` [dev] The entry was listed in `[dev-dependencies]` of `packages/tracker-core/Cargo.toml` (line 48), which caused the coupling tool to report it as a layer violation. However, auditing `packages/tracker-core/tests/` and `packages/tracker-core/src/` shows **zero uses** of -`torrust_rest_tracker_api_client` anywhere in the crate. The dependency is dead — left over +`torrust_tracker_rest_api_client` anywhere in the crate. The dependency is dead — left over from a previous refactor. No code movement or extraction is needed. `cargo machete` would also flag this as an unused @@ -50,7 +50,7 @@ This issue is a subissue of EPIC [#1669](../open/1669-overhaul-packages/EPIC.md) ### In Scope -- Remove `torrust-rest-tracker-api-client` from `packages/tracker-core/Cargo.toml` +- Remove `torrust-tracker-rest-api-client` from `packages/tracker-core/Cargo.toml` `[dev-dependencies]`. - Verify the workspace builds and all tests pass. @@ -69,7 +69,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | ID | Status | Task | Notes / Expected Output | | --- | ------ | ----------------------------------------------------------------------------------------------------- | --------------------------- | -| T1 | DONE | Remove `torrust-rest-tracker-api-client` from `packages/tracker-core/Cargo.toml` `[dev-dependencies]` | Done in PR #1804 | +| T1 | DONE | Remove `torrust-tracker-rest-api-client` from `packages/tracker-core/Cargo.toml` `[dev-dependencies]` | Done in PR #1804 | | T2 | DONE | Run `cargo build --workspace` and `cargo test --workspace` | Clean build; all tests pass | | T3 | DONE | Run `linter all` | Exit code `0` | @@ -97,13 +97,13 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. deletion. - 2026-05-20 14:00 UTC - josecelano - GitHub issue #1813 created. Fix was already applied in PR #1804 (commit e242db8a) as part of a broader `cargo machete --with-metadata` cleanup. - Both `local-ip-address` and `torrust-rest-tracker-api-client` were removed from + Both `local-ip-address` and `torrust-tracker-rest-api-client` were removed from `packages/tracker-core/Cargo.toml` [dev-dependencies]. All acceptance criteria verified. Issue closed immediately; spec moved to `docs/issues/closed/`. ## Acceptance Criteria -- [x] `packages/tracker-core/Cargo.toml` does not list `torrust-rest-tracker-api-client` in +- [x] `packages/tracker-core/Cargo.toml` does not list `torrust-tracker-rest-api-client` in `[dev-dependencies]`. Removed in PR #1804 (commit e242db8a). - [x] All `bittorrent-tracker-core` integration tests still compile and pass. Verified in PR #1804. - [x] `cargo build --workspace` succeeds with zero errors. Verified in PR #1804. @@ -126,5 +126,5 @@ Status values: `TODO`, `IN_PROGRESS`, `DONE`, `FAILED`, `BLOCKED`. | ID | Scenario | Command / Steps | Expected Result | Status | Evidence | | --- | --------------------------------------------------------- | ------------------------------------------------------------------------- | --------------- | ------ | ------------------------------------------------ | -| M1 | No dev dep on `rest-tracker-api-client` in `tracker-core` | `grep "torrust-rest-tracker-api-client" packages/tracker-core/Cargo.toml` | Zero matches | DONE | PR #1804; `grep` returns zero matches on develop | +| M1 | No dev dep on `rest-tracker-api-client` in `tracker-core` | `grep "torrust-tracker-rest-api-client" packages/tracker-core/Cargo.toml` | Zero matches | DONE | PR #1804; `grep` returns zero matches on develop | | M2 | `bittorrent-tracker-core` integration tests pass | `cargo test -p bittorrent-tracker-core --tests` | All pass | DONE | Verified in PR #1804 | diff --git a/docs/issues/open/1669-overhaul-packages/EPIC.md b/docs/issues/open/1669-overhaul-packages/EPIC.md index 807ea19ed..a0f55967f 100644 --- a/docs/issues/open/1669-overhaul-packages/EPIC.md +++ b/docs/issues/open/1669-overhaul-packages/EPIC.md @@ -58,32 +58,33 @@ The workspace currently contains **27 packages** (including the root `torrust-tr ### `torrust-` prefix (non-`torrust-tracker-`) -| Published on crates.io | Crate Name | Folder | -| ---------------------- | -------------------------------------- | ------------------------------ | -| No | `torrust-axum-health-check-api-server` | `axum-health-check-api-server` | -| No | `torrust-axum-http-tracker-server` | `axum-http-tracker-server` | -| No | `torrust-axum-rest-tracker-api-server` | `axum-rest-tracker-api-server` | -| No | `torrust-axum-server` | `axum-server` | -| No | `torrust-rest-tracker-api-client` | `rest-tracker-api-client` | -| No | `torrust-rest-tracker-api-core` | `rest-tracker-api-core` | -| No | `torrust-server-lib` | `server-lib` | -| No | `torrust-udp-tracker-server` | `udp-tracker-server` | +| Published on crates.io | Crate Name | Folder | +| ---------------------- | ------------------------ | ---------------- | +| No | `torrust-net-primitives` | `net-primitives` | +| No | `torrust-server-lib` | `server-lib` | ### `torrust-tracker-` prefix | Published on crates.io | Crate Name | Folder | | ---------------------- | ------------------------------------------------- | --------------------------------- | +| No | `torrust-tracker-axum-health-check-api-server` | `axum-health-check-api-server` | +| No | `torrust-tracker-axum-http-server` | `axum-http-tracker-server` | +| No | `torrust-tracker-axum-rest-api-server` | `axum-rest-tracker-api-server` | +| No | `torrust-tracker-axum-server` | `axum-server` | +| No | `torrust-tracker-client` | `console/tracker-client` | | Yes | `torrust-tracker-clock` | `clock` | | Yes | `torrust-tracker-configuration` | `configuration` | +| Yes | `torrust-tracker-contrib-bencode` | `contrib/bencode` | | No | `torrust-tracker-events` | `events` | | Yes | `torrust-tracker-located-error` | `located-error` | | No | `torrust-tracker-metrics` | `metrics` | | Yes | `torrust-tracker-primitives` | `primitives` | +| No | `torrust-tracker-rest-api-client` | `rest-tracker-api-client` | +| No | `torrust-tracker-rest-api-core` | `rest-tracker-api-core` | | No | `torrust-tracker-swarm-coordination-registry` | `swarm-coordination-registry` | | Yes | `torrust-tracker-test-helpers` | `test-helpers` | | No | `torrust-tracker-torrent-repository-benchmarking` | `torrent-repository-benchmarking` | -| No | `torrust-tracker-client` | `console/tracker-client` | -| Yes | `torrust-tracker-contrib-bencode` | `contrib/bencode` | +| No | `torrust-tracker-udp-server` | `udp-tracker-server` | ### `bittorrent-` prefix @@ -123,21 +124,23 @@ destination group with a "Renamed from …" note. ### `torrust-tracker-` prefix -| Published on crates.io | Crate Name | Folder | Change | -| ---------------------- | ------------------------------------------------- | --------------------------------- | --------------------------------------------------- | -| No | `torrust-tracker-axum-health-check-api-server` | `axum-health-check-api-server` | Renamed from `torrust-axum-health-check-api-server` | -| No | `torrust-tracker-axum-http-server` | `axum-http-tracker-server` | Renamed from `torrust-axum-http-tracker-server` | -| No | `torrust-tracker-axum-rest-api-server` | `axum-rest-tracker-api-server` | Renamed from `torrust-axum-rest-tracker-api-server` | -| No | `torrust-tracker-axum-server` | `axum-server` | Renamed from `torrust-axum-server` | -| Yes | `torrust-tracker-configuration` | `configuration` | — | -| No | `torrust-tracker-events` | `events` | — | -| Yes | `torrust-tracker-primitives` | `primitives` | — | -| No | `torrust-tracker-rest-api-client` | `rest-tracker-api-client` | Renamed from `torrust-rest-tracker-api-client` | -| No | `torrust-tracker-rest-api-core` | `rest-tracker-api-core` | Renamed from `torrust-rest-tracker-api-core` | -| No | `torrust-tracker-swarm-coordination-registry` | `swarm-coordination-registry` | — | -| Yes | `torrust-tracker-test-helpers` | `test-helpers` | — | -| No | `torrust-tracker-torrent-repository-benchmarking` | `torrent-repository-benchmarking` | — | -| No | `torrust-tracker-udp-server` | `udp-tracker-server` | Renamed from `torrust-udp-tracker-server` | +| Published on crates.io | Crate Name | Folder | Change | +| ---------------------- | ------------------------------------------------- | --------------------------------- | ------ | +| No | `torrust-tracker-axum-health-check-api-server` | `axum-health-check-api-server` | — | +| No | `torrust-tracker-axum-http-server` | `axum-http-tracker-server` | — | +| No | `torrust-tracker-axum-rest-api-server` | `axum-rest-tracker-api-server` | — | +| No | `torrust-tracker-axum-server` | `axum-server` | — | +| Yes | `torrust-tracker-configuration` | `configuration` | — | +| No | `torrust-tracker-events` | `events` | — | +| Yes | `torrust-tracker-primitives` | `primitives` | — | +| No | `torrust-tracker-rest-api-client` | `rest-tracker-api-client` | — | +| No | `torrust-tracker-rest-api-core` | `rest-tracker-api-core` | — | +| No | `torrust-tracker-swarm-coordination-registry` | `swarm-coordination-registry` | — | +| Yes | `torrust-tracker-test-helpers` | `test-helpers` | — | +| No | `torrust-tracker-torrent-repository-benchmarking` | `torrent-repository-benchmarking` | — | +| No | `torrust-tracker-udp-server` | `udp-tracker-server` | — | + +> **Note on `torrust-tracker-axum-server`**: This package is classified as `torrust-tracker-` because `tsl.rs` imports `TslConfig` from `torrust-tracker-configuration` and `LocatedError`/`DynError` from `torrust-tracker-located-error`. Both dependencies are temporary: `TslConfig` is a small two-field struct with no tracker-specific logic that could be moved to a generic package, and `torrust-tracker-located-error` will be renamed to `torrust-located-error` (SI-10). Once those changes land the package could move to the `torrust-` group as a generic `torrust-axum-server` reusable across the Torrust organisation. A near-identical module already exists in [torrust-index](https://github.com/torrust/torrust-index/blob/develop/src/web/api/server/custom_axum.rs). ### `bittorrent-` prefix @@ -208,9 +211,9 @@ Status: TODO unless noted. `SI-XX` = recommended implementation sequence number. - [x] SI-02 — Move `DurationSinceUnixEpoch` from `torrust-tracker-primitives` to `torrust-tracker-clock` _(Rule M; no hard blockers)_ - [ ] SI-03 — Define per-package default timeout constants and remove `DEFAULT_TIMEOUT` from `torrust-tracker-configuration` _(Rule M; no blockers)_ - [ ] SI-04 — [#1795](https://github.com/torrust/torrust-tracker/issues/1795) Move `AnnouncePolicy` from `torrust-tracker-configuration` to `torrust-tracker-primitives` _(Rule M; no blockers)_ -- [ ] SI-05 — [#1797](https://github.com/torrust/torrust-tracker/issues/1797) Create `torrust-net-primitives` and move `ServiceBinding` from `torrust-tracker-primitives` _(Rule M + new package; no blockers)_ -- [x] SI-06 — [#1813](https://github.com/torrust/torrust-tracker/issues/1813) Resolve `bittorrent-tracker-core` ↔ `torrust-rest-tracker-api-client` layer violation _(Rule M; prerequisite for `bittorrent-tracker-core` extraction)_ -- [ ] SI-07 — Align `torrust-` prefix: rename 7 tracker-specific packages to `torrust-tracker-` _(Rule U; no blockers)_ +- [x] SI-05 — [#1797](https://github.com/torrust/torrust-tracker/issues/1797) Create `torrust-net-primitives` and move `ServiceBinding` from `torrust-tracker-primitives` _(Rule M + new package; no blockers)_ +- [x] SI-06 — [#1813](https://github.com/torrust/torrust-tracker/issues/1813) Resolve `bittorrent-tracker-core` ↔ `torrust-tracker-rest-api-client` layer violation _(Rule M; prerequisite for `bittorrent-tracker-core` extraction)_ +- [x] SI-07 — [#1816](https://github.com/torrust/torrust-tracker/issues/1816) Align `torrust-` prefix: rename 7 tracker-specific packages to `torrust-tracker-` _(Rule U; no blockers)_ - [ ] SI-08 — Rename `torrust-tracker-metrics` to `torrust-metrics` _(Rule U; no blockers)_ - [ ] SI-09 — Rename `torrust-tracker-clock` to `torrust-clock` _(Rule P; no blockers)_ - [ ] SI-10 — Rename `torrust-tracker-located-error` to `torrust-located-error` _(Rule P; no blockers)_ @@ -229,8 +232,8 @@ Details: | SI-03 | [#1793](https://github.com/torrust/torrust-tracker/issues/1793) — Define per-package default timeout constants and remove `DEFAULT_TIMEOUT` from `torrust-tracker-configuration` | [docs/issues/open/1793-1669-03-define-per-package-default-timeout-constants.md](../../open/1793-1669-03-define-per-package-default-timeout-constants.md) | TODO | Rule M; no blockers; SI-09 no longer depends on this | | SI-04 | [#1795](https://github.com/torrust/torrust-tracker/issues/1795) — Move `AnnouncePolicy` from `torrust-tracker-configuration` to `torrust-tracker-primitives` | [docs/issues/open/1795-1669-04-move-announce-policy-to-torrust-tracker-primitives.md](../../open/1795-1669-04-move-announce-policy-to-torrust-tracker-primitives.md) | TODO | Rule M; fixes inverted dep (primitives → configuration); no blockers | | SI-05 | [#1797](https://github.com/torrust/torrust-tracker/issues/1797) — Create `torrust-net-primitives` and move `ServiceBinding` from `torrust-tracker-primitives` | [docs/issues/open/1797-1669-05-create-torrust-net-primitives-and-move-service-binding.md](../../open/1797-1669-05-create-torrust-net-primitives-and-move-service-binding.md) | TODO | Rule M + new package; generic networking type; breaks server-lib → tracker-primitives dep | -| SI-06 | [#1813](https://github.com/torrust/torrust-tracker/issues/1813) — Resolve `bittorrent-tracker-core` ↔ `torrust-rest-tracker-api-client` layer violation | [docs/issues/closed/1813-1669-06-resolve-bittorrent-tracker-core-rest-api-layer-violation.md](../../closed/1813-1669-06-resolve-bittorrent-tracker-core-rest-api-layer-violation.md) | DONE | Rule M; stale unused dev dep removed in PR #1804; unblocks `bittorrent-tracker-core` extraction | -| SI-07 | #TBD — Align `torrust-` prefix: rename 7 tracker-specific packages to `torrust-tracker-` | [docs/issues/drafts/1669-07-align-torrust-prefix-rename-tracker-specific-packages.md](../../drafts/1669-07-align-torrust-prefix-rename-tracker-specific-packages.md) | TODO | Rule U; none of the 7 are published; pure workspace rename; no blockers | +| SI-06 | [#1813](https://github.com/torrust/torrust-tracker/issues/1813) — Resolve `bittorrent-tracker-core` ↔ `torrust-tracker-rest-api-client` layer violation | [docs/issues/closed/1813-1669-06-resolve-bittorrent-tracker-core-rest-api-layer-violation.md](../../closed/1813-1669-06-resolve-bittorrent-tracker-core-rest-api-layer-violation.md) | DONE | Rule M; stale unused dev dep removed in PR #1804; unblocks `bittorrent-tracker-core` extraction | +| SI-07 | [#1816](https://github.com/torrust/torrust-tracker/issues/1816) — Align `torrust-` prefix: rename 7 tracker-specific packages to `torrust-tracker-` | [docs/issues/open/1816-1669-07-align-torrust-prefix-rename-tracker-specific-packages.md](../../open/1816-1669-07-align-torrust-prefix-rename-tracker-specific-packages.md) | DONE | Rule U; none of the 7 are published; pure workspace rename; no blockers | | SI-08 | #TBD — Rename `torrust-tracker-metrics` to `torrust-metrics` | [docs/issues/drafts/1669-08-rename-torrust-tracker-metrics-to-torrust-metrics.md](../../drafts/1669-08-rename-torrust-tracker-metrics-to-torrust-metrics.md) | TODO | Rule U; not yet published; no blockers; prerequisite for SI-14 | | SI-09 | #TBD — Rename `torrust-tracker-clock` to `torrust-clock` | [docs/issues/drafts/1669-09-rename-torrust-tracker-clock-to-torrust-clock.md](../../drafts/1669-09-rename-torrust-tracker-clock-to-torrust-clock.md) | TODO | Rule P; published on crates.io; no blockers; prerequisite for SI-13 | | SI-10 | #TBD — Rename `torrust-tracker-located-error` to `torrust-located-error` | [docs/issues/drafts/1669-10-rename-torrust-tracker-located-error-to-torrust-located-error.md](../../drafts/1669-10-rename-torrust-tracker-located-error-to-torrust-located-error.md) | TODO | Rule P; published on crates.io; no blockers | @@ -337,7 +340,7 @@ against this constraint (verified May 2026). | `torrust-tracker-clock` (→ `torrust-clock`) | Yes | None (✅ `torrust-tracker-primitives` dep removed by SI-02 #1790) | ✅ After rename | See [extract clock subissue](../../drafts/1669-13-extract-torrust-clock-to-standalone-repo.md) | | `torrust-tracker-metrics` (→ `torrust-metrics`) | No | `torrust-tracker-clock` (published ✅; was `torrust-tracker-primitives` — removed by SI-02 #1790) | ✅ After rename | See [extract metrics subissue](../../drafts/1669-14-extract-torrust-metrics-to-standalone-repo.md) | | `bittorrent-udp-tracker-protocol` | No | `bittorrent-peer-id` (not published) | ❌ | After `bittorrent-peer-id` | -| `bittorrent-tracker-core` | No | `torrust-tracker-events`, `torrust-tracker-metrics`, `torrust-tracker-swarm-coordination-registry`, `torrust-rest-tracker-api-client` (all unpublished) | ❌ Very deep chain | After all four above; also has `torrust-rest-tracker-api-client` as a runtime dep — a layer violation worth resolving before extraction | +| `bittorrent-tracker-core` | No | `torrust-tracker-events`, `torrust-tracker-metrics`, `torrust-tracker-swarm-coordination-registry`, `torrust-tracker-rest-api-client` (all unpublished) | ❌ Very deep chain | After all four above; also has `torrust-tracker-rest-api-client` as a runtime dep — a layer violation worth resolving before extraction | | `bittorrent-http-tracker-protocol` | No | `bittorrent-udp-tracker-protocol`, `bittorrent-tracker-core` (both unpublished) | ❌ | After `bittorrent-udp-tracker-protocol` and `bittorrent-tracker-core` | **Practical extraction order for `bittorrent-*` crates** (once decided): @@ -345,7 +348,7 @@ against this constraint (verified May 2026). 1. `bittorrent-peer-id` — no workspace deps; extract first. 2. `bittorrent-udp-tracker-protocol` — only blocked by #1. 3. `bittorrent-tracker-core` — needs the four unpublished deps above + clock rename; complex - chain; the layer violation (`torrust-rest-tracker-api-client` runtime dep) should be + chain; the layer violation (`torrust-tracker-rest-api-client` runtime dep) should be resolved before or during this step. 4. `bittorrent-http-tracker-protocol` — needs #2 and #3 done. diff --git a/docs/issues/open/1669-overhaul-packages/readme-audit.md b/docs/issues/open/1669-overhaul-packages/readme-audit.md index 48154451d..9cb6308e7 100644 --- a/docs/issues/open/1669-overhaul-packages/readme-audit.md +++ b/docs/issues/open/1669-overhaul-packages/readme-audit.md @@ -24,10 +24,10 @@ tools. Generated manually on 2026-05-18 as part of SI-01 (baseline analysis). | Package directory | Crate name | Lines | Rating | Notes | | --------------------------------- | ------------------------------------------------- | ----- | ------- | ------------------------------------------------------------ | -| `axum-health-check-api-server` | `torrust-axum-health-check-api-server` | 49 | minimal | Has purpose and port info; no usage examples | -| `axum-http-tracker-server` | `torrust-axum-http-tracker-server` | 11 | stub | Template only | -| `axum-rest-tracker-api-server` | `torrust-axum-rest-tracker-api-server` | 11 | stub | Template only | -| `axum-server` | `torrust-axum-server` | 11 | stub | Template only | +| `axum-health-check-api-server` | `torrust-tracker-axum-health-check-api-server` | 49 | minimal | Has purpose and port info; no usage examples | +| `axum-http-tracker-server` | `torrust-tracker-axum-http-server` | 11 | stub | Template only | +| `axum-rest-tracker-api-server` | `torrust-tracker-axum-rest-api-server` | 11 | stub | Template only | +| `axum-server` | `torrust-tracker-axum-server` | 11 | stub | Template only | | `clock` | `torrust-tracker-clock` | 11 | stub | Template only | | `configuration` | `torrust-tracker-configuration` | 11 | stub | Template only | | `events` | `torrust-tracker-events` | 11 | stub | Template only | @@ -37,8 +37,8 @@ tools. Generated manually on 2026-05-18 as part of SI-01 (baseline analysis). | `metrics` | `torrust-tracker-metrics` | 210 | good | Comprehensive — overview, types, usage, examples | | `peer-id` | `bittorrent-peer-id` | 38 | minimal | Origin story + maintenance note; no usage examples | | `primitives` | `torrust-tracker-primitives` | 11 | stub | Template only | -| `rest-tracker-api-client` | `torrust-rest-tracker-api-client` | 23 | minimal | Has license section; no usage examples | -| `rest-tracker-api-core` | `torrust-rest-tracker-api-core` | 11 | stub | **Wrong title** — says "BitTorrent UDP Tracker Core library" | +| `rest-tracker-api-client` | `torrust-tracker-rest-api-client` | 23 | minimal | Has license section; no usage examples | +| `rest-tracker-api-core` | `torrust-tracker-rest-api-core` | 11 | stub | **Wrong title** — says "BitTorrent UDP Tracker Core library" | | `server-lib` | `torrust-server-lib` | 11 | stub | Template only | | `swarm-coordination-registry` | `torrust-tracker-swarm-coordination-registry` | 22 | minimal | **Wrong title** — says "Torrust Tracker Torrent Repository" | | `test-helpers` | `torrust-tracker-test-helpers` | 11 | stub | **Wrong title** — says "Torrust Tracker Configuration" | @@ -47,7 +47,7 @@ tools. Generated manually on 2026-05-18 as part of SI-01 (baseline analysis). | `tracker-core` | `bittorrent-tracker-core` | 39 | minimal | Has purpose and context; no usage examples | | `udp-protocol` | `bittorrent-udp-tracker-protocol` | 38 | minimal | Has purpose section; no usage examples | | `udp-tracker-core` | `bittorrent-udp-tracker-core` | 15 | minimal | Explains when to use; minimal depth | -| `udp-tracker-server` | `torrust-udp-tracker-server` | 11 | stub | Template only | +| `udp-tracker-server` | `torrust-tracker-udp-server` | 11 | stub | Template only | ## Console tools (`console/`) diff --git a/docs/issues/open/1669-overhaul-packages/workspace-coupling-report.md b/docs/issues/open/1669-overhaul-packages/workspace-coupling-report.md index c02a27b97..46191fb7f 100644 --- a/docs/issues/open/1669-overhaul-packages/workspace-coupling-report.md +++ b/docs/issues/open/1669-overhaul-packages/workspace-coupling-report.md @@ -40,7 +40,7 @@ These packages are leaves (no workspace dep) and are prime extraction candidates - `bittorrent-peer-id` - `torrust-net-primitives` -- `torrust-rest-tracker-api-client` +- `torrust-tracker-rest-api-client` - `torrust-tracker-clock` - `torrust-tracker-contrib-bencode` - `torrust-tracker-events` @@ -259,9 +259,9 @@ Workspace deps: 9 - `torrust_tracker_swarm_coordination_registry::event::receiver` - `torrust_tracker_swarm_coordination_registry::statistics::event` -#### `torrust-rest-tracker-api-client` [dev] +#### `torrust-tracker-rest-api-client` [dev] -_No `torrust_rest_tracker_api_client::` references found in source — may be used only in `Cargo.toml` feature flags or `build.rs`._ +_No `torrust_tracker_rest_api_client::` references found in source — may be used only in `Cargo.toml` feature flags or `build.rs`._ #### `torrust-tracker-test-helpers` [dev] @@ -361,13 +361,13 @@ Workspace deps: 1 _Items not extracted — dependency used without a direct `use` path (macro, re-export, or glob import)._ -### `torrust-axum-health-check-api-server` +### `torrust-tracker-axum-health-check-api-server` Workspace deps: 10 -#### `torrust-axum-server` [normal] +#### `torrust-tracker-axum-server` [normal] -- `torrust_axum_server::signals::graceful_shutdown` +- `torrust_tracker_axum_server::signals::graceful_shutdown` #### `torrust-net-primitives` [normal] @@ -385,18 +385,18 @@ Workspace deps: 10 - `torrust_tracker_configuration::HealthCheckApi` -#### `torrust-axum-health-check-api-server` [dev] +#### `torrust-tracker-axum-health-check-api-server` [dev] -- `torrust_axum_health_check_api_server::environment::Started` -- `torrust_axum_health_check_api_server::resources` +- `torrust_tracker_axum_health_check_api_server::environment::Started` +- `torrust_tracker_axum_health_check_api_server::resources` -#### `torrust-axum-http-tracker-server` [dev] +#### `torrust-tracker-axum-http-server` [dev] -- `torrust_axum_http_tracker_server::environment::Started` +- `torrust_tracker_axum_http_server::environment::Started` -#### `torrust-axum-rest-tracker-api-server` [dev] +#### `torrust-tracker-axum-rest-api-server` [dev] -- `torrust_axum_rest_tracker_api_server::environment::Started` +- `torrust_tracker_axum_rest_api_server::environment::Started` #### `torrust-tracker-clock` [dev] @@ -406,11 +406,11 @@ Workspace deps: 10 _Items not extracted — dependency used without a direct `use` path (macro, re-export, or glob import)._ -#### `torrust-udp-tracker-server` [dev] +#### `torrust-tracker-udp-server` [dev] -- `torrust_udp_tracker_server::environment::Started` +- `torrust_tracker_udp_server::environment::Started` -### `torrust-axum-http-tracker-server` +### `torrust-tracker-axum-http-server` Workspace deps: 14 @@ -451,11 +451,11 @@ Workspace deps: 14 - `bittorrent_udp_tracker_protocol::PeerId` -#### `torrust-axum-server` [normal] +#### `torrust-tracker-axum-server` [normal] -- `torrust_axum_server::custom_axum_server` -- `torrust_axum_server::signals::graceful_shutdown` -- `torrust_axum_server::tsl::make_rust_tls` +- `torrust_tracker_axum_server::custom_axum_server` +- `torrust_tracker_axum_server::signals::graceful_shutdown` +- `torrust_tracker_axum_server::tsl::make_rust_tls` #### `torrust-net-primitives` [normal] @@ -509,7 +509,7 @@ _No `torrust_tracker_events::` references found in source — may be used only i - `torrust_tracker_test_helpers::configuration::ephemeral_public` - `torrust_tracker_test_helpers::logging::logs_contains_a_line_with` -### `torrust-axum-rest-tracker-api-server` +### `torrust-tracker-axum-rest-api-server` Workspace deps: 16 @@ -538,28 +538,28 @@ Workspace deps: 16 - `bittorrent_udp_tracker_core::services::banning` - `bittorrent_udp_tracker_core::statistics::repository` -#### `torrust-axum-server` [normal] +#### `torrust-tracker-axum-server` [normal] -- `torrust_axum_server::custom_axum_server` -- `torrust_axum_server::signals::graceful_shutdown` -- `torrust_axum_server::tsl::make_rust_tls` +- `torrust_tracker_axum_server::custom_axum_server` +- `torrust_tracker_axum_server::signals::graceful_shutdown` +- `torrust_tracker_axum_server::tsl::make_rust_tls` #### `torrust-net-primitives` [normal] - `torrust_net_primitives::service_binding` -#### `torrust-rest-tracker-api-client` [normal] +#### `torrust-tracker-rest-api-client` [normal] -- `torrust_rest_tracker_api_client::common::http` -- `torrust_rest_tracker_api_client::connection_info` -- `torrust_rest_tracker_api_client::connection_info::ConnectionInfo` -- `torrust_rest_tracker_api_client::v1::client` +- `torrust_tracker_rest_api_client::common::http` +- `torrust_tracker_rest_api_client::connection_info` +- `torrust_tracker_rest_api_client::connection_info::ConnectionInfo` +- `torrust_tracker_rest_api_client::v1::client` -#### `torrust-rest-tracker-api-core` [normal] +#### `torrust-tracker-rest-api-core` [normal] -- `torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer` -- `torrust_rest_tracker_api_core::statistics::metrics` -- `torrust_rest_tracker_api_core::statistics::services` +- `torrust_tracker_rest_api_core::container::TrackerHttpApiCoreContainer` +- `torrust_tracker_rest_api_core::statistics::metrics` +- `torrust_tracker_rest_api_core::statistics::services` #### `torrust-server-lib` [normal] @@ -600,24 +600,24 @@ Workspace deps: 16 - `torrust_tracker_swarm_coordination_registry::container::SwarmCoordinationRegistryContainer` - `torrust_tracker_swarm_coordination_registry::statistics::repository` -#### `torrust-udp-tracker-server` [normal] +#### `torrust-tracker-udp-server` [normal] -- `torrust_udp_tracker_server::container::UdpTrackerServerContainer` -- `torrust_udp_tracker_server::statistics::repository` +- `torrust_tracker_udp_server::container::UdpTrackerServerContainer` +- `torrust_tracker_udp_server::statistics::repository` -#### `torrust-rest-tracker-api-client` [dev] +#### `torrust-tracker-rest-api-client` [dev] -- `torrust_rest_tracker_api_client::common::http` -- `torrust_rest_tracker_api_client::connection_info` -- `torrust_rest_tracker_api_client::connection_info::ConnectionInfo` -- `torrust_rest_tracker_api_client::v1::client` +- `torrust_tracker_rest_api_client::common::http` +- `torrust_tracker_rest_api_client::connection_info` +- `torrust_tracker_rest_api_client::connection_info::ConnectionInfo` +- `torrust_tracker_rest_api_client::v1::client` #### `torrust-tracker-test-helpers` [dev] - `torrust_tracker_test_helpers::configuration::ephemeral_public` - `torrust_tracker_test_helpers::logging::logs_contains_a_line_with` -### `torrust-axum-server` +### `torrust-tracker-axum-server` Workspace deps: 3 @@ -633,7 +633,7 @@ Workspace deps: 3 _Items not extracted — dependency used without a direct `use` path (macro, re-export, or glob import)._ -### `torrust-rest-tracker-api-core` +### `torrust-tracker-rest-api-core` Workspace deps: 10 @@ -675,11 +675,11 @@ Workspace deps: 10 - `torrust_tracker_swarm_coordination_registry::container::SwarmCoordinationRegistryContainer` - `torrust_tracker_swarm_coordination_registry::statistics::repository` -#### `torrust-udp-tracker-server` [normal] +#### `torrust-tracker-udp-server` [normal] -- `torrust_udp_tracker_server::container::UdpTrackerServerContainer` -- `torrust_udp_tracker_server::statistics` -- `torrust_udp_tracker_server::statistics::repository` +- `torrust_tracker_udp_server::container::UdpTrackerServerContainer` +- `torrust_tracker_udp_server::statistics` +- `torrust_tracker_udp_server::statistics::repository` #### `torrust-tracker-events` [dev] @@ -723,37 +723,37 @@ Workspace deps: 16 - `bittorrent_udp_tracker_core::initialize_static` - `bittorrent_udp_tracker_core::statistics::event` -#### `torrust-axum-health-check-api-server` [normal] +#### `torrust-tracker-axum-health-check-api-server` [normal] -- `torrust_axum_health_check_api_server::HEALTH_CHECK_API_LOG_TARGET` +- `torrust_tracker_axum_health_check_api_server::HEALTH_CHECK_API_LOG_TARGET` -#### `torrust-axum-http-tracker-server` [normal] +#### `torrust-tracker-axum-http-server` [normal] -- `torrust_axum_http_tracker_server::HTTP_TRACKER_LOG_TARGET` -- `torrust_axum_http_tracker_server::Version` -- `torrust_axum_http_tracker_server::Version::V1` -- `torrust_axum_http_tracker_server::server` +- `torrust_tracker_axum_http_server::HTTP_TRACKER_LOG_TARGET` +- `torrust_tracker_axum_http_server::Version` +- `torrust_tracker_axum_http_server::Version::V1` +- `torrust_tracker_axum_http_server::server` -#### `torrust-axum-rest-tracker-api-server` [normal] +#### `torrust-tracker-axum-rest-api-server` [normal] -- `torrust_axum_rest_tracker_api_server::Version` -- `torrust_axum_rest_tracker_api_server::Version::V1` -- `torrust_axum_rest_tracker_api_server::server` -- `torrust_axum_rest_tracker_api_server::v1::context` +- `torrust_tracker_axum_rest_api_server::Version` +- `torrust_tracker_axum_rest_api_server::Version::V1` +- `torrust_tracker_axum_rest_api_server::server` +- `torrust_tracker_axum_rest_api_server::v1::context` -#### `torrust-axum-server` [normal] +#### `torrust-tracker-axum-server` [normal] -- `torrust_axum_server::tsl::make_rust_tls` +- `torrust_tracker_axum_server::tsl::make_rust_tls` -#### `torrust-rest-tracker-api-client` [normal] +#### `torrust-tracker-rest-api-client` [normal] -- `torrust_rest_tracker_api_client::connection_info` -- `torrust_rest_tracker_api_client::v1::Client` -- `torrust_rest_tracker_api_client::v1::client` +- `torrust_tracker_rest_api_client::connection_info` +- `torrust_tracker_rest_api_client::v1::Client` +- `torrust_tracker_rest_api_client::v1::client` -#### `torrust-rest-tracker-api-core` [normal] +#### `torrust-tracker-rest-api-core` [normal] -- `torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer` +- `torrust_tracker_rest_api_core::container::TrackerHttpApiCoreContainer` #### `torrust-server-lib` [normal] @@ -783,13 +783,13 @@ Workspace deps: 16 - `torrust_tracker_swarm_coordination_registry::statistics::activity_metrics_updater` - `torrust_tracker_swarm_coordination_registry::statistics::event` -#### `torrust-udp-tracker-server` [normal] +#### `torrust-tracker-udp-server` [normal] -- `torrust_udp_tracker_server::banning::event` -- `torrust_udp_tracker_server::container::UdpTrackerServerContainer` -- `torrust_udp_tracker_server::server::Server` -- `torrust_udp_tracker_server::server::spawner` -- `torrust_udp_tracker_server::statistics::event` +- `torrust_tracker_udp_server::banning::event` +- `torrust_tracker_udp_server::container::UdpTrackerServerContainer` +- `torrust_tracker_udp_server::server::Server` +- `torrust_tracker_udp_server::server::spawner` +- `torrust_tracker_udp_server::statistics::event` #### `bittorrent-tracker-client` [dev] @@ -948,7 +948,7 @@ Workspace deps: 3 - `torrust_tracker_primitives::swarm_metadata::AggregateActiveSwarmMetadata` - `torrust_tracker_primitives::swarm_metadata::SwarmMetadata` -### `torrust-udp-tracker-server` +### `torrust-tracker-udp-server` Workspace deps: 13 diff --git a/docs/issues/open/1726-reduce-build-times-sccache/benchmark-results.md b/docs/issues/open/1726-reduce-build-times-sccache/benchmark-results.md index a2b5efb65..21d7df7e6 100644 --- a/docs/issues/open/1726-reduce-build-times-sccache/benchmark-results.md +++ b/docs/issues/open/1726-reduce-build-times-sccache/benchmark-results.md @@ -44,13 +44,13 @@ Machine: local dev (clean workspace) | Rank | Execution time | Binary / suite | | ---- | -------------- | --------------------------------------------------------------------------------- | -| 1 | **5.04 s** | `tests/integration.rs` — `torrust_udp_tracker_server` (6 tests) | +| 1 | **5.04 s** | `tests/integration.rs` — `torrust_tracker_udp_server` (6 tests) | | 2 | **3.21 s** | `unittests src/lib.rs` — `torrust_tracker_swarm_coordination_registry` (95 tests) | -| 3 | **2.08 s** | `unittests src/lib.rs` — `torrust_udp_tracker_server` (122 tests) | -| 4 | **2.05 s** | `tests/integration.rs` — `torrust_axum_health_check_api_server` (7 tests) | -| 5 | **0.36 s** | `tests/integration.rs` — `torrust_axum_rest_tracker_api_server` (53 tests) | +| 3 | **2.08 s** | `unittests src/lib.rs` — `torrust_tracker_udp_server` (122 tests) | +| 4 | **2.05 s** | `tests/integration.rs` — `torrust_tracker_axum_health_check_api_server` (7 tests) | +| 5 | **0.36 s** | `tests/integration.rs` — `torrust_tracker_axum_rest_api_server` (53 tests) | | 6 | **0.23 s** | `tests/integration.rs` — `bittorrent_tracker_core` (5 tests) | -| 7 | **0.21 s** | `tests/integration.rs` — `torrust_axum_http_tracker_server` (52 tests) | +| 7 | **0.21 s** | `tests/integration.rs` — `torrust_tracker_axum_http_server` (52 tests) | | … | ≤ 0.10 s | all remaining binaries | Top 4 binaries account for **12.38 s** out of **13.60 s** total execution time (~91 %). @@ -73,13 +73,13 @@ can be parallelised past them. | Rank | Max single unit | Sum (all units) | # units | Crate | | ---- | --------------- | --------------- | ------- | ------------------------------------------------- | | 1 | 77.19 s | 606.43 s | 13 | `torrust-tracker` (workspace root) | -| 2 | 67.46 s | 83.09 s | 3 | `torrust-axum-health-check-api-server` | +| 2 | 67.46 s | 83.09 s | 3 | `torrust-tracker-axum-health-check-api-server` | | 3 | 62.94 s | 182.15 s | 5 | `bittorrent-tracker-core` | | 4 | 60.87 s | 96.73 s | 4 | `torrust-tracker-torrent-repository-benchmarking` | -| 5 | 59.04 s | 116.97 s | 3 | `torrust-axum-rest-tracker-api-server` | -| 6 | 56.97 s | 116.96 s | 3 | `torrust-axum-http-tracker-server` | -| 7 | 50.02 s | 99.74 s | 3 | `torrust-udp-tracker-server` | -| 8 | 33.82 s | 34.21 s | 2 | `torrust-rest-tracker-api-core` | +| 5 | 59.04 s | 116.97 s | 3 | `torrust-tracker-axum-rest-api-server` | +| 6 | 56.97 s | 116.96 s | 3 | `torrust-tracker-axum-http-server` | +| 7 | 50.02 s | 99.74 s | 3 | `torrust-tracker-udp-server` | +| 8 | 33.82 s | 34.21 s | 2 | `torrust-tracker-rest-api-core` | | 9 | 31.01 s | 60.37 s | 3 | `bittorrent-http-tracker-core` | | 10 | 28.50 s | 48.40 s | 3 | `bittorrent-udp-tracker-core` | | 11 | 21.01 s | 22.01 s | 3 | `aws-lc-sys` (external C build) | @@ -91,7 +91,7 @@ can be parallelised past them. | 17 | 12.71 s | 14.19 s | 2 | `torrust-tracker-swarm-coordination-registry` | | 18 | 12.27 s | 46.54 s | 5 | `torrust-tracker-client` | | 19 | 12.08 s | 13.23 s | 2 | `torrust-tracker-metrics` | -| 20 | 9.85 s | 10.18 s | 2 | `torrust-axum-server` | +| 20 | 9.85 s | 10.18 s | 2 | `torrust-tracker-axum-server` | ### Heaviest external/C dependencies diff --git a/docs/issues/open/1805-fix-workspace-coupling-report-for-brace-and-reexport-imports.md b/docs/issues/open/1805-fix-workspace-coupling-report-for-brace-and-reexport-imports.md index 44bd78954..eaa6a3b60 100644 --- a/docs/issues/open/1805-fix-workspace-coupling-report-for-brace-and-reexport-imports.md +++ b/docs/issues/open/1805-fix-workspace-coupling-report-for-brace-and-reexport-imports.md @@ -60,7 +60,7 @@ clear, direct `use` statements: | `bittorrent-http-tracker-protocol` | `torrust-tracker-located-error` | `use crate::{Located, LocatedError}` | | `bittorrent-udp-tracker-core` | `torrust-tracker-configuration` | `use crate::{Core, UdpTracker}` | | `bittorrent-udp-tracker-protocol` | `bittorrent-peer-id` | `pub use bittorrent_peer_id::{PeerClient, PeerId}` | -| `torrust-axum-server` | `torrust-tracker-located-error` | `use crate::{DynError, LocatedError}` | +| `torrust-tracker-axum-server` | `torrust-tracker-located-error` | `use crate::{DynError, LocatedError}` | | `torrust-tracker-primitives` | `bittorrent-peer-id` | `pub use bittorrent_peer_id::{…}` | Patching the regex for the known patterns (braces, re-exports) would fix the current failures diff --git a/docs/issues/drafts/1669-07-align-torrust-prefix-rename-tracker-specific-packages.md b/docs/issues/open/1816-1669-07-align-torrust-prefix-rename-tracker-specific-packages.md similarity index 55% rename from docs/issues/drafts/1669-07-align-torrust-prefix-rename-tracker-specific-packages.md rename to docs/issues/open/1816-1669-07-align-torrust-prefix-rename-tracker-specific-packages.md index 2cda587dd..305baa1e1 100644 --- a/docs/issues/drafts/1669-07-align-torrust-prefix-rename-tracker-specific-packages.md +++ b/docs/issues/open/1816-1669-07-align-torrust-prefix-rename-tracker-specific-packages.md @@ -1,13 +1,13 @@ --- doc-type: issue issue-type: task -status: draft +status: open priority: p2 -github-issue: null -spec-path: docs/issues/drafts/1669-07-align-torrust-prefix-rename-tracker-specific-packages.md -branch: null +github-issue: 1816 +spec-path: docs/issues/open/1816-1669-07-align-torrust-prefix-rename-tracker-specific-packages.md +branch: 1816-1669-07-align-torrust-prefix-rename-tracker-specific-packages related-pr: null -last-updated-utc: 2026-05-15 12:00 +last-updated-utc: 2026-05-20 00:00 semantic-links: skill-links: - create-issue @@ -20,7 +20,7 @@ semantic-links: -# Issue #[To be assigned] - Align `torrust-` prefix: rename tracker-specific packages to `torrust-tracker-` +# Issue #1816 - Align `torrust-` prefix: rename tracker-specific packages to `torrust-tracker-` ## Goal @@ -41,15 +41,15 @@ The workspace currently has three crate-name prefixes: Seven crates carry the `torrust-` prefix but belong in the `torrust-tracker-` group: -| Current crate name | Why it is tracker-specific | -| -------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `torrust-axum-health-check-api-server` | Depends on `torrust-tracker-configuration` and `torrust-tracker-primitives` | -| `torrust-axum-http-tracker-server` | Implements the BitTorrent HTTP tracker; depends on all tracker-core packages | -| `torrust-axum-rest-tracker-api-server` | Implements the tracker management REST API; deep tracker dependencies | -| `torrust-axum-server` | Axum wrapper configured via `torrust-tracker-configuration`; not generic | -| `torrust-rest-tracker-api-client` | HTTP client for this tracker's REST API; no torrust deps but implements tracker-specific API contract | -| `torrust-rest-tracker-api-core` | Core logic for tracker REST API; depends on all three tracker-core packages | -| `torrust-udp-tracker-server` | Implements the BitTorrent UDP tracker; deep tracker dependencies | +| Current crate name | Why it is tracker-specific | +| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `torrust-tracker-axum-health-check-api-server` | Depends on `torrust-tracker-configuration` and `torrust-tracker-primitives` | +| `torrust-tracker-axum-http-server` | Implements the BitTorrent HTTP tracker; depends on all tracker-core packages | +| `torrust-tracker-axum-rest-api-server` | Implements the tracker management REST API; deep tracker dependencies | +| `torrust-tracker-axum-server` | Axum wrapper configured via `torrust-tracker-configuration`; not generic | +| `torrust-tracker-rest-api-client` | HTTP client for this tracker's REST API; no torrust deps but implements tracker-specific API contract | +| `torrust-tracker-rest-api-core` | Core logic for tracker REST API; depends on all three tracker-core packages | +| `torrust-tracker-udp-server` | Implements the BitTorrent UDP tracker; deep tracker dependencies | **None of these crates are published on crates.io** (verified May 2026). The rename has no external consumers to migrate and does not require any crates.io handling. @@ -61,15 +61,15 @@ This issue is a subissue of EPIC #1669 (Overhaul: Packages). Where the old name contained a redundant middle `tracker` segment (already covered by the new prefix), that segment is removed to produce a shorter, cleaner name. -| Current name | Proposed new name | Rust identifier change | -| -------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------- | -| `torrust-axum-health-check-api-server` | `torrust-tracker-axum-health-check-api-server` | `torrust_axum_health_check_api_server` → `torrust_tracker_axum_health_check_api_server` | -| `torrust-axum-http-tracker-server` | `torrust-tracker-axum-http-server` | `torrust_axum_http_tracker_server` → `torrust_tracker_axum_http_server` | -| `torrust-axum-rest-tracker-api-server` | `torrust-tracker-axum-rest-api-server` | `torrust_axum_rest_tracker_api_server` → `torrust_tracker_axum_rest_api_server` | -| `torrust-axum-server` | `torrust-tracker-axum-server` | `torrust_axum_server` → `torrust_tracker_axum_server` | -| `torrust-rest-tracker-api-client` | `torrust-tracker-rest-api-client` | `torrust_rest_tracker_api_client` → `torrust_tracker_rest_api_client` | -| `torrust-rest-tracker-api-core` | `torrust-tracker-rest-api-core` | `torrust_rest_tracker_api_core` → `torrust_tracker_rest_api_core` | -| `torrust-udp-tracker-server` | `torrust-tracker-udp-server` | `torrust_udp_tracker_server` → `torrust_tracker_udp_server` | +| Current name | Proposed new name | Rust identifier change | +| ---------------------------------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `torrust-tracker-axum-health-check-api-server` | `torrust-tracker-axum-health-check-api-server` | `torrust_tracker_axum_health_check_api_server` → `torrust_tracker_axum_health_check_api_server` | +| `torrust-tracker-axum-http-server` | `torrust-tracker-axum-http-server` | `torrust_tracker_axum_http_server` → `torrust_tracker_axum_http_server` | +| `torrust-tracker-axum-rest-api-server` | `torrust-tracker-axum-rest-api-server` | `torrust_tracker_axum_rest_api_server` → `torrust_tracker_axum_rest_api_server` | +| `torrust-tracker-axum-server` | `torrust-tracker-axum-server` | `torrust_tracker_axum_server` → `torrust_tracker_axum_server` | +| `torrust-tracker-rest-api-client` | `torrust-tracker-rest-api-client` | `torrust_tracker_rest_api_client` → `torrust_tracker_rest_api_client` | +| `torrust-tracker-rest-api-core` | `torrust-tracker-rest-api-core` | `torrust_tracker_rest_api_core` → `torrust_tracker_rest_api_core` | +| `torrust-tracker-udp-server` | `torrust-tracker-udp-server` | `torrust_tracker_udp_server` → `torrust_tracker_udp_server` | ### Note on `torrust-server-lib` @@ -132,43 +132,43 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | ID | Status | Task | Notes / Expected Output | | --- | ------ | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| T1 | TODO | Rename `name` field in each of the 7 package `Cargo.toml` files | See proposed name mapping above | -| T2 | TODO | Update root `Cargo.toml` workspace dependency keys (7 entries) | Replace old key names with new key names; `path` values stay unchanged | -| T3 | TODO | Update dependency references in consumer `Cargo.toml` files (6 files) | See consumer file list below | -| T4 | TODO | Update Rust source `use` / path references (176 occurrences) | See identifier mapping in proposed name table; affects `src/`, `packages/`, `tests/` | -| T5 | TODO | Update prose in `packages/AGENTS.md`, `AGENTS.md`, `docs/packages.md`, and each package `README.md` | Crate names and any inline code snippets referencing old names | -| T6 | TODO | Run `cargo build --workspace` and `cargo test --workspace` | Clean build; all tests pass | -| T7 | TODO | Run `linter all` | Exit code `0` | -| T8 | TODO | Update EPIC #1669 `Package Inventory` and `Desired Package State` tables | Move 7 entries from `torrust-` table to `torrust-tracker-` table; drop `Renamed from` notes | +| T1 | DONE | Rename `name` field in each of the 7 package `Cargo.toml` files | See proposed name mapping above | +| T2 | DONE | Update root `Cargo.toml` workspace dependency keys (7 entries) | Replace old key names with new key names; `path` values stay unchanged | +| T3 | DONE | Update dependency references in consumer `Cargo.toml` files (6 files) | See consumer file list below | +| T4 | DONE | Update Rust source `use` / path references (176 occurrences) | See identifier mapping in proposed name table; affects `src/`, `packages/`, `tests/` | +| T5 | DONE | Update prose in `packages/AGENTS.md`, `AGENTS.md`, `docs/packages.md`, and each package `README.md` | Crate names and any inline code snippets referencing old names | +| T6 | DONE | Run `cargo build --workspace` and `cargo test --workspace` | Clean build; all tests pass | +| T7 | DONE | Run `linter all` | Exit code `0` | +| T8 | DONE | Update EPIC #1669 `Package Inventory` and `Desired Package State` tables | Move 7 entries from `torrust-` table to `torrust-tracker-` table; drop `Renamed from` notes | **Consumer `Cargo.toml` files to update in T3** (6 files; some also appear in T1): - `Cargo.toml` (root — workspace dependencies section) -- `packages/axum-health-check-api-server/Cargo.toml` — references `torrust-axum-server` - (dep); `torrust-axum-health-check-api-server` (self, dev-dep), - `torrust-axum-http-tracker-server`, `torrust-axum-rest-tracker-api-server`, - `torrust-udp-tracker-server` (dev-deps) -- `packages/axum-http-tracker-server/Cargo.toml` — references `torrust-axum-server` -- `packages/axum-rest-tracker-api-server/Cargo.toml` — references `torrust-axum-server`, - `torrust-rest-tracker-api-client`, `torrust-rest-tracker-api-core`, - `torrust-udp-tracker-server` (deps + dev-deps) -- `packages/rest-tracker-api-core/Cargo.toml` — references `torrust-udp-tracker-server` -- `packages/tracker-core/Cargo.toml` — references `torrust-rest-tracker-api-client` +- `packages/axum-health-check-api-server/Cargo.toml` — references `torrust-tracker-axum-server` + (dep); `torrust-tracker-axum-health-check-api-server` (self, dev-dep), + `torrust-tracker-axum-http-server`, `torrust-tracker-axum-rest-api-server`, + `torrust-tracker-udp-server` (dev-deps) +- `packages/axum-http-tracker-server/Cargo.toml` — references `torrust-tracker-axum-server` +- `packages/axum-rest-tracker-api-server/Cargo.toml` — references `torrust-tracker-axum-server`, + `torrust-tracker-rest-api-client`, `torrust-tracker-rest-api-core`, + `torrust-tracker-udp-server` (deps + dev-deps) +- `packages/rest-tracker-api-core/Cargo.toml` — references `torrust-tracker-udp-server` +- `packages/tracker-core/Cargo.toml` — references `torrust-tracker-rest-api-client` ## Progress Tracking ### Workflow Checkpoints -- [ ] Spec drafted in `docs/issues/drafts/` +- [x] Spec drafted in `docs/issues/drafts/` - [x] Open Question on `torrust-server-lib` resolved; decision recorded in spec -- [ ] Spec reviewed and approved by user/maintainer -- [ ] GitHub issue created and issue number added to this spec -- [ ] Spec moved to `docs/issues/open/` with issue number prefix -- [ ] Implementation completed -- [ ] Automatic verification completed (`linter all`, `cargo test --workspace`) +- [x] Spec reviewed and approved by user/maintainer +- [x] GitHub issue created and issue number added to this spec +- [x] Spec moved to `docs/issues/open/` with issue number prefix +- [x] Implementation completed +- [x] Automatic verification completed (`linter all`, `cargo test --workspace`) - [ ] Manual verification scenarios executed and recorded - [ ] Acceptance criteria reviewed after implementation and updated with evidence -- [ ] EPIC #1669 Active Subissues table updated to `DONE` +- [x] EPIC #1669 Active Subissues table updated to `DONE` - [ ] Issue closed and spec moved to `docs/issues/closed/` ### Progress Log @@ -176,17 +176,27 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. - 2026-05-15 12:00 UTC - josecelano - Spec drafted as subissue of EPIC #1669; all 7 packages confirmed unpublished on crates.io (no external migration required). `torrust-server-lib` excluded (Option B decision). +- 2026-05-20 00:00 UTC - josecelano - GitHub issue #1816 created; spec moved to + `docs/issues/open/` with issue number prefix. SI-05 confirmed done: `server-lib` now + depends on `torrust-net-primitives` (not `torrust-tracker-primitives`), validating the + Option B exclusion decision. +- 2026-05-20 18:00 UTC - josecelano - Implementation complete. T1–T5 applied via sed across + workspace (all 7 packages renamed in Cargo.toml name fields, workspace deps, consumer deps, + Rust source identifiers, and prose). Fixed rand version constraint in udp-tracker-server and + axum-http-tracker-server (rand = "0" → rand = "0.9") to resolve resolution regression caused + by Cargo.lock regeneration after rename. T6: `cargo test --tests --workspace --all-targets +--all-features` passes. T7: `linter all` exits 0. T8: EPIC tables updated. ## Acceptance Criteria -- [ ] No `Cargo.toml` in the workspace declares any of the 7 old crate names. -- [ ] No Rust source file in the workspace uses any of the 7 old Rust identifiers. -- [ ] `cargo build --workspace` succeeds with zero errors. -- [ ] `cargo test --workspace` passes with zero failures. -- [ ] `linter all` exits with code `0`. -- [ ] `packages/AGENTS.md`, `AGENTS.md`, `docs/packages.md`, and each renamed package's `README.md` reflect the +- [x] No `Cargo.toml` in the workspace declares any of the 7 old crate names. +- [x] No Rust source file in the workspace uses any of the 7 old Rust identifiers. +- [x] `cargo build --workspace` succeeds with zero errors. +- [x] `cargo test --workspace` passes with zero failures. +- [x] `linter all` exits with code `0`. +- [x] `packages/AGENTS.md`, `AGENTS.md`, `docs/packages.md`, and each renamed package's `README.md` reflect the new crate names. -- [ ] EPIC #1669 `Package Inventory` and `Desired Package State` tables are updated. +- [x] EPIC #1669 `Package Inventory` and `Desired Package State` tables are updated. ## Verification Plan @@ -202,7 +212,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. Status values: `TODO`, `IN_PROGRESS`, `DONE`, `FAILED`, `BLOCKED`. -| ID | Scenario | Command/Steps | Expected Result | Status | Evidence | -| --- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------ | -------- | -| M1 | No stale references to old names in TOML | `grep -r "torrust-axum-health-check\|torrust-axum-http-tracker\|torrust-axum-rest-tracker\|torrust-axum-server\b\|torrust-rest-tracker-api\|torrust-udp-tracker-server" . --include="*.toml"` | Zero matches (except own `name =` fields before rename, which should be gone) | TODO | | -| M2 | No stale identifiers in Rust source | `grep -r "torrust_axum_http_tracker_server\|torrust_axum_rest_tracker_api_server\|torrust_rest_tracker_api\|torrust_udp_tracker_server\b" . --include="*.rs"` | Zero matches | TODO | | +| ID | Scenario | Command/Steps | Expected Result | Status | Evidence | +| --- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------ | -------- | +| M1 | No stale references to old names in TOML | `grep -r "torrust-axum-health-check\|torrust-axum-http-tracker\|torrust-axum-rest-tracker\|torrust-tracker-axum-server\b\|torrust-rest-tracker-api\|torrust-tracker-udp-server" . --include="*.toml"` | Zero matches (except own `name =` fields before rename, which should be gone) | TODO | | +| M2 | No stale identifiers in Rust source | `grep -r "torrust_tracker_axum_http_server\|torrust_tracker_axum_rest_api_server\|torrust_rest_tracker_api\|torrust_tracker_udp_server\b" . --include="*.rs"` | Zero matches | TODO | | diff --git a/packages/axum-health-check-api-server/Cargo.toml b/packages/axum-health-check-api-server/Cargo.toml index eb4aabc79..c1c7cb608 100644 --- a/packages/axum-health-check-api-server/Cargo.toml +++ b/packages/axum-health-check-api-server/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true homepage.workspace = true keywords = [ "axum", "bittorrent", "healthcheck", "http", "server", "torrust", "tracker" ] license.workspace = true -name = "torrust-axum-health-check-api-server" +name = "torrust-tracker-axum-health-check-api-server" publish.workspace = true readme = "README.md" repository.workspace = true @@ -21,7 +21,7 @@ hyper = "1" serde = { version = "1", features = [ "derive" ] } serde_json = { version = "1", features = [ "preserve_order" ] } tokio = { version = "1", features = [ "macros", "net", "rt-multi-thread", "signal", "sync" ] } -torrust-axum-server = { version = "3.0.0-develop", path = "../axum-server" } +torrust-tracker-axum-server = { version = "3.0.0-develop", path = "../axum-server" } torrust-server-lib = { version = "3.0.0-develop", path = "../server-lib" } torrust-tracker-configuration = { version = "3.0.0-develop", path = "../configuration" } torrust-net-primitives = { version = "3.0.0-develop", path = "../net-primitives" } @@ -31,9 +31,9 @@ url = "2.5.4" [dev-dependencies] reqwest = { version = "0", features = [ "json" ] } -torrust-axum-health-check-api-server = { version = "3.0.0-develop", path = "../axum-health-check-api-server" } -torrust-axum-http-tracker-server = { version = "3.0.0-develop", path = "../axum-http-tracker-server" } -torrust-axum-rest-tracker-api-server = { version = "3.0.0-develop", path = "../axum-rest-tracker-api-server" } +torrust-tracker-axum-health-check-api-server = { version = "3.0.0-develop", path = "../axum-health-check-api-server" } +torrust-tracker-axum-http-server = { version = "3.0.0-develop", path = "../axum-http-tracker-server" } +torrust-tracker-axum-rest-api-server = { version = "3.0.0-develop", path = "../axum-rest-tracker-api-server" } torrust-tracker-clock = { version = "3.0.0-develop", path = "../clock" } torrust-tracker-test-helpers = { version = "3.0.0-develop", path = "../test-helpers" } -torrust-udp-tracker-server = { version = "3.0.0-develop", path = "../udp-tracker-server" } +torrust-tracker-udp-server = { version = "3.0.0-develop", path = "../udp-tracker-server" } diff --git a/packages/axum-health-check-api-server/README.md b/packages/axum-health-check-api-server/README.md index d4c6b4f0b..665db8308 100644 --- a/packages/axum-health-check-api-server/README.md +++ b/packages/axum-health-check-api-server/README.md @@ -42,7 +42,7 @@ Example response: ## Documentation -[Crate documentation](https://docs.rs/torrust-axum-health-check-api-server). +[Crate documentation](https://docs.rs/torrust-tracker-axum-health-check-api-server). ## License diff --git a/packages/axum-health-check-api-server/src/server.rs b/packages/axum-health-check-api-server/src/server.rs index 1fccdb6d1..47a1a2710 100644 --- a/packages/axum-health-check-api-server/src/server.rs +++ b/packages/axum-health-check-api-server/src/server.rs @@ -14,11 +14,11 @@ use futures::Future; use hyper::Request; use serde_json::json; use tokio::sync::oneshot::{Receiver, Sender}; -use torrust_axum_server::signals::graceful_shutdown; use torrust_net_primitives::service_binding::{Protocol, ServiceBinding}; use torrust_server_lib::logging::Latency; use torrust_server_lib::registar::ServiceRegistry; use torrust_server_lib::signals::{Halted, Started}; +use torrust_tracker_axum_server::signals::graceful_shutdown; use tower_http::LatencyUnit; use tower_http::classify::ServerErrorsFailureClass; use tower_http::compression::CompressionLayer; diff --git a/packages/axum-health-check-api-server/tests/server/contract.rs b/packages/axum-health-check-api-server/tests/server/contract.rs index af1c0cff9..f6195b758 100644 --- a/packages/axum-health-check-api-server/tests/server/contract.rs +++ b/packages/axum-health-check-api-server/tests/server/contract.rs @@ -1,6 +1,6 @@ -use torrust_axum_health_check_api_server::environment::Started; -use torrust_axum_health_check_api_server::resources::{Report, Status}; use torrust_server_lib::registar::Registar; +use torrust_tracker_axum_health_check_api_server::environment::Started; +use torrust_tracker_axum_health_check_api_server::resources::{Report, Status}; use torrust_tracker_test_helpers::{configuration, logging}; use crate::server::client::get; @@ -31,8 +31,8 @@ async fn health_check_endpoint_should_return_status_ok_when_there_is_no_services mod api { use std::sync::Arc; - use torrust_axum_health_check_api_server::environment::Started; - use torrust_axum_health_check_api_server::resources::{Report, Status}; + use torrust_tracker_axum_health_check_api_server::environment::Started; + use torrust_tracker_axum_health_check_api_server::resources::{Report, Status}; use torrust_tracker_test_helpers::{configuration, logging}; use crate::server::client::get; @@ -43,7 +43,7 @@ mod api { let configuration = Arc::new(configuration::ephemeral()); - let service = torrust_axum_rest_tracker_api_server::environment::Started::new(&configuration).await; + let service = torrust_tracker_axum_rest_api_server::environment::Started::new(&configuration).await; let registar = service.registar.clone(); @@ -90,7 +90,7 @@ mod api { let configuration = Arc::new(configuration::ephemeral()); - let service = torrust_axum_rest_tracker_api_server::environment::Started::new(&configuration).await; + let service = torrust_tracker_axum_rest_api_server::environment::Started::new(&configuration).await; let binding = service.bind_address(); @@ -136,8 +136,8 @@ mod api { mod http { use std::sync::Arc; - use torrust_axum_health_check_api_server::environment::Started; - use torrust_axum_health_check_api_server::resources::{Report, Status}; + use torrust_tracker_axum_health_check_api_server::environment::Started; + use torrust_tracker_axum_health_check_api_server::resources::{Report, Status}; use torrust_tracker_test_helpers::{configuration, logging}; use crate::server::client::get; @@ -148,7 +148,7 @@ mod http { let configuration = Arc::new(configuration::ephemeral()); - let service = torrust_axum_http_tracker_server::environment::Started::new(&configuration).await; + let service = torrust_tracker_axum_http_server::environment::Started::new(&configuration).await; let registar = service.registar.clone(); @@ -194,7 +194,7 @@ mod http { let configuration = Arc::new(configuration::ephemeral()); - let service = torrust_axum_http_tracker_server::environment::Started::new(&configuration).await; + let service = torrust_tracker_axum_http_server::environment::Started::new(&configuration).await; let binding = *service.bind_address(); @@ -243,8 +243,8 @@ mod http { mod udp { use std::sync::Arc; - use torrust_axum_health_check_api_server::environment::Started; - use torrust_axum_health_check_api_server::resources::{Report, Status}; + use torrust_tracker_axum_health_check_api_server::environment::Started; + use torrust_tracker_axum_health_check_api_server::resources::{Report, Status}; use torrust_tracker_test_helpers::{configuration, logging}; use crate::server::client::get; @@ -255,7 +255,7 @@ mod udp { let configuration = Arc::new(configuration::ephemeral()); - let service = torrust_udp_tracker_server::environment::Started::new(&configuration).await; + let service = torrust_tracker_udp_server::environment::Started::new(&configuration).await; let registar = service.registar.clone(); @@ -298,7 +298,7 @@ mod udp { let configuration = Arc::new(configuration::ephemeral()); - let service = torrust_udp_tracker_server::environment::Started::new(&configuration).await; + let service = torrust_tracker_udp_server::environment::Started::new(&configuration).await; let binding = service.bind_address(); diff --git a/packages/axum-http-tracker-server/Cargo.toml b/packages/axum-http-tracker-server/Cargo.toml index a4e3194bd..7679f21db 100644 --- a/packages/axum-http-tracker-server/Cargo.toml +++ b/packages/axum-http-tracker-server/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true homepage.workspace = true keywords = [ "axum", "bittorrent", "http", "server", "torrust", "tracker" ] license.workspace = true -name = "torrust-axum-http-tracker-server" +name = "torrust-tracker-axum-http-server" publish.workspace = true readme = "README.md" repository.workspace = true @@ -29,7 +29,7 @@ reqwest = { version = "0", features = [ "json" ] } serde = { version = "1", features = [ "derive" ] } tokio = { version = "1", features = [ "macros", "net", "rt-multi-thread", "signal", "sync" ] } tokio-util = "0.7.15" -torrust-axum-server = { version = "3.0.0-develop", path = "../axum-server" } +torrust-tracker-axum-server = { version = "3.0.0-develop", path = "../axum-server" } torrust-server-lib = { version = "3.0.0-develop", path = "../server-lib" } torrust-tracker-clock = { version = "3.0.0-develop", path = "../clock" } torrust-tracker-configuration = { version = "3.0.0-develop", path = "../configuration" } @@ -43,7 +43,7 @@ tracing = "0" [dev-dependencies] local-ip-address = "0" percent-encoding = "2" -rand = "0" +rand = "0.9" serde_bencode = "0" serde_bytes = "0" serde_repr = "0" diff --git a/packages/axum-http-tracker-server/README.md b/packages/axum-http-tracker-server/README.md index b109a08c1..00c2f7cf9 100644 --- a/packages/axum-http-tracker-server/README.md +++ b/packages/axum-http-tracker-server/README.md @@ -4,7 +4,7 @@ The Torrust Bittorrent HTTP tracker. ## Documentation -[Crate documentation](https://docs.rs/torrust-axum-http-tracker-server). +[Crate documentation](https://docs.rs/torrust-tracker-axum-http-server). ## License diff --git a/packages/axum-http-tracker-server/src/environment.rs b/packages/axum-http-tracker-server/src/environment.rs index 80550b9db..a8d4a288e 100644 --- a/packages/axum-http-tracker-server/src/environment.rs +++ b/packages/axum-http-tracker-server/src/environment.rs @@ -6,8 +6,8 @@ use bittorrent_primitives::info_hash::InfoHash; use bittorrent_tracker_core::container::TrackerCoreContainer; use tokio::task::JoinHandle; use tokio_util::sync::CancellationToken; -use torrust_axum_server::tsl::make_rust_tls; use torrust_server_lib::registar::Registar; +use torrust_tracker_axum_server::tsl::make_rust_tls; use torrust_tracker_configuration::{Configuration, logging}; use torrust_tracker_primitives::peer; use torrust_tracker_swarm_coordination_registry::container::SwarmCoordinationRegistryContainer; diff --git a/packages/axum-http-tracker-server/src/lib.rs b/packages/axum-http-tracker-server/src/lib.rs index 2bb6978b7..1d208bee9 100644 --- a/packages/axum-http-tracker-server/src/lib.rs +++ b/packages/axum-http-tracker-server/src/lib.rs @@ -238,7 +238,7 @@ //! `info_hash` parameters: `info_hash=%81%00%0...00%00%00&info_hash=%82%00%0...00%00%00` //! //! > **NOTICE**: the maximum number of torrents you can scrape at the same time -//! > is `74`. Defined with a hardcoded const [`MAX_SCRAPE_TORRENTS`](torrust_udp_tracker_server::MAX_SCRAPE_TORRENTS). +//! > is `74`. Defined with a hardcoded const [`MAX_SCRAPE_TORRENTS`](torrust_tracker_udp_server::MAX_SCRAPE_TORRENTS). //! //! **Sample response** //! diff --git a/packages/axum-http-tracker-server/src/server.rs b/packages/axum-http-tracker-server/src/server.rs index 3e73d497c..56cf00389 100644 --- a/packages/axum-http-tracker-server/src/server.rs +++ b/packages/axum-http-tracker-server/src/server.rs @@ -8,12 +8,12 @@ use bittorrent_http_tracker_core::container::HttpTrackerCoreContainer; use derive_more::Constructor; use futures::future::BoxFuture; use tokio::sync::oneshot::{Receiver, Sender}; -use torrust_axum_server::custom_axum_server::{self, TimeoutAcceptor}; -use torrust_axum_server::signals::graceful_shutdown; use torrust_net_primitives::service_binding::{Protocol, ServiceBinding}; use torrust_server_lib::logging::STARTED_ON; use torrust_server_lib::registar::{ServiceHealthCheckJob, ServiceRegistration, ServiceRegistrationForm}; use torrust_server_lib::signals::{Halted, Started}; +use torrust_tracker_axum_server::custom_axum_server::{self, TimeoutAcceptor}; +use torrust_tracker_axum_server::signals::graceful_shutdown; use tracing::instrument; use super::v1::routes::router; @@ -262,8 +262,8 @@ mod tests { use bittorrent_http_tracker_core::statistics::repository::Repository; use bittorrent_tracker_core::container::TrackerCoreContainer; use tokio_util::sync::CancellationToken; - use torrust_axum_server::tsl::make_rust_tls; use torrust_server_lib::registar::Registar; + use torrust_tracker_axum_server::tsl::make_rust_tls; use torrust_tracker_configuration::{Configuration, logging}; use torrust_tracker_swarm_coordination_registry::container::SwarmCoordinationRegistryContainer; use torrust_tracker_test_helpers::configuration::ephemeral_public; diff --git a/packages/axum-http-tracker-server/tests/server/v1/contract.rs b/packages/axum-http-tracker-server/tests/server/v1/contract.rs index 669fd5b94..e6d79b3ec 100644 --- a/packages/axum-http-tracker-server/tests/server/v1/contract.rs +++ b/packages/axum-http-tracker-server/tests/server/v1/contract.rs @@ -1,4 +1,4 @@ -use torrust_axum_http_tracker_server::environment::Started; +use torrust_tracker_axum_http_server::environment::Started; use torrust_tracker_test_helpers::{configuration, logging}; #[tokio::test] @@ -12,8 +12,8 @@ async fn environment_should_be_started_and_stopped() { mod for_all_config_modes { - use torrust_axum_http_tracker_server::environment::Started; - use torrust_axum_http_tracker_server::v1::handlers::health_check::{Report, Status}; + use torrust_tracker_axum_http_server::environment::Started; + use torrust_tracker_axum_http_server::v1::handlers::health_check::{Report, Status}; use torrust_tracker_test_helpers::{configuration, logging}; use crate::server::client::Client; @@ -34,7 +34,7 @@ mod for_all_config_modes { } mod and_running_on_reverse_proxy { - use torrust_axum_http_tracker_server::environment::Started; + use torrust_tracker_axum_http_server::environment::Started; use torrust_tracker_test_helpers::{configuration, logging}; use crate::server::asserts::assert_could_not_find_remote_address_on_x_forwarded_for_header_error_response; @@ -98,7 +98,7 @@ mod for_all_config_modes { use local_ip_address::local_ip; use reqwest::{Response, StatusCode}; use tokio::net::TcpListener; - use torrust_axum_http_tracker_server::environment::Started; + use torrust_tracker_axum_http_server::environment::Started; use torrust_tracker_primitives::PeerId as DomainPeerId; use torrust_tracker_primitives::peer::fixture::PeerBuilder; use torrust_tracker_test_helpers::{configuration, logging}; @@ -960,7 +960,7 @@ mod for_all_config_modes { use bittorrent_primitives::info_hash::InfoHash; use tokio::net::TcpListener; - use torrust_axum_http_tracker_server::environment::Started; + use torrust_tracker_axum_http_server::environment::Started; use torrust_tracker_primitives::PeerId; use torrust_tracker_primitives::peer::fixture::PeerBuilder; use torrust_tracker_test_helpers::{configuration, logging}; @@ -1203,7 +1203,7 @@ mod configured_as_whitelisted { use std::str::FromStr; use bittorrent_primitives::info_hash::InfoHash; - use torrust_axum_http_tracker_server::environment::Started; + use torrust_tracker_axum_http_server::environment::Started; use torrust_tracker_test_helpers::logging::logs_contains_a_line_with; use torrust_tracker_test_helpers::{configuration, logging}; use uuid::Uuid; @@ -1269,7 +1269,7 @@ mod configured_as_whitelisted { use std::str::FromStr; use bittorrent_primitives::info_hash::InfoHash; - use torrust_axum_http_tracker_server::environment::Started; + use torrust_tracker_axum_http_server::environment::Started; use torrust_tracker_primitives::PeerId; use torrust_tracker_primitives::peer::fixture::PeerBuilder; use torrust_tracker_test_helpers::logging::logs_contains_a_line_with; @@ -1376,7 +1376,7 @@ mod configured_as_private { use bittorrent_primitives::info_hash::InfoHash; use bittorrent_tracker_core::authentication::Key; - use torrust_axum_http_tracker_server::environment::Started; + use torrust_tracker_axum_http_server::environment::Started; use torrust_tracker_test_helpers::{configuration, logging}; use crate::server::asserts::{ @@ -1468,7 +1468,7 @@ mod configured_as_private { use bittorrent_primitives::info_hash::InfoHash; use bittorrent_tracker_core::authentication::Key; - use torrust_axum_http_tracker_server::environment::Started; + use torrust_tracker_axum_http_server::environment::Started; use torrust_tracker_primitives::PeerId; use torrust_tracker_primitives::peer::fixture::PeerBuilder; use torrust_tracker_test_helpers::{configuration, logging}; diff --git a/packages/axum-rest-tracker-api-server/Cargo.toml b/packages/axum-rest-tracker-api-server/Cargo.toml index e5e310992..bbd06e100 100644 --- a/packages/axum-rest-tracker-api-server/Cargo.toml +++ b/packages/axum-rest-tracker-api-server/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true homepage.workspace = true keywords = [ "axum", "bittorrent", "http", "server", "torrust", "tracker" ] license.workspace = true -name = "torrust-axum-rest-tracker-api-server" +name = "torrust-tracker-axum-rest-api-server" publish.workspace = true readme = "README.md" repository.workspace = true @@ -30,9 +30,9 @@ serde_json = { version = "1", features = [ "preserve_order" ] } serde_with = { version = "3", features = [ "json" ] } thiserror = "2" tokio = { version = "1", features = [ "macros", "net", "rt-multi-thread", "signal", "sync" ] } -torrust-axum-server = { version = "3.0.0-develop", path = "../axum-server" } -torrust-rest-tracker-api-client = { version = "3.0.0-develop", path = "../rest-tracker-api-client" } -torrust-rest-tracker-api-core = { version = "3.0.0-develop", path = "../rest-tracker-api-core" } +torrust-tracker-axum-server = { version = "3.0.0-develop", path = "../axum-server" } +torrust-tracker-rest-api-client = { version = "3.0.0-develop", path = "../rest-tracker-api-client" } +torrust-tracker-rest-api-core = { version = "3.0.0-develop", path = "../rest-tracker-api-core" } torrust-server-lib = { version = "3.0.0-develop", path = "../server-lib" } torrust-tracker-clock = { version = "3.0.0-develop", path = "../clock" } torrust-tracker-configuration = { version = "3.0.0-develop", path = "../configuration" } @@ -40,14 +40,14 @@ torrust-tracker-metrics = { version = "3.0.0-develop", path = "../metrics" } torrust-net-primitives = { version = "3.0.0-develop", path = "../net-primitives" } torrust-tracker-primitives = { version = "3.0.0-develop", path = "../primitives" } torrust-tracker-swarm-coordination-registry = { version = "3.0.0-develop", path = "../swarm-coordination-registry" } -torrust-udp-tracker-server = { version = "3.0.0-develop", path = "../udp-tracker-server" } +torrust-tracker-udp-server = { version = "3.0.0-develop", path = "../udp-tracker-server" } tower = { version = "0", features = [ "timeout" ] } tower-http = { version = "0", features = [ "compression-full", "cors", "propagate-header", "request-id", "trace" ] } tracing = "0" url = "2" [dev-dependencies] -torrust-rest-tracker-api-client = { version = "3.0.0-develop", path = "../rest-tracker-api-client" } +torrust-tracker-rest-api-client = { version = "3.0.0-develop", path = "../rest-tracker-api-client" } torrust-tracker-test-helpers = { version = "3.0.0-develop", path = "../test-helpers" } url = { version = "2", features = [ "serde" ] } uuid = { version = "1", features = [ "v4" ] } diff --git a/packages/axum-rest-tracker-api-server/src/environment.rs b/packages/axum-rest-tracker-api-server/src/environment.rs index 1f9cab204..81d1b9882 100644 --- a/packages/axum-rest-tracker-api-server/src/environment.rs +++ b/packages/axum-rest-tracker-api-server/src/environment.rs @@ -5,14 +5,14 @@ use bittorrent_http_tracker_core::container::HttpTrackerCoreContainer; use bittorrent_primitives::info_hash::InfoHash; use bittorrent_tracker_core::container::TrackerCoreContainer; use bittorrent_udp_tracker_core::container::UdpTrackerCoreContainer; -use torrust_axum_server::tsl::make_rust_tls; -use torrust_rest_tracker_api_client::connection_info::{ConnectionInfo, Origin}; -use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer; use torrust_server_lib::registar::Registar; +use torrust_tracker_axum_server::tsl::make_rust_tls; use torrust_tracker_configuration::{Configuration, logging}; use torrust_tracker_primitives::peer; +use torrust_tracker_rest_api_client::connection_info::{ConnectionInfo, Origin}; +use torrust_tracker_rest_api_core::container::TrackerHttpApiCoreContainer; use torrust_tracker_swarm_coordination_registry::container::SwarmCoordinationRegistryContainer; -use torrust_udp_tracker_server::container::UdpTrackerServerContainer; +use torrust_tracker_udp_server::container::UdpTrackerServerContainer; use crate::server::{ApiServer, Launcher, Running, Stopped}; diff --git a/packages/axum-rest-tracker-api-server/src/routes.rs b/packages/axum-rest-tracker-api-server/src/routes.rs index aa2854300..050904ef9 100644 --- a/packages/axum-rest-tracker-api-server/src/routes.rs +++ b/packages/axum-rest-tracker-api-server/src/routes.rs @@ -15,9 +15,9 @@ use axum::response::Response; use axum::routing::get; use axum::{BoxError, Router, middleware}; use hyper::{Request, StatusCode}; -use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer; use torrust_server_lib::logging::Latency; use torrust_tracker_configuration::AccessTokens; +use torrust_tracker_rest_api_core::container::TrackerHttpApiCoreContainer; use tower::ServiceBuilder; use tower::timeout::TimeoutLayer; use tower_http::LatencyUnit; diff --git a/packages/axum-rest-tracker-api-server/src/server.rs b/packages/axum-rest-tracker-api-server/src/server.rs index db0addfdb..21235decd 100644 --- a/packages/axum-rest-tracker-api-server/src/server.rs +++ b/packages/axum-rest-tracker-api-server/src/server.rs @@ -33,14 +33,14 @@ use derive_more::derive::Display; use futures::future::BoxFuture; use thiserror::Error; use tokio::sync::oneshot::{Receiver, Sender}; -use torrust_axum_server::custom_axum_server::{self, TimeoutAcceptor}; -use torrust_axum_server::signals::graceful_shutdown; use torrust_net_primitives::service_binding::{Protocol, ServiceBinding}; -use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer; use torrust_server_lib::logging::STARTED_ON; use torrust_server_lib::registar::{ServiceHealthCheckJob, ServiceRegistration, ServiceRegistrationForm}; use torrust_server_lib::signals::{Halted, Started}; +use torrust_tracker_axum_server::custom_axum_server::{self, TimeoutAcceptor}; +use torrust_tracker_axum_server::signals::graceful_shutdown; use torrust_tracker_configuration::AccessTokens; +use torrust_tracker_rest_api_core::container::TrackerHttpApiCoreContainer; use tracing::{Level, instrument}; use super::routes::router; @@ -307,10 +307,10 @@ impl Launcher { mod tests { use std::sync::Arc; - use torrust_axum_server::tsl::make_rust_tls; - use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer; use torrust_server_lib::registar::Registar; + use torrust_tracker_axum_server::tsl::make_rust_tls; use torrust_tracker_configuration::{Configuration, logging}; + use torrust_tracker_rest_api_core::container::TrackerHttpApiCoreContainer; use torrust_tracker_test_helpers::configuration::ephemeral_public; use crate::server::{ApiServer, Launcher}; diff --git a/packages/axum-rest-tracker-api-server/src/v1/context/stats/handlers.rs b/packages/axum-rest-tracker-api-server/src/v1/context/stats/handlers.rs index 1b1f670a0..25ae44b4f 100644 --- a/packages/axum-rest-tracker-api-server/src/v1/context/stats/handlers.rs +++ b/packages/axum-rest-tracker-api-server/src/v1/context/stats/handlers.rs @@ -9,7 +9,7 @@ use bittorrent_tracker_core::torrent::repository::in_memory::InMemoryTorrentRepo use bittorrent_udp_tracker_core::services::banning::BanService; use serde::Deserialize; use tokio::sync::RwLock; -use torrust_rest_tracker_api_core::statistics::services::{get_labeled_metrics, get_metrics}; +use torrust_tracker_rest_api_core::statistics::services::{get_labeled_metrics, get_metrics}; use super::responses::{labeled_metrics_response, labeled_stats_response, metrics_response, stats_response}; @@ -43,7 +43,7 @@ pub async fn get_stats_handler( Arc, Arc, Arc, - Arc, + Arc, )>, params: Query, ) -> Response { @@ -73,7 +73,7 @@ pub async fn get_metrics_handler( Arc, Arc, Arc, - Arc, + Arc, )>, params: Query, ) -> Response { diff --git a/packages/axum-rest-tracker-api-server/src/v1/context/stats/resources.rs b/packages/axum-rest-tracker-api-server/src/v1/context/stats/resources.rs index ece50383b..4bf9576ed 100644 --- a/packages/axum-rest-tracker-api-server/src/v1/context/stats/resources.rs +++ b/packages/axum-rest-tracker-api-server/src/v1/context/stats/resources.rs @@ -1,8 +1,8 @@ //! API resources for the [`stats`](crate::v1::context::stats) //! API context. use serde::{Deserialize, Serialize}; -use torrust_rest_tracker_api_core::statistics::services::{TrackerLabeledMetrics, TrackerMetrics}; use torrust_tracker_metrics::metric_collection::MetricCollection; +use torrust_tracker_rest_api_core::statistics::services::{TrackerLabeledMetrics, TrackerMetrics}; /// It contains all the statistics generated by the tracker. #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] @@ -134,8 +134,8 @@ impl From for LabeledStats { #[cfg(test)] mod tests { - use torrust_rest_tracker_api_core::statistics::metrics::{ProtocolMetrics, TorrentsMetrics}; - use torrust_rest_tracker_api_core::statistics::services::TrackerMetrics; + use torrust_tracker_rest_api_core::statistics::metrics::{ProtocolMetrics, TorrentsMetrics}; + use torrust_tracker_rest_api_core::statistics::services::TrackerMetrics; use super::Stats; diff --git a/packages/axum-rest-tracker-api-server/src/v1/context/stats/responses.rs b/packages/axum-rest-tracker-api-server/src/v1/context/stats/responses.rs index e79f7e562..b9a45fc50 100644 --- a/packages/axum-rest-tracker-api-server/src/v1/context/stats/responses.rs +++ b/packages/axum-rest-tracker-api-server/src/v1/context/stats/responses.rs @@ -1,8 +1,8 @@ //! API responses for the [`stats`](crate::v1::context::stats) //! API context. use axum::response::{IntoResponse, Json, Response}; -use torrust_rest_tracker_api_core::statistics::services::{TrackerLabeledMetrics, TrackerMetrics}; use torrust_tracker_metrics::prometheus::PrometheusSerializable; +use torrust_tracker_rest_api_core::statistics::services::{TrackerLabeledMetrics, TrackerMetrics}; use super::resources::{LabeledStats, Stats}; diff --git a/packages/axum-rest-tracker-api-server/src/v1/context/stats/routes.rs b/packages/axum-rest-tracker-api-server/src/v1/context/stats/routes.rs index 268560dd6..a76a61531 100644 --- a/packages/axum-rest-tracker-api-server/src/v1/context/stats/routes.rs +++ b/packages/axum-rest-tracker-api-server/src/v1/context/stats/routes.rs @@ -7,7 +7,7 @@ use std::sync::Arc; use axum::Router; use axum::routing::get; -use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer; +use torrust_tracker_rest_api_core::container::TrackerHttpApiCoreContainer; use super::handlers::{get_metrics_handler, get_stats_handler}; diff --git a/packages/axum-rest-tracker-api-server/src/v1/routes.rs b/packages/axum-rest-tracker-api-server/src/v1/routes.rs index f7057a852..17ca1fc12 100644 --- a/packages/axum-rest-tracker-api-server/src/v1/routes.rs +++ b/packages/axum-rest-tracker-api-server/src/v1/routes.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use axum::Router; -use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer; +use torrust_tracker_rest_api_core::container::TrackerHttpApiCoreContainer; use super::context::{auth_key, stats, torrent, whitelist}; diff --git a/packages/axum-rest-tracker-api-server/tests/server/connection_info.rs b/packages/axum-rest-tracker-api-server/tests/server/connection_info.rs index 6459c9a2f..746f67501 100644 --- a/packages/axum-rest-tracker-api-server/tests/server/connection_info.rs +++ b/packages/axum-rest-tracker-api-server/tests/server/connection_info.rs @@ -1,4 +1,4 @@ -use torrust_rest_tracker_api_client::connection_info::{ConnectionInfo, Origin}; +use torrust_tracker_rest_api_client::connection_info::{ConnectionInfo, Origin}; pub fn connection_with_invalid_token(origin: Origin) -> ConnectionInfo { ConnectionInfo::authenticated(origin, "invalid token") diff --git a/packages/axum-rest-tracker-api-server/tests/server/v1/asserts.rs b/packages/axum-rest-tracker-api-server/tests/server/v1/asserts.rs index d9a02d04a..c6b7f1930 100644 --- a/packages/axum-rest-tracker-api-server/tests/server/v1/asserts.rs +++ b/packages/axum-rest-tracker-api-server/tests/server/v1/asserts.rs @@ -1,9 +1,9 @@ // code-review: should we use macros to return the exact line where the assert fails? use reqwest::Response; -use torrust_axum_rest_tracker_api_server::v1::context::auth_key::resources::AuthKey; -use torrust_axum_rest_tracker_api_server::v1::context::stats::resources::Stats; -use torrust_axum_rest_tracker_api_server::v1::context::torrent::resources::torrent::{ListItem, Torrent}; +use torrust_tracker_axum_rest_api_server::v1::context::auth_key::resources::AuthKey; +use torrust_tracker_axum_rest_api_server::v1::context::stats::resources::Stats; +use torrust_tracker_axum_rest_api_server::v1::context::torrent::resources::torrent::{ListItem, Torrent}; // Resource responses diff --git a/packages/axum-rest-tracker-api-server/tests/server/v1/contract/authentication.rs b/packages/axum-rest-tracker-api-server/tests/server/v1/contract/authentication.rs index 9e3adabee..2194df0c1 100644 --- a/packages/axum-rest-tracker-api-server/tests/server/v1/contract/authentication.rs +++ b/packages/axum-rest-tracker-api-server/tests/server/v1/contract/authentication.rs @@ -1,9 +1,9 @@ mod given_that_the_token_is_only_provided_in_the_authentication_header { use hyper::header; - use torrust_axum_rest_tracker_api_server::environment::Started; - use torrust_rest_tracker_api_client::common::http::Query; - use torrust_rest_tracker_api_client::connection_info::ConnectionInfo; - use torrust_rest_tracker_api_client::v1::client::{ + use torrust_tracker_axum_rest_api_server::environment::Started; + use torrust_tracker_rest_api_client::common::http::Query; + use torrust_tracker_rest_api_client::connection_info::ConnectionInfo; + use torrust_tracker_rest_api_client::v1::client::{ AUTH_BEARER_TOKEN_HEADER_PREFIX, Client, headers_with_auth_token, headers_with_request_id, }; use torrust_tracker_test_helpers::logging::logs_contains_a_line_with; @@ -100,10 +100,10 @@ mod given_that_the_token_is_only_provided_in_the_authentication_header { } mod given_that_the_token_is_only_provided_in_the_query_param { - use torrust_axum_rest_tracker_api_server::environment::Started; - use torrust_rest_tracker_api_client::common::http::{Query, QueryParam}; - use torrust_rest_tracker_api_client::connection_info::ConnectionInfo; - use torrust_rest_tracker_api_client::v1::client::{Client, TOKEN_PARAM_NAME, headers_with_request_id}; + use torrust_tracker_axum_rest_api_server::environment::Started; + use torrust_tracker_rest_api_client::common::http::{Query, QueryParam}; + use torrust_tracker_rest_api_client::connection_info::ConnectionInfo; + use torrust_tracker_rest_api_client::v1::client::{Client, TOKEN_PARAM_NAME, headers_with_request_id}; use torrust_tracker_test_helpers::logging::logs_contains_a_line_with; use torrust_tracker_test_helpers::{configuration, logging}; use uuid::Uuid; @@ -224,10 +224,10 @@ mod given_that_the_token_is_only_provided_in_the_query_param { mod given_that_not_token_is_provided { - use torrust_axum_rest_tracker_api_server::environment::Started; - use torrust_rest_tracker_api_client::common::http::Query; - use torrust_rest_tracker_api_client::connection_info::ConnectionInfo; - use torrust_rest_tracker_api_client::v1::client::{Client, headers_with_request_id}; + use torrust_tracker_axum_rest_api_server::environment::Started; + use torrust_tracker_rest_api_client::common::http::Query; + use torrust_tracker_rest_api_client::connection_info::ConnectionInfo; + use torrust_tracker_rest_api_client::v1::client::{Client, headers_with_request_id}; use torrust_tracker_test_helpers::logging::logs_contains_a_line_with; use torrust_tracker_test_helpers::{configuration, logging}; use uuid::Uuid; @@ -261,9 +261,9 @@ mod given_that_not_token_is_provided { } mod given_that_token_is_provided_via_get_param_and_authentication_header { - use torrust_axum_rest_tracker_api_server::environment::Started; - use torrust_rest_tracker_api_client::common::http::{Query, QueryParam}; - use torrust_rest_tracker_api_client::v1::client::{Client, TOKEN_PARAM_NAME, headers_with_auth_token}; + use torrust_tracker_axum_rest_api_server::environment::Started; + use torrust_tracker_rest_api_client::common::http::{Query, QueryParam}; + use torrust_tracker_rest_api_client::v1::client::{Client, TOKEN_PARAM_NAME, headers_with_auth_token}; use torrust_tracker_test_helpers::{configuration, logging}; #[tokio::test] diff --git a/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/auth_key.rs b/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/auth_key.rs index 9b6b55439..c39b83fdd 100644 --- a/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/auth_key.rs +++ b/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/auth_key.rs @@ -2,8 +2,8 @@ use std::time::Duration; use bittorrent_tracker_core::authentication::Key; use serde::Serialize; -use torrust_axum_rest_tracker_api_server::environment::Started; -use torrust_rest_tracker_api_client::v1::client::{AddKeyForm, Client, headers_with_request_id}; +use torrust_tracker_axum_rest_api_server::environment::Started; +use torrust_tracker_rest_api_client::v1::client::{AddKeyForm, Client, headers_with_request_id}; use torrust_tracker_test_helpers::logging::logs_contains_a_line_with; use torrust_tracker_test_helpers::{configuration, logging}; use uuid::Uuid; @@ -500,8 +500,8 @@ async fn should_not_allow_reloading_keys_for_unauthenticated_users() { mod deprecated_generate_key_endpoint { use bittorrent_tracker_core::authentication::Key; - use torrust_axum_rest_tracker_api_server::environment::Started; - use torrust_rest_tracker_api_client::v1::client::{Client, headers_with_request_id}; + use torrust_tracker_axum_rest_api_server::environment::Started; + use torrust_tracker_rest_api_client::v1::client::{Client, headers_with_request_id}; use torrust_tracker_test_helpers::logging::logs_contains_a_line_with; use torrust_tracker_test_helpers::{configuration, logging}; use uuid::Uuid; diff --git a/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/health_check.rs b/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/health_check.rs index 3a08c6d51..2b3fc93ba 100644 --- a/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/health_check.rs +++ b/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/health_check.rs @@ -1,6 +1,6 @@ -use torrust_axum_rest_tracker_api_server::environment::Started; -use torrust_axum_rest_tracker_api_server::v1::context::health_check::resources::{Report, Status}; -use torrust_rest_tracker_api_client::v1::client::get; +use torrust_tracker_axum_rest_api_server::environment::Started; +use torrust_tracker_axum_rest_api_server::v1::context::health_check::resources::{Report, Status}; +use torrust_tracker_rest_api_client::v1::client::get; use torrust_tracker_test_helpers::{configuration, logging}; use url::Url; diff --git a/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/stats.rs b/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/stats.rs index 6e7a3d586..9b3235b31 100644 --- a/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/stats.rs +++ b/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/stats.rs @@ -1,10 +1,10 @@ use std::str::FromStr; use bittorrent_primitives::info_hash::InfoHash; -use torrust_axum_rest_tracker_api_server::environment::Started; -use torrust_axum_rest_tracker_api_server::v1::context::stats::resources::Stats; -use torrust_rest_tracker_api_client::v1::client::{Client, headers_with_request_id}; +use torrust_tracker_axum_rest_api_server::environment::Started; +use torrust_tracker_axum_rest_api_server::v1::context::stats::resources::Stats; use torrust_tracker_primitives::peer::fixture::PeerBuilder; +use torrust_tracker_rest_api_client::v1::client::{Client, headers_with_request_id}; use torrust_tracker_test_helpers::logging::logs_contains_a_line_with; use torrust_tracker_test_helpers::{configuration, logging}; use uuid::Uuid; diff --git a/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/torrent.rs b/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/torrent.rs index 301ba10ca..d7231c88c 100644 --- a/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/torrent.rs +++ b/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/torrent.rs @@ -1,12 +1,12 @@ use std::str::FromStr; use bittorrent_primitives::info_hash::InfoHash; -use torrust_axum_rest_tracker_api_server::environment::Started; -use torrust_axum_rest_tracker_api_server::v1::context::torrent::resources::peer::Peer; -use torrust_axum_rest_tracker_api_server::v1::context::torrent::resources::torrent::{self, Torrent}; -use torrust_rest_tracker_api_client::common::http::{Query, QueryParam}; -use torrust_rest_tracker_api_client::v1::client::{Client, headers_with_request_id}; +use torrust_tracker_axum_rest_api_server::environment::Started; +use torrust_tracker_axum_rest_api_server::v1::context::torrent::resources::peer::Peer; +use torrust_tracker_axum_rest_api_server::v1::context::torrent::resources::torrent::{self, Torrent}; use torrust_tracker_primitives::peer::fixture::PeerBuilder; +use torrust_tracker_rest_api_client::common::http::{Query, QueryParam}; +use torrust_tracker_rest_api_client::v1::client::{Client, headers_with_request_id}; use torrust_tracker_test_helpers::logging::logs_contains_a_line_with; use torrust_tracker_test_helpers::{configuration, logging}; use uuid::Uuid; diff --git a/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/whitelist.rs b/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/whitelist.rs index 682905aec..3c9c8e5d2 100644 --- a/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/whitelist.rs +++ b/packages/axum-rest-tracker-api-server/tests/server/v1/contract/context/whitelist.rs @@ -1,8 +1,8 @@ use std::str::FromStr; use bittorrent_primitives::info_hash::InfoHash; -use torrust_axum_rest_tracker_api_server::environment::Started; -use torrust_rest_tracker_api_client::v1::client::{Client, headers_with_request_id}; +use torrust_tracker_axum_rest_api_server::environment::Started; +use torrust_tracker_rest_api_client::v1::client::{Client, headers_with_request_id}; use torrust_tracker_test_helpers::logging::logs_contains_a_line_with; use torrust_tracker_test_helpers::{configuration, logging}; use uuid::Uuid; diff --git a/packages/axum-server/Cargo.toml b/packages/axum-server/Cargo.toml index 45eddd3b0..20ef94780 100644 --- a/packages/axum-server/Cargo.toml +++ b/packages/axum-server/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true homepage.workspace = true keywords = [ "axum", "server", "torrust", "wrapper" ] license.workspace = true -name = "torrust-axum-server" +name = "torrust-tracker-axum-server" publish.workspace = true readme = "README.md" repository.workspace = true diff --git a/packages/axum-server/README.md b/packages/axum-server/README.md index d2f396915..20992884b 100644 --- a/packages/axum-server/README.md +++ b/packages/axum-server/README.md @@ -4,7 +4,26 @@ A wrapper for the Axum server for Torrust HTTP servers to add timeouts. ## Documentation -[Crate documentation](https://docs.rs/torrust-axum-server). +[Crate documentation](https://docs.rs/torrust-tracker-axum-server). + +## Notes + +This package is currently scoped under the `torrust-tracker-` prefix because `tsl.rs` +depends on two tracker-specific items: + +- `TslConfig` from `torrust-tracker-configuration` — a small two-field struct (SSL + certificate and key paths). It has no inherent tracker dependency and could be moved + to a generic package. +- `LocatedError` / `DynError` from `torrust-tracker-located-error` — planned to be + renamed to `torrust-located-error` (a generic package) under + EPIC [#1669](https://github.com/torrust/torrust-tracker/issues/1669) SI-10. + +Once `TslConfig` is extracted to a generic location and `torrust-tracker-located-error` +is renamed, this package could become a generic `torrust-axum-server` reusable across +the Torrust organisation. A near-identical module already exists in +[torrust-index](https://github.com/torrust/torrust-index/blob/develop/src/web/api/server/custom_axum.rs), +which confirms the generic utility of this pattern. This reorganization is tracked in +EPIC [#1669](https://github.com/torrust/torrust-tracker/issues/1669). ## License diff --git a/packages/rest-tracker-api-client/Cargo.toml b/packages/rest-tracker-api-client/Cargo.toml index 47307df9a..f57aea95d 100644 --- a/packages/rest-tracker-api-client/Cargo.toml +++ b/packages/rest-tracker-api-client/Cargo.toml @@ -2,7 +2,7 @@ description = "A library to interact with the Torrust Tracker REST API." keywords = [ "bittorrent", "client", "tracker" ] license = "LGPL-3.0" -name = "torrust-rest-tracker-api-client" +name = "torrust-tracker-rest-api-client" readme = "README.md" authors.workspace = true diff --git a/packages/rest-tracker-api-core/Cargo.toml b/packages/rest-tracker-api-core/Cargo.toml index 0808c2dd6..a8f4d5506 100644 --- a/packages/rest-tracker-api-core/Cargo.toml +++ b/packages/rest-tracker-api-core/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true homepage.workspace = true keywords = [ "api", "bittorrent", "core", "library", "tracker" ] license.workspace = true -name = "torrust-rest-tracker-api-core" +name = "torrust-tracker-rest-api-core" publish.workspace = true readme = "README.md" repository.workspace = true @@ -23,7 +23,7 @@ torrust-tracker-configuration = { version = "3.0.0-develop", path = "../configur torrust-tracker-metrics = { version = "3.0.0-develop", path = "../metrics" } torrust-tracker-primitives = { version = "3.0.0-develop", path = "../primitives" } torrust-tracker-swarm-coordination-registry = { version = "3.0.0-develop", path = "../swarm-coordination-registry" } -torrust-udp-tracker-server = { version = "3.0.0-develop", path = "../udp-tracker-server" } +torrust-tracker-udp-server = { version = "3.0.0-develop", path = "../udp-tracker-server" } [dev-dependencies] torrust-tracker-events = { version = "3.0.0-develop", path = "../events" } diff --git a/packages/rest-tracker-api-core/src/container.rs b/packages/rest-tracker-api-core/src/container.rs index 9be6a5d00..1bed98922 100644 --- a/packages/rest-tracker-api-core/src/container.rs +++ b/packages/rest-tracker-api-core/src/container.rs @@ -8,7 +8,7 @@ use bittorrent_udp_tracker_core::{self}; use tokio::sync::RwLock; use torrust_tracker_configuration::{Core, HttpApi, HttpTracker, UdpTracker}; use torrust_tracker_swarm_coordination_registry::container::SwarmCoordinationRegistryContainer; -use torrust_udp_tracker_server::container::UdpTrackerServerContainer; +use torrust_tracker_udp_server::container::UdpTrackerServerContainer; pub struct TrackerHttpApiCoreContainer { pub http_api_config: Arc, @@ -25,7 +25,7 @@ pub struct TrackerHttpApiCoreContainer { // UDP tracker core pub ban_service: Arc>, pub udp_core_stats_repository: Arc, - pub udp_server_stats_repository: Arc, + pub udp_server_stats_repository: Arc, } impl TrackerHttpApiCoreContainer { diff --git a/packages/rest-tracker-api-core/src/statistics/services.rs b/packages/rest-tracker-api-core/src/statistics/services.rs index 0d85a83dd..587c16991 100644 --- a/packages/rest-tracker-api-core/src/statistics/services.rs +++ b/packages/rest-tracker-api-core/src/statistics/services.rs @@ -5,7 +5,7 @@ use bittorrent_udp_tracker_core::services::banning::BanService; use bittorrent_udp_tracker_core::{self}; use tokio::sync::RwLock; use torrust_tracker_metrics::metric_collection::MetricCollection; -use torrust_udp_tracker_server::statistics::{self as udp_server_statistics}; +use torrust_tracker_udp_server::statistics::{self as udp_server_statistics}; use super::metrics::TorrentsMetrics; use crate::statistics::metrics::ProtocolMetrics; @@ -239,7 +239,7 @@ mod tests { } // UDP server stats - let udp_server_stats_repository = Arc::new(torrust_udp_tracker_server::statistics::repository::Repository::new()); + let udp_server_stats_repository = Arc::new(torrust_tracker_udp_server::statistics::repository::Repository::new()); let tracker_metrics = get_metrics( tracker_core_container.in_memory_torrent_repository.clone(), diff --git a/packages/server-lib/README.md b/packages/server-lib/README.md index 820225a00..e77faec60 100644 --- a/packages/server-lib/README.md +++ b/packages/server-lib/README.md @@ -4,7 +4,7 @@ Common functionality used in all Torrust HTTP servers. ## Documentation -[Crate documentation](https://docs.rs/torrust-axum-server). +[Crate documentation](https://docs.rs/torrust-server-lib). ## License diff --git a/packages/udp-tracker-server/Cargo.toml b/packages/udp-tracker-server/Cargo.toml index ccbf032eb..4265812b6 100644 --- a/packages/udp-tracker-server/Cargo.toml +++ b/packages/udp-tracker-server/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true homepage.workspace = true keywords = [ "axum", "bittorrent", "server", "torrust", "tracker", "udp" ] license.workspace = true -name = "torrust-udp-tracker-server" +name = "torrust-tracker-udp-server" publish.workspace = true readme = "README.md" repository.workspace = true @@ -42,5 +42,5 @@ zerocopy = "0.8" [dev-dependencies] mockall = "0" -rand = "0" +rand = "0.9" torrust-tracker-test-helpers = { version = "3.0.0-develop", path = "../test-helpers" } diff --git a/packages/udp-tracker-server/README.md b/packages/udp-tracker-server/README.md index bdf147104..c966d4d86 100644 --- a/packages/udp-tracker-server/README.md +++ b/packages/udp-tracker-server/README.md @@ -4,7 +4,7 @@ The Torrust Bittorrent UDP tracker. ## Documentation -[Crate documentation](https://docs.rs/torrust-udp-tracker-server). +[Crate documentation](https://docs.rs/torrust-tracker-udp-server). ## License diff --git a/packages/udp-tracker-server/src/lib.rs b/packages/udp-tracker-server/src/lib.rs index 474872312..c200192a8 100644 --- a/packages/udp-tracker-server/src/lib.rs +++ b/packages/udp-tracker-server/src/lib.rs @@ -475,7 +475,7 @@ //! //! > **NOTICE**: up to about 74 torrents can be scraped at once. A full scrape //! > can't be done with this protocol. This is a limitation of the UDP protocol. -//! > Defined with a hardcoded const [`MAX_SCRAPE_TORRENTS`](torrust_udp_tracker_server::MAX_SCRAPE_TORRENTS). +//! > Defined with a hardcoded const [`MAX_SCRAPE_TORRENTS`](torrust_tracker_udp_server::MAX_SCRAPE_TORRENTS). //! > Refer to [issue 262](https://github.com/torrust/torrust-tracker/issues/262) //! > for more information about this limitation. //! diff --git a/packages/udp-tracker-server/tests/server/contract.rs b/packages/udp-tracker-server/tests/server/contract.rs index a9161665a..e60a27f80 100644 --- a/packages/udp-tracker-server/tests/server/contract.rs +++ b/packages/udp-tracker-server/tests/server/contract.rs @@ -9,7 +9,7 @@ use std::time::Duration; use bittorrent_tracker_client::udp::client::UdpTrackerClient; use bittorrent_udp_tracker_protocol::{ConnectRequest, ConnectionId, Response, TransactionId}; use torrust_tracker_test_helpers::{configuration, logging}; -use torrust_udp_tracker_server::MAX_PACKET_SIZE; +use torrust_tracker_udp_server::MAX_PACKET_SIZE; use crate::server::asserts::get_error_response_message; @@ -42,7 +42,7 @@ async fn send_connection_request(transaction_id: TransactionId, client: &UdpTrac async fn should_return_a_bad_request_response_when_the_client_sends_an_empty_request() { logging::setup(); - let env = torrust_udp_tracker_server::environment::Started::new(&configuration::ephemeral().into()).await; + let env = torrust_tracker_udp_server::environment::Started::new(&configuration::ephemeral().into()).await; let client = match UdpTrackerClient::new(env.bind_address(), DEFAULT_UDP_TIMEOUT).await { Ok(udp_client) => udp_client, @@ -82,7 +82,7 @@ mod receiving_a_connection_request { async fn should_return_a_connect_response() { logging::setup(); - let env = torrust_udp_tracker_server::environment::Started::new(&configuration::ephemeral().into()).await; + let env = torrust_tracker_udp_server::environment::Started::new(&configuration::ephemeral().into()).await; let client = match UdpTrackerClient::new(env.bind_address(), DEFAULT_UDP_TIMEOUT).await { Ok(udp_tracker_client) => udp_tracker_client, @@ -182,7 +182,7 @@ mod receiving_an_announce_request { async fn should_return_an_announce_response() { logging::setup(); - let env = torrust_udp_tracker_server::environment::Started::new(&configuration::ephemeral().into()).await; + let env = torrust_tracker_udp_server::environment::Started::new(&configuration::ephemeral().into()).await; let client = match UdpTrackerClient::new(env.bind_address(), DEFAULT_UDP_TIMEOUT).await { Ok(udp_tracker_client) => udp_tracker_client, @@ -204,7 +204,7 @@ mod receiving_an_announce_request { async fn should_return_many_announce_response() { logging::setup(); - let env = torrust_udp_tracker_server::environment::Started::new(&configuration::ephemeral().into()).await; + let env = torrust_tracker_udp_server::environment::Started::new(&configuration::ephemeral().into()).await; let client = match UdpTrackerClient::new(env.bind_address(), DEFAULT_UDP_TIMEOUT).await { Ok(udp_tracker_client) => udp_tracker_client, @@ -229,7 +229,7 @@ mod receiving_an_announce_request { async fn should_ban_the_client_ip_if_it_sends_more_than_10_requests_with_a_cookie_value_not_normal() { logging::setup(); - let env = torrust_udp_tracker_server::environment::Started::new(&configuration::ephemeral().into()).await; + let env = torrust_tracker_udp_server::environment::Started::new(&configuration::ephemeral().into()).await; let ban_service = env.container.udp_tracker_core_container.ban_service.clone(); let client = match UdpTrackerClient::new(env.bind_address(), DEFAULT_UDP_TIMEOUT).await { @@ -319,7 +319,7 @@ mod receiving_an_scrape_request { async fn should_return_a_scrape_response() { logging::setup(); - let env = torrust_udp_tracker_server::environment::Started::new(&configuration::ephemeral().into()).await; + let env = torrust_tracker_udp_server::environment::Started::new(&configuration::ephemeral().into()).await; let client = match UdpTrackerClient::new(env.bind_address(), DEFAULT_UDP_TIMEOUT).await { Ok(udp_tracker_client) => udp_tracker_client, diff --git a/src/app.rs b/src/app.rs index 34814e858..de7e64a7b 100644 --- a/src/app.rs +++ b/src/app.rs @@ -244,7 +244,7 @@ async fn start_http_instance( if let Some(handle) = http_tracker::start_job( http_tracker_container, app_container.registar.give_form(), - torrust_axum_http_tracker_server::Version::V1, + torrust_tracker_axum_http_server::Version::V1, ) .await { @@ -260,7 +260,7 @@ async fn start_the_http_api(config: &Configuration, app_container: &Arc Option> { if config.core.tracker_usage_statistics { - let job = torrust_udp_tracker_server::statistics::event::listener::run_event_listener( + let job = torrust_tracker_udp_server::statistics::event::listener::run_event_listener( app_container.udp_tracker_server_container.event_bus.receiver(), cancellation_token, &app_container.udp_tracker_server_container.stats_repository, @@ -26,7 +26,7 @@ pub fn start_stats_event_listener( #[must_use] pub fn start_banning_event_listener(app_container: &Arc, cancellation_token: CancellationToken) -> JoinHandle<()> { - torrust_udp_tracker_server::banning::event::listener::run_event_listener( + torrust_tracker_udp_server::banning::event::listener::run_event_listener( app_container.udp_tracker_server_container.event_bus.receiver(), cancellation_token, &app_container.udp_tracker_core_services.ban_service, diff --git a/src/console/ci/e2e/logs_parser.rs b/src/console/ci/e2e/logs_parser.rs index e6baeb4fb..4d0840ace 100644 --- a/src/console/ci/e2e/logs_parser.rs +++ b/src/console/ci/e2e/logs_parser.rs @@ -2,9 +2,9 @@ use bittorrent_udp_tracker_core::UDP_TRACKER_LOG_TARGET; use regex::Regex; use serde::{Deserialize, Serialize}; -use torrust_axum_health_check_api_server::HEALTH_CHECK_API_LOG_TARGET; -use torrust_axum_http_tracker_server::HTTP_TRACKER_LOG_TARGET; use torrust_server_lib::logging::STARTED_ON; +use torrust_tracker_axum_health_check_api_server::HEALTH_CHECK_API_LOG_TARGET; +use torrust_tracker_axum_http_server::HTTP_TRACKER_LOG_TARGET; const INFO_THRESHOLD: &str = "INFO"; diff --git a/src/console/ci/qbittorrent_e2e/scenario_steps/tracker/verify_tracker_swarm.rs b/src/console/ci/qbittorrent_e2e/scenario_steps/tracker/verify_tracker_swarm.rs index f3b6f3eba..e07e4dd85 100644 --- a/src/console/ci/qbittorrent_e2e/scenario_steps/tracker/verify_tracker_swarm.rs +++ b/src/console/ci/qbittorrent_e2e/scenario_steps/tracker/verify_tracker_swarm.rs @@ -1,5 +1,5 @@ use anyhow::Context; -use torrust_axum_rest_tracker_api_server::v1::context::torrent::resources::torrent::Torrent; +use torrust_tracker_axum_rest_api_server::v1::context::torrent::resources::torrent::Torrent; use super::super::super::tracker::TrackerApiClient; use super::super::super::types::InfoHash; diff --git a/src/console/ci/qbittorrent_e2e/tracker/client.rs b/src/console/ci/qbittorrent_e2e/tracker/client.rs index 0300a9492..a9c0b32b5 100644 --- a/src/console/ci/qbittorrent_e2e/tracker/client.rs +++ b/src/console/ci/qbittorrent_e2e/tracker/client.rs @@ -1,12 +1,12 @@ //! Tracker REST API client, scoped to E2E test needs. //! -//! Wraps the official [`torrust_rest_tracker_api_client::v1::Client`] so that +//! Wraps the official [`torrust_tracker_rest_api_client::v1::Client`] so that //! future scenario steps can call any REST API endpoint through the same client //! without having to reconstruct connection details each time. use anyhow::Context; -use torrust_axum_rest_tracker_api_server::v1::context::torrent::resources::torrent::Torrent; -use torrust_rest_tracker_api_client::connection_info::{ConnectionInfo, Origin}; -use torrust_rest_tracker_api_client::v1::client::Client; +use torrust_tracker_axum_rest_api_server::v1::context::torrent::resources::torrent::Torrent; +use torrust_tracker_rest_api_client::connection_info::{ConnectionInfo, Origin}; +use torrust_tracker_rest_api_client::v1::client::Client; use super::super::types::InfoHash; use super::config_builder::TrackerConfig; diff --git a/src/container.rs b/src/container.rs index 3fb88fafa..70e657de0 100644 --- a/src/container.rs +++ b/src/container.rs @@ -6,11 +6,11 @@ use bittorrent_http_tracker_core::container::{HttpTrackerCoreContainer, HttpTrac use bittorrent_tracker_core::container::TrackerCoreContainer; use bittorrent_udp_tracker_core::container::{UdpTrackerCoreContainer, UdpTrackerCoreServices}; use bittorrent_udp_tracker_core::{self}; -use torrust_rest_tracker_api_core::container::TrackerHttpApiCoreContainer; use torrust_server_lib::registar::Registar; use torrust_tracker_configuration::{Configuration, HttpApi}; +use torrust_tracker_rest_api_core::container::TrackerHttpApiCoreContainer; use torrust_tracker_swarm_coordination_registry::container::SwarmCoordinationRegistryContainer; -use torrust_udp_tracker_server::container::UdpTrackerServerContainer; +use torrust_tracker_udp_server::container::UdpTrackerServerContainer; use tracing::instrument; #[derive(thiserror::Error, Debug, Clone)] diff --git a/src/lib.rs b/src/lib.rs index 942df68d2..cb137631f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -55,9 +55,9 @@ //! //! From the end-user perspective the Torrust Tracker exposes three different services. //! -//! - A REST [`API`](torrust_axum_rest_tracker_api_server) -//! - One or more [`UDP`](torrust_udp_tracker_server) trackers -//! - One or more [`HTTP`](torrust_axum_http_tracker_server) trackers +//! - A REST [`API`](torrust_tracker_axum_rest_api_server) +//! - One or more [`UDP`](torrust_tracker_udp_server) trackers +//! - One or more [`HTTP`](torrust_tracker_axum_http_server) trackers //! //! # Installation //! @@ -130,7 +130,7 @@ //! By default the tracker uses `SQLite` and the database file name `sqlite3.db`. //! //! You only need the `tls` directory in case you are setting up SSL for the HTTP tracker or the tracker API. -//! Visit [`HTTP`](torrust_axum_http_tracker_server) or [`API`](torrust_axum_rest_tracker_api_server) if you want to know how you can use HTTPS. +//! Visit [`HTTP`](torrust_tracker_axum_http_server) or [`API`](torrust_tracker_axum_rest_api_server) if you want to know how you can use HTTPS. //! //! ## Install from sources //! @@ -286,7 +286,7 @@ //! } //! ``` //! -//! Refer to the [`API`](torrust_axum_rest_tracker_api_server) documentation for more information about the [`API`](torrust_axum_rest_tracker_api_server) endpoints. +//! Refer to the [`API`](torrust_tracker_axum_rest_api_server) documentation for more information about the [`API`](torrust_tracker_axum_rest_api_server) endpoints. //! //! ## HTTP tracker //! @@ -307,7 +307,7 @@ //! bind_address = "0.0.0.0:7070" //! ``` //! -//! Refer to the [`HTTP`](torrust_axum_http_tracker_server) documentation for more information about the [`HTTP`](torrust_axum_http_tracker_server) tracker. +//! Refer to the [`HTTP`](torrust_tracker_axum_http_server) documentation for more information about the [`HTTP`](torrust_tracker_axum_http_server) tracker. //! //! ### Announce //! @@ -365,7 +365,7 @@ //! //! If the tracker is running in `private` or `private_listed` mode you will need to provide a valid authentication key. //! -//! Right now the only way to add new keys is via the REST [`API`](torrust_axum_rest_tracker_api_server). The endpoint `POST /api/vi/key/:duration_in_seconds` +//! Right now the only way to add new keys is via the REST [`API`](torrust_tracker_axum_rest_api_server). The endpoint `POST /api/v1/key/:duration_in_seconds` //! will return an expiring key that will be valid for `duration_in_seconds` seconds. //! //! Using `curl` you can create a 2-minute valid auth key: @@ -385,7 +385,7 @@ //! ``` //! //! You can also use the Torrust Tracker together with the [Torrust Index](https://github.com/torrust/torrust-index). If that's the case, -//! the Index will create the keys by using the tracker [API](torrust_axum_rest_tracker_api_server). +//! the Index will create the keys by using the tracker [API](torrust_tracker_axum_rest_api_server). //! //! ## UDP tracker //! @@ -401,7 +401,7 @@ //! bind_address = "0.0.0.0:6969" //! ``` //! -//! Refer to the [`UDP`](torrust_udp_tracker_server) documentation for more information about the [`UDP`](torrust_udp_tracker_server) tracker. +//! Refer to the [`UDP`](torrust_tracker_udp_server) documentation for more information about the [`UDP`](torrust_tracker_udp_server) tracker. //! //! If you want to know more about the UDP tracker protocol: //! @@ -433,7 +433,7 @@ //! - Torrents: to get peers for a torrent //! - Whitelist: to handle the torrent whitelist when the tracker runs on `listed` or `private_listed` mode //! -//! See [`API`](torrust_axum_rest_tracker_api_server) for more details on the REST API. +//! See [`API`](torrust_tracker_axum_rest_api_server) for more details on the REST API. //! //! ## UDP tracker //! @@ -445,13 +445,13 @@ //! - [Wikipedia: UDP tracker](https://en.wikipedia.org/wiki/UDP_tracker) //! - [BEP 15: UDP Tracker Protocol for `BitTorrent`](https://www.bittorrent.org/beps/bep_0015.html) //! -//! See [`UDP`](torrust_udp_tracker_server) for more details on the UDP tracker. +//! See [`UDP`](torrust_tracker_udp_server) for more details on the UDP tracker. //! //! ## HTTP tracker //! //! HTTP tracker was the original tracker specification defined on the [BEP 3]((https://www.bittorrent.org/beps/bep_0003.html)). //! -//! See [`HTTP`](torrust_axum_http_tracker_server) for more details on the HTTP tracker. +//! See [`HTTP`](torrust_tracker_axum_http_server) for more details on the HTTP tracker. //! //! You can find more information about UDP tracker on: //! diff --git a/tests/servers/api/contract/stats/mod.rs b/tests/servers/api/contract/stats/mod.rs index e2cbb424d..bd21a8e3a 100644 --- a/tests/servers/api/contract/stats/mod.rs +++ b/tests/servers/api/contract/stats/mod.rs @@ -7,9 +7,9 @@ use bittorrent_tracker_client::http::client::requests::announce::QueryBuilder; use reqwest::Url; use serde::Deserialize; use tokio::time::Duration; -use torrust_rest_tracker_api_client::connection_info::{ConnectionInfo, Origin}; -use torrust_rest_tracker_api_client::v1::client::Client as TrackerApiClient; use torrust_tracker_lib::app; +use torrust_tracker_rest_api_client::connection_info::{ConnectionInfo, Origin}; +use torrust_tracker_rest_api_client::v1::client::Client as TrackerApiClient; #[tokio::test] async fn the_stats_api_endpoint_should_return_the_global_stats() {