Skip to main content

tft-request-watch

Wraps Testing Farm CLI with unattended request supervision.

This package can be found

The Copr packages are provided for all active Fedora releases.

The code is tested on the supported Python versions 3.11, 3.12 and 3.13.

Benefits compared to running testing-farm watch directly:

  • Keep polling through temporary API outages.
  • Enforce a hard timeout with automatic cancellation.
  • Automatically retry the whole request when known retriable infrastructure failures appear in result.summary.
  • Restart only the affected plan(s) when a required test task is aborted due to an infrastructure issue.
  • When result.overall is error and a plan has no testcases, inspect tmt-run.log for the same retriable infrastructure failures and restart those plans.

Install

# from Copr
sudo dnf copr enable @cki/tft-request-watch
sudo dnf install tft-request-watch

# from PyPI
pip install tft-request-watch

# from source
pip install git+https://gitlab.com/redhat/centos-stream/tests/kernel/tft-request-watch

Usage

tft-request-watch provides two subcommands: watch and merge.

watch

Wait for a Testing Farm request to finish, restarting on retriable failures.

tft-request-watch watch --request-id YOUR-REQUEST-UUID

The default API base is https://api.dev.testing-farm.io/v0.1; use --api-url to point elsewhere.

Key options:

Option Description
--request-id UUID Request UUID to watch.
--dry-run Skip write operations; log what would have been done.
--result-file PATH Write per-run results JSON to PATH (needed for merge).
--required-task TASK Restart if task is aborted; see below. Repeatable.
--max-restarts N Maximum restart iterations (default: 3).
--hard-timeout-hours H Cancel request after H hours (default: 24).

--required-task TASK restarts affected plans when a task result is error or pending in the XUnit output. Use the test path without the discover alias prefix (e.g. /distribution/install). Can be specified multiple times.

See tft-request-watch watch --help for all options including HTTP retry and timeout tuning.

Result file format

When --result-file is given, a JSON list is written with one entry per run (original + any restarts):

[
  {"id": "uuid-of-original-run", "xunit_url": "https://...", "...": "..."},
  {
    "id": "uuid-of-retry",
    "retry_of": "uuid-of-original-run",
    "restarted_plans": {"x86_64": ["/plans/tier1"]},
    "xunit_url": "https://...",
    "...": "..."
  }
]

restarted_plans identifies which (arch, plan) testsuites in the original XUnit were replaced by the retry, useful for tft-request-watch merge.

merge

Produce a single merged XUnit XML from a --result-file JSON, replacing testsuites that were restarted with the retry results.

tft-request-watch merge result.json merged.xml

Fetches the XUnit XML for every run recorded in result.json. Testsuites annotated via restarted_plans are taken from the retry; all other testsuites are kept from the original run.

tft-request-watch merge --help

Global options

Option Description
--debug Enable DEBUG logging on stderr.
--version Print version and exit.

Development

Installing development dependencies:

pip install -e . --group dev

Running linting/tests:

tox

Releasing

Every push to main automatically:

  • publishes to PyPI via OIDC trusted publishing,
  • creates a GitLab release (tagged v0.42.0, …),
  • builds in Copr @cki/tft-request-watch via Packit.

The version is semver: the major component lives in tft_request_watch/__init__.py and tft-request-watch.spec (keep in sync), the minor is the GitLab pipeline ID, and patch is always 0 (e.g. 1.42.0, 1.43.0). Bump the major version in both files for breaking changes.

The Copr project depends on @testing-farm/stable (for tft-cli) as an external repository, so users only need dnf copr enable @cki/tft-request-watch.

License

GPLv2+ — see LICENSE.

Metadata

Release files for tft-request-watch 1.75.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tft-request-watch 1.75.0
File Size Uploaded Provenance Actions
tft_request_watch-1.75.0.tar.gz 31.0 kB Without provenance Details for tft_request_watch-1.75.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tft-request-watch 1.75.0
File Interpreter ABI Platform Actions
tft_request_watch-1.75.0-py3-none-any.whl Python 3 none any Details for tft_request_watch-1.75.0-py3-none-any.whl

Total release size: 55.0 kB

Release files / tft_request_watch-1.75.0.tar.gz

Download URL tft_request_watch-1.75.0.tar.gz
Size 31.0 kB
Tags Source
SHA-256 checksum
How to use checksums
25fae532bb84396cb11dfd65eb3df1214715e7df4a17190fe7fdd49327001033
BLAKE2b-256 checksum
How to use checksums
239c23edf8efefd545a1e10dec7abb80b92f544ee5c26e1483089ef292d03a09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / tft_request_watch-1.75.0-py3-none-any.whl

Download URL tft_request_watch-1.75.0-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab854eb7afb77ae0c9ed17457af503618f7ead312769ffd43c26fba4754f0fad
BLAKE2b-256 checksum
How to use checksums
669fc65a4fb3058cdfa53221b7e4b1670e83c15c18805fc8a674b3c013db405d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.7

Security for tft-request-watch 1.75.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page