`e2e_tests_runner` and `qbittorrent_e2e_runner`: JSON diagnostics

Open
#2,769 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
cli, testing

Research direction

Read the two ADRs named in the issue and the full specification expected under docs/issues/open/. Start with src/console/ci/e2e/runner.rs and the runners in packages/e2e-tools/src/bin/ and src/console/ci/{e2e,qbittorrent_e2e}/; the issue also names src/console/ci/e2e/logs_parser.rs as a dependency. Update the relevant output tests and docs; done means both runners leave stdout empty, emit only JSON lines on stderr, and use exit codes 1 for failures and 2 for usage errors.

Written by the indexing model from the issue text.

Description

Part of EPIC #2758. Order 10 of 11, wave 2.

Goal

The two e2e runners are compliant no-stdout-result programs: empty stdout, NDJSON diagnostics on stderr, exit 0/1/2.

Background

Depends on the daemon logging change (EPIC issue 7), which edits src/console/ci/e2e/logs_parser.rs. src/console/ci/e2e/runner.rs initializes tracing_subscriber::fmt() (stdout, plain text) and both runners return anyhow::Result from main, so a failure prints Error: <debug text> and exits 1. The runners are in packages/e2e-tools/src/bin/ and src/console/ci/{e2e,qbittorrent_e2e}/.

The contract in short: see the ADRs docs/adrs/20260519000000_define_global_cli_output_contract.md and docs/adrs/20261106102632_scope_the_cli_output_contract_and_keep_exit_codes_to_zero_one_two.md.

In scope

  • tracing to stderr as JSON; nothing on stdout.
  • Failures as one JSON record with a kind; usage errors exit 2.
  • Update tests and docs that show the runner output.

Out of scope

  • Changing what the runners test.
  • profiling (developer-only).

Acceptance criteria

  • Both runners write nothing to stdout.
  • Every stderr line is JSON.
  • A failure exits 1 with a kind; a usage error exits 2.

The full specification (implementation plan, verification plan, files this issue may touch) is added by the spec PR under docs/issues/open/.

Dominant language
Rust
Stars
532
Forks
56
Avg merge
11h 20m
Merged PRs (30d)
282

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from torrust/torrust-tracker

All issues in torrust/torrust-tracker

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.