feat(qbittorrent-e2e): add qBittorrent E2E runner with Docker Compose orchestration#1707
Conversation
…ion in torrent polling Add --keep-containers flag to runner for post-run debugging (skips automatic RAII teardown) Fix race condition: replace immediate list_torrents with polling loop (500ms intervals, configurable timeout) Both clients now reliably show ≥1 torrent before runner proceeds Update issue spec with completion checklist, pending tasks, and implementation notes All linting checks pass; runner exits code 0 with verified torrent uploads
There was a problem hiding this comment.
Pull request overview
Adds a new qBittorrent-based end-to-end smoke runner intended to validate the seeder→tracker→leecher flow using a Docker Compose stack, alongside reusable compose orchestration utilities and supporting docs/scripts.
Changes:
- Introduces a Rust E2E runner (
qbittorrent_e2e_runner) that builds a local tracker image, starts a Compose stack, authenticates to both qBittorrent WebUIs, uploads a torrent, and polls until it appears. - Adds a reusable
DockerComposewrapper with aRunningComposeRAII guard to ensuredocker compose down --volumesruns on drop (unless--keep-containersis set). - Adds debugging shell scripts + documentation, and wires in the new spec/doc references and dependencies.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/console/ci/qbittorrent/runner.rs | Main orchestration logic for workspace setup, compose lifecycle, WebUI login, torrent creation/upload, and polling. |
| src/console/ci/qbittorrent/qbittorrent_client.rs | Minimal reqwest client for qBittorrent WebUI API (login, add torrent, list torrents) with CSRF header handling. |
| src/console/ci/qbittorrent/mod.rs | Exposes the qbittorrent CI module. |
| src/console/ci/mod.rs | Registers new compose and qbittorrent CI modules. |
| src/console/ci/compose.rs | New wrapper around docker compose commands + RAII teardown guard. |
| src/bin/qbittorrent_e2e_runner.rs | Tokio-enabled binary entry point with rustdoc usage/behavior documentation. |
| compose.qbittorrent-e2e.yaml | Compose stack definition for tracker + seeder + leecher using bind mounts + ephemeral host ports. |
| contrib/dev-tools/debugging/qbt/qbittorrent-login-probe.sh | Standalone script to probe qBittorrent WebUI login/CSRF header behavior. |
| contrib/dev-tools/debugging/qbt/check-qbittorrent-e2e-compose.sh | Standalone script to validate the compose stack wiring and port publishing. |
| contrib/dev-tools/debugging/qbt/README.md | Readme describing qBittorrent debugging helpers. |
| contrib/dev-tools/debugging/README.md | Top-level debugging tools index/readme. |
| docs/issues/1706-1525-02-qbittorrent-e2e.md | Updates the issue spec with current status, acceptance criteria checkboxes, and follow-up work. |
| docs/issues/1525-overhaul-persistence.md | Updates persistence EPIC doc to point at the renamed spec path. |
| docs/issues/1525-08-add-postgresql-driver.md | Updates references to the renamed spec path. |
| Cargo.toml | Adds dependencies needed by the runner/client (base64, pbkdf2, sha1/sha2, tempfile) and enables reqwest multipart. |
| Cargo.lock | Locks new/updated dependency graph for added crates/features. |
| project-words.txt | Adds new domain/tooling words to the spellchecker dictionary. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1707 +/- ##
===========================================
- Coverage 86.44% 82.55% -3.90%
===========================================
Files 288 323 +35
Lines 22693 24334 +1641
Branches 22693 24334 +1641
===========================================
+ Hits 19617 20088 +471
- Misses 2842 3987 +1145
- Partials 234 259 +25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rackerConfigBuilder
…ketAddr bind addresses
… artifact builder
…download_completes
…nctions in filesystem_setup
… to enforce tracker-only peer discovery
- Add `label()` accessor to `QbittorrentClient` - Remove `client_name: &str` parameter from step functions; steps now derive the label from `client.label()` internally - Convert all log calls to structured tracing fields (client=, torrent=, progress=, state=, torrent_count=, bytes=, torrent_file=) - Add structured milestone events in `seeder_to_leecher_transfer`: scenario_start, seeder_ready, download_started, download_finished, scenario_passed
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 61 out of 62 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ce URL handling - Add InvalidFileName error type and TryFrom<String> impl for FileName to reject path separators and '..' at construction time - Simplify WebUiBaseUrl by dropping host/scheme fields; use hardcoded localhost constants (WEBUI_HEADER_HOST, WEBUI_HEADER_SCHEME) - Change webui_headers() to associated fn (no longer needs &self) - Remove stale /announce suffix from udp_announce_url_for_compose_service - Remove stale --tracker-config-template flag doc from binary header - Fix typo 'Continuos' -> 'Continuous' in ci module doc - Update issue spec: mark GitHub Actions integration criteria as done - Fix leecher credentials in qBittorrent debugging README
|
ACK d9fa45c |
Summary
Completes the qBittorrent end-to-end smoke test implementation.
Closes #1706.
What Was Delivered
compose.qbittorrent-e2e.yaml: Docker Compose configuration for a complete tracker-seeder-leecher stack.src/console/ci/compose.rs: A robust Rust wrapper for Docker Compose operations with automatic cleanup.src/console/ci/qbittorrent/:runner.rs: Full E2E orchestration (build, start, verify, cleanup).qbittorrent_client.rs: WebUI API client with CSRF and authentication handling.src/bin/qbittorrent_e2e_runner.rs: CLI tool to run the E2E tests.contrib/dev-tools/debugging/qbt/: Diagnostic scripts for manual debugging.How to Test
Run the full end-to-end test using Cargo:
To keep containers alive after the run for debugging:
Prerequisites: Docker and
docker-composemust be installed and running.