Repository navigation
refactor(tracker-client): [#2765] remove the deprecated tracker client binaries - #2901
josecelano merged 25 commits into
Conversation
…r client binaries Delete http_tracker_client, udp_tracker_client and tracker_checker. The unified tracker_client replaces them and reuses their library modules. Update the docs that told the reader to run them and add the breaking-change note. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… and capture its output Launch the unified tracker_client check (keeping TORRUST_CHECKER_CONFIG), pipe and drain the child's stdout and stderr, add an absolute deadline and always reap the child. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ification Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at f052b5dfcbd64ffb765c063ed890d63acc06b994. Recomputed from the bytes at this head, against the merge base e018ce07b; git merge-tree against develop 2fed4dbb3 writes a clean tree with no conflict (exit 0), and the two develop commits since the merge base touch none of the 14 files.
Process: a removal refactor with an e2e helper fix and spec progress, governed by commit-changes, open-pull-request, create-issue (progress, evidence, completion review), write-unit-test and write-markdown-docs. The title and subjects use type(scope): [#2765] summary.
The change against its claim: the three src/bin entry points are gone and no manifest, workflow, main Containerfile or .dockerignore named them (bins are auto-discovered). Every rewritten command parses against unified/app.rs and unified/check.rs, including check -- --config-path and check monitor udp. The checker integration tests already ran tracker_client check at the merge base, so AC3 holds. The helper runs cargo run -p torrust-tracker-client --bin tracker_client -- check with TORRUST_CHECKER_CONFIG, null stdin, both pipes drained on threads, a polled deadline and a guard that kills and reaps; I found no input class where it deadlocks or leaves the child unreaped. The container test job runs e2e_tests_runner on this PR.
Consistency: no new links and no dictionary change; frontmatter keys match the template; the EPIC row and the spec move are left to the close-out, as with the merged siblings. One open spec still names tracker_checker as a command (F3).
Hygiene: three commits, author equals committer, each body matches its diff; each commit carries an attribution footer, which no rule in the tree addresses; git diff --check is clean; the skill's PR-branch commit-id check prints nothing; the closing-keyword scan matches only Closes #2765 in the body, the issue this PR implements.
Findings: F1 to F5 Minor, F6 to F8 Nit, F9 Suggestion; none blocks.
Checked, no finding: the README, contract doc, app.rs and mod.rs doc edits, the docs/packages.md row, the sccache experiment stubs, rustfmt layout at width 130, the let_underscore deny met with drop(...), and the V1 output shape against run_checks.
Checks
On the loop's compute node at this head, against the merge base e018ce07b (receipt server-gates-kranich-1047): the repository's pre-commit gate and lint roster exit 0 (333 s wall). In a fresh per-PR target directory, cargo test -p torrust-tracker-client -p torrust-tracker passes 366 tests with 0 failed across 24 binaries (101 s wall), and cargo clippy -p torrust-tracker-client -p torrust-tracker --all-targets -- -D warnings is clean (22 s wall). F3 checked against the bytes at posting: the open spec docs/issues/open/2594-1669-extract-torrust-tracker-client-to-standalone-repo/ISSUE.md still names tracker_checker as a command at lines 86, 129 and 293, while console/tracker-client/src/bin/ now holds only tracker_client.rs. The trial merge was rechecked against the newer develop 2bee4ec34 (the merge of #2898): clean. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "Package Coverage Regression: completed/success; Package Coverage (torrust-tracker-client): completed/success; Package Coverage (torrust-tracker): completed/success; Test (Docker) (release): in_progress/pending; Generate Coverage Report: completed/success; Discover Package Coverage: completed/success; Docker E2E: completed/skipped; Build on windows-latest (nightly): completed/success; Build on macos-latest (stable): completed/success; Build on windows-latest (stable): completed/success; Build on ubuntu-latest (stable): completed/success; Build on ubuntu-latest (nightly): completed/success; Build on macos-latest (nightly): completed/success; Documented Clippy Allows: completed/success; Unit (nightly): completed/success; Workspace Packaging: completed/success; Unit (stable): completed/success; Shipped Features: completed/success; Layer Boundary Bans: completed/success; Docs Lint: completed/success". At posting, develop is 2bee4ec34.
|
ACK f052b5d — the three deprecated binaries are removed with no live caller left, every rewritten command parses against the unified CLI, and the e2e helper's spawn, drain, deadline and reap paths were read in full |
There was a problem hiding this comment.
🟡 Changes recommended
Output-reader joins can exceed the 15-minute deadline when descendants retain pipes, and migrated CLI examples still use unsupported format values and flags.
3 open issues
What changed in this PR
Removes the three deprecated tracker-client binaries in favor of the unified tracker_client, advancing EPIC #2758 while retaining shared library functionality.
Changes:
- Deletes legacy entry points and documents their replacement subcommands.
- Migrates the end-to-end checker helper to
tracker_client check, adding captured output, timeout handling, cleanup, and six unit tests. - Updates examples, package documentation, container stubs, and issue verification records.
| File | Description |
|---|---|
src/console/ci/e2e/tracker_checker.rs |
Migrates checker invocation and adds process handling and tests. |
docs/packages.md |
Lists only the unified client binary. |
docs/issues/open/2765-2758-remove-deprecated-tracker-clients/manual-verification-evidence.md |
Records local checker and helper smoke-test results. |
docs/issues/open/2765-2758-remove-deprecated-tracker-clients/ISSUE.md |
Updates implementation progress and acceptance evidence. |
contrib/dev-tools/experiments/sccache-docker/04-gha-workflow-experiments/Containerfile.sccache-experiment |
Removes obsolete binary stubs and updates the explanatory comment. |
console/tracker-client/src/console/clients/udp/app.rs |
Migrates documentation examples to tracker_client udp. |
console/tracker-client/src/console/clients/mod.rs |
Clarifies why shared legacy modules remain. |
console/tracker-client/src/console/clients/http/app.rs |
Migrates documentation examples to tracker_client http. |
console/tracker-client/src/console/clients/checker/app.rs |
Migrates documentation examples to tracker_client check. |
console/tracker-client/src/bin/udp_tracker_client.rs |
Deletes the deprecated UDP entry point. |
console/tracker-client/src/bin/tracker_checker.rs |
Deletes the deprecated checker entry point. |
console/tracker-client/src/bin/http_tracker_client.rs |
Deletes the deprecated HTTP entry point. |
console/tracker-client/README.md |
Adds the breaking-change notice and updates checker usage. |
console/tracker-client/docs/contracts/tracker-cli-io-contract.md |
Updates the monitor command example. |
Review effort: Balanced
…est the capture Build tracker_client under its own deadline so the check deadline excludes a cold build, bound the output drain after the child ends, return the captured output so tests assert it, and add Arrange-Act-Assert tests for the kill and for a descendant that keeps the pipes open. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…rated examples Use --format text and --ip, and add --format text to the README and checker examples whose output block shows pretty JSON. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ion spec Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…d the completion review Fix the spec frontmatter, keep AC4 open until the container job passes, and record the design-review checkpoint, the prose-first comparison and the retrospective. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
ACK 2d9c9ef |
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 2d9c9ef88d953901c9f5f58dd7b8f2e74a5d829f. Recomputed from the bytes at this head, against the merge base e018ce07b; git merge-tree against develop 5833cdae9 writes a clean tree with no conflict (exit 0), and the 14 develop commits since the merge base touch none of the 17 files.
Process: five commits fast-forward f052b5dfc. Each subject is type(scope): [#N] summary and each body matches its diff. Each commit carries an attribution footer, which no rule in the tree addresses. Author equals committer, git diff --check is clean, the skill's PR-branch commit-id check prints nothing, and the closing-keyword scan matches only Closes #2765.
Audit record: docs/pr-reviews/pr-2901-review/PR-REVIEW.md has one row per thread, all twelve. Each row's reply sits on its own thread, its source review ID matches, its severity equals the source bracket, and its resolution reference is a subject of this PR's commits. All twelve threads are resolved, and the log is in order and records the late start the skill allows. The validator's logic, run offline against the capture with the commit list taken from local git, returns ok (12 rows, 4 log entries, 0 failures). A control with one reply removed fails on that row.
Round-1 findings at this head: F1 to F9 are fixed. The capture, kill and descendant tests fail under the round-1 mutations, the build runs under its own deadline, and V2 records its harness and command. V3's search, rerun verbatim, prints nothing (exit 1). The 2594 spec, the frontmatter, the review records and the README flag are in place. AC4 stays open until the runner-level run, which matches the evidence.
A correction to round 1: I wrote that every rewritten command parsed against the unified CLI, but --format pretty and --peer-addr did not. Another reviewer found them. At this head every flag in the migrated examples parses.
New findings: F13 Minor and F14 Nit; none blocks. They are numbered from F13 because the audit already uses F10 to F12 for the other reviewer's findings.
Checked, no finding: the -- escapes in the checker examples, the retrospective and audit frontmatter against their templates and merged records, the declined process-tree kill (the grace bound and the stated assumption cover the hang), and rustfmt at width 130.
Checks
On the loop's compute node at this head, against the merge base e018ce07b (receipt server-gates-kranich-1049): the repository's pre-commit gate and lint roster exit 0 (149 s wall), and the audit validator passes the record (12 rows, 4 log entries, 0 failures). At 6f932a6fc, whose code this head keeps unchanged (the one later commit adds only the audit record), in a fresh per-PR target directory, cargo test -p torrust-tracker-client -p torrust-tracker passes 370 tests with 0 failed across 24 binaries (gate 1048) and cargo clippy -p torrust-tracker-client -p torrust-tracker --all-targets -- -D warnings is clean. F13 checked against the bytes at posting: src/console/ci/e2e/tracker_checker.rs lines 132-137 collect both streams and then return wait_result? inside the Captured construction, so a deadline error drops what was read. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "Package Coverage (torrust-tracker-client): in_progress/pending; Package Coverage (torrust-tracker): in_progress/pending; Test (Docker) (release): in_progress/pending; Docs Lint: completed/success; Build on macos-latest (nightly): in_progress/pending; Build on windows-latest (nightly): in_progress/pending; Build on ubuntu-latest (nightly): in_progress/pending; Build on windows-latest (stable): in_progress/pending; Build on ubuntu-latest (stable): in_progress/pending; Build on macos-latest (stable): in_progress/pending; Docker E2E: completed/skipped; Workspace Packaging: completed/success; Unit (nightly): in_progress/pending; Unit (stable): in_progress/pending; Shipped Features: completed/success; Layer Boundary Bans: in_progress/pending; Documented Clippy Allows: completed/success; Generate Coverage Report: in_progress/pending; Discover Package Coverage: completed/success". At posting, develop is 5833cdae9.
|
ACK 2d9c9ef — round-1 findings fixed with tests that fail under their mutations, every flag in the migrated examples parses against the unified CLI, and the audit record has a replied, resolved row for each of the twelve threads with the validator's logic passing offline |
…re one drain window Return the captured output even when the wait ended with the deadline, so it is logged, and bound the drain of both pipes by one window instead of two. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
ACK c987a23 |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
ACK 3c9a1ce |
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 3c9a1ce97cf7da45d382b90e502c46def7958381. Recomputed from the bytes at this head, against the merge base e018ce07b; git merge-tree against develop 5833cdae9 writes a clean tree with no conflict (exit 0), and the 14 develop commits since the merge base touch none of the 17 files.
Process: two commits fast-forward 9d06b2ac5, and each matches its subject. Author equals committer, each commit carries an attribution footer (no rule in the tree addresses it), git diff --check is clean, the skill's PR-branch commit-id check prints nothing, and the only closing keyword is Closes #2765.
Findings at this head: F1 to F24 are fixed. F24 is fixed: the byte-delta assertion is gone, and the reply records that it failed in the image test stage (read 34963456 bytes after the drop). The test keeps assert_eq!(load(), after_drop) over a second 300 ms, which still fails without the probe. The 17 helper tests and the 17 prose-first rows match by name.
Audit record: 24 rows, one per thread, and all 24 threads are resolved. The new F24 row cites r4599775490 in review 5938701192, takes the superseding FIXED reply (r4601712393) on its own thread, matches the [Suggestion] bracket and f6813a377's subject, and is RESOLVED. The log adds three entries in order. The validator's logic, run offline against the capture, returns ok (24 rows, 18 log entries, 0 failures).
Findings: none.
Checked, no finding: that the remaining assertion still discriminates (the reader reaches its next probe in well under 1 ms against two 300 ms windows), the NO_ACTION reply superseded by FIXED with the CI failure logged between them, and rustfmt layout.
Checks
On the loop's compute node at this head, against the merge base e018ce07b (receipt server-gates-kranich-1088): the repository's pre-commit gate and lint roster exit 0 (53 s wall), and the audit validator passes the record (24 rows, 18 log entries, 0 failures). At f6813a377, whose code this head keeps unchanged (the one later commit touches only the audit record), in a fresh per-PR target directory, cargo test -p torrust-tracker-client -p torrust-tracker passes 377 tests with 0 failed across 24 binaries (gate 1087) and clippy for both packages is clean. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "Package Coverage (torrust-tracker): in_progress/pending; Package Coverage (torrust-tracker-client): in_progress/pending; Workspace Packaging: completed/success; Docker E2E: completed/skipped; Layer Boundary Bans: completed/success; Unit (stable): completed/cancelled; Unit (nightly): completed/failure; Shipped Features: completed/success; Documented Clippy Allows: completed/success; Test (Docker) (release): in_progress/pending; Generate Coverage Report: in_progress/pending; Discover Package Coverage: completed/success; Build on ubuntu-latest (stable): completed/success; Build on windows-latest (stable): in_progress/pending; Build on macos-latest (nightly): completed/success; Build on macos-latest (stable): completed/success; Build on windows-latest (nightly): in_progress/pending; Build on ubuntu-latest (nightly): completed/success; Docs Lint: completed/success". At posting, develop is 5833cdae9.
|
ACK 3c9a1ce — every finding from F1 to F24 is fixed at this head, the receiver-gone test keeps a check that fails without the probe, and the audit record has a replied, resolved, thread-anchored row for each of the twenty-four threads with the validator's logic passing offline |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open issues
1 resolved since last review
Review effort: Lite
|
ACK 3c9a1ce |
… logged on success Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
ACK 8df465c |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
ACK 510f6f6 |
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 510f6f6c06e02f963642e63a161abffcc57185cf. Recomputed from the bytes at this head, against the merge base e018ce07b; git merge-tree against develop 61e3fedcf writes a clean tree with no conflict (exit 0), and the 86 develop commits since the merge base touch none of the 17 files.
Process: two commits fast-forward 3c9a1ce97, and each matches its subject. Author equals committer, each commit carries an attribution footer (no rule in the tree addresses it), git diff --check is clean, the skill's PR-branch commit-id check prints nothing, and the only closing keyword is Closes #2765.
The change: spawn_reader retries ErrorKind::Interrupted and still ends on other errors, and its new test fails without the retry arm. A successful run logs at most 64 KiB of each stream, cut on a character boundary with both byte counts; a failed or timed-out run logs the whole capture. The other reviewer's thread on the second -- in the checker example is rightly left unchanged: check passes its trailing args through. F1 to F24 stay fixed, and the 20 helper tests and the 20 prose-first rows match by name.
Audit record: 27 rows, one per thread, and all 27 threads are resolved. The new rows F25 to F27 cite r4602057242, r4602057326 and r4602057383 in review 5941767986, each with its reply on its own thread. Their severity is Minor (inferred), because the comments carry no bracket. F25 is NO_ACTION/SUPERSEDED; F26 and F27 are FIXED with 8df465c58's subject. The validator's logic, run offline against the capture, returns ok (27 rows, 20 log entries, 0 failures).
New finding: F28 Nit; it does not block.
Checked, no finding: excerpt (it walks back at most three bytes to a boundary), is_ok_and(ExitStatus::success) on the borrowed status, the Interrupted arm ahead of the catch-all, and the two log entries appended in order.
Checks
On the loop's compute node at this head, against the merge base e018ce07b (receipt server-gates-kranich-1101): the repository's pre-commit gate and lint roster exit 0 (145 s wall), and the audit validator passes the record (27 rows, 20 log entries, 0 failures). At 8df465c58, whose code this head keeps unchanged (the one later commit touches only the audit record), in a fresh per-PR target directory, cargo test -p torrust-tracker-client -p torrust-tracker passes 380 tests with 0 failed across 24 binaries (43 s wall, gate 1100) and clippy for both packages is clean (12 s wall). The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "Package Coverage (torrust-tracker-client): in_progress/pending; Package Coverage (torrust-tracker): in_progress/pending; Docker E2E: completed/skipped; Shipped Features: completed/success; Workspace Packaging: completed/success; Unit (stable): in_progress/pending; Unit (nightly): in_progress/pending; Layer Boundary Bans: completed/success; Documented Clippy Allows: completed/success; Docs Lint: completed/success; Build on windows-latest (nightly): in_progress/pending; Build on windows-latest (stable): in_progress/pending; Build on ubuntu-latest (nightly): completed/success; Build on macos-latest (nightly): completed/success; Build on macos-latest (stable): queued/pending; Build on ubuntu-latest (stable): completed/success; Test (Docker) (release): queued/pending; Generate Coverage Report: in_progress/pending; Discover Package Coverage: completed/success". At posting, develop is 61e3fedcf.
|
ACK 510f6f6 — interrupted reads are retried with a test that fails without the retry, a successful run logs a bounded excerpt cut on a character boundary, and the audit record has a replied, resolved row for each of the twenty-seven threads with the validator's logic passing offline |
|
ACK 510f6f6 |
…ssue e55d948 docs(pr-reviews): [#2765] audit review round 5 of PR 2921 (josecelano-bot) a6cbe59 docs(pr-reviews): [#2765] audit review round 4 of PR 2921 (josecelano-bot) 2a93b54 docs(pr-reviews): [#2765] audit review round 3 of PR 2921 (josecelano-bot) 6617583 docs(issues): [#2765] correct the AC4 wording and two statements of the PR 2921 audit (josecelano-bot) 2f3edbf docs(pr-reviews): [#2765] audit review round 2 of PR 2921 (josecelano-bot) 465aa61 docs(pr-reviews): [#2765] mark the duplicated findings of PR 2921 as re-raises (josecelano-bot) 9fd7358 docs(pr-reviews): [#2765] audit review round 1 of PR 2921 (josecelano-bot) b43c343 docs(issues): [#2765] address the review of the close-out PR (josecelano-bot) 53ee6bc docs(issues): [#2765] close out the deprecated tracker clients issue (josecelano-bot) Pull request description: ## Summary PR #2901 is merged and issue #2765 is closed. This archives the spec to `docs/issues/closed/`, sets row 6 of EPIC #2758 to DONE, and records what the merged PR could not: AC4 is ticked with the container test job as evidence (the job passed on the head that carries the commit `docs(pr-reviews): [#2765] audit review round 7 of PR 2901`, and its log shows the e2e runner building and running `tracker_client check`; the Docker job of the final head of PR 2901 was still in progress when it was merged), the completion review, and the audit row F28 of PR 2901 (a nit the maintainer left, `NO_ACTION`; the durable record of that decision is a comment on this PR). It also adds the audit of this PR, `docs/pr-reviews/pr-2921-review/PR-REVIEW.md`, which records the review rounds of this PR (da2ce7 and Copilot). Docs only: the spec folder moves, the EPIC row, the audit of PR 2901 and the new audit of PR 2921 change. Related to #2765 and #2758. ## Validation - `linter all` exits 0. - `validate-audit-record.py` returns ok for PR 2901 (28 rows, 25 log entries) and for PR 2921 (17 rows, 8 log entries). ACKs for top commit: josecelano: ACK e55d948 Tree-SHA512: f0fc7f623992434df658e21fa6e4f5c536088a22d7b86468322619da2a7ca62799767ce6573d08224efa7773398687039f7b1abb31de3a93e8e6ca3cd3f53e6d


Summary
Removes the deprecated
http_tracker_client,udp_tracker_clientandtracker_checkerbinaries (ADR 20260519000000, section 10: remove, do not migrate). The unifiedtracker_clientreplaces them and keeps reusing their library modules (checks and types), which stay. Part of EPIC #2758, order 6 of 11.Breaking change: anyone still running the old binary names must use
tracker_client udp,tracker_client httportracker_client check. The repo keeps no changelog, so the note is inconsole/tracker-client/README.mdand here.The e2e runner helper
src/console/ci/e2e/tracker_checker.rsnow launchestracker_client check(keepingTORRUST_CHECKER_CONFIG) and captures the child's stdout and stderr instead of inheriting them, so the TTY refusal that issue #2768 adds cannot make the runner panic. Both pipes are drained on threads, absolute deadlines (15 minutes for the build, 5 for the check) bound the waits, and a guard kills and reaps the child on every path.Files touched
console/tracker-client/src/bin/*.rsentry points.console/tracker-client/README.md, the contract doc, the doc comments ofclients/{http,udp,checker}/app.rsandclients/mod.rs,docs/packages.md, the sccache experiment Containerfile.src/console/ci/e2e/tracker_checker.rs(unit tests; the helper buildstracker_clientfirst, then runs the check).docs/issues/open/2765-2758-remove-deprecated-tracker-clients/(progress, ACs,manual-verification-evidence.md).Validation
cargo build --workspace --all-targetspasses;cargo test -p torrust-tracker-clientpasses (the checker tests already runtracker_client check); helper unit tests pass;linter allexits 0.tests/tmp_m2.rsused for V2 was deleted after the run; its code and command are recorded verbatim in the evidence file.tracker_client checkagainst a local tracker) and V2 (helper smoke run) in the evidence file. The full e2e runner needs Docker and was not run; the interactive-terminal case is verified intracker_client: TTY refusal and JSON-only output #2768.Closes #2765