From 4bfd3ba7adbb508c3af0caa0f575528e8c0468c1 Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Tue, 10 Nov 2026 22:05:39 +0000 Subject: [PATCH 1/2] ci: clear stale qBittorrent container in e2e The e2e job never removed its fixed-name qBittorrent container, so every run since late August failed on the name conflict. Remove a leftover first, tear down on any outcome, and serialise runs. The config is now copied in rather than bind-mounted, since the bind path is resolved on the runner host, not in the job container. Co-Authored-By: Claude Opus 5.5 (1M context) --- .gitea/workflows/e2e.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/e2e.yml b/.gitea/workflows/e2e.yml index 90c0163..fe0a090 100644 --- a/.gitea/workflows/e2e.yml +++ b/.gitea/workflows/e2e.yml @@ -18,6 +18,12 @@ on: - 'crates/arr-daemon/**' - '.gitea/workflows/e2e.yml' +# The qBittorrent container below has a fixed name and binds the runner host's +# port 8080, so two runs at once would trip over each other. +concurrency: + group: arr-e2e + cancel-in-progress: false + env: CARGO_TERM_COLOR: always CARGO_PROFILE_DEV_DEBUG: "0" @@ -77,7 +83,13 @@ jobs: # variable for the WebUI password and prints a random one per boot, # so the only scriptable login is a config seeded before first start, # which a service container cannot be given. + # + # `docker` here talks to the runner host's daemon, so a bind mount + # would name a host path this job never wrote. The config is copied + # in instead. A container left by a run that died before teardown is + # removed first; the name is fixed, so it would block every run after. run: | + docker rm -f arr-e2e-qbittorrent >/dev/null 2>&1 || true mkdir -p /tmp/qbt/config/qBittorrent cat > /tmp/qbt/config/qBittorrent/qBittorrent.conf <<'CONF' [Preferences] @@ -88,14 +100,18 @@ jobs: WebUI\HostHeaderValidation=false Downloads\SavePath=/downloads CONF - docker run -d --name arr-e2e-qbittorrent --network host \ + docker create --name arr-e2e-qbittorrent --network host \ -e PUID=1000 -e PGID=1000 -e WEBUI_PORT=8080 \ - -v /tmp/qbt/config:/config \ linuxserver/qbittorrent:latest + docker cp /tmp/qbt/config/. arr-e2e-qbittorrent:/config/ + docker start arr-e2e-qbittorrent for _ in $(seq 1 60); do - curl -sf http://127.0.0.1:8080/api/v2/app/version && break + curl -sf http://127.0.0.1:8080/api/v2/app/version && exit 0 sleep 2 done + echo "qBittorrent never answered" >&2 + docker logs arr-e2e-qbittorrent >&2 || true + exit 1 - name: build daemon # The harness spawns this binary; building it here keeps the compile @@ -107,3 +123,7 @@ jobs: env: QBITTORRENT_URL: http://127.0.0.1:8080 run: cargo nextest run -p arr-e2e + + - name: stop qBittorrent + if: always() + run: docker rm -f arr-e2e-qbittorrent >/dev/null 2>&1 || true -- 2.47.3 From 9d67c44649d27e06fe1fbccd8fb16c540cce09d8 Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Tue, 10 Nov 2026 22:08:01 +0000 Subject: [PATCH 2/2] test(e2e): turn subtitle providers off for health The seed enables OpenSubtitles and the e2e daemon has no credentials for it, so the health report is degraded by design. The test is about the core upstreams. Co-Authored-By: Claude Opus 5.5 (1M context) --- crates/arr-e2e/tests/e2e.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/crates/arr-e2e/tests/e2e.rs b/crates/arr-e2e/tests/e2e.rs index 3a4c273..6374f2a 100644 --- a/crates/arr-e2e/tests/e2e.rs +++ b/crates/arr-e2e/tests/e2e.rs @@ -30,6 +30,31 @@ async fn daemon_runs_against_fakes_and_a_real_qbittorrent() { let daemon = Daemon::spawn(&prowlarr.url(), &tmdb.url(), &qbittorrent_url()).await; let base = daemon.base_url(); + // The seed enables OpenSubtitles, and this daemon has no credentials for + // it, which the health report rightly calls degraded. Nothing here is + // about subtitles, so turn the providers off. + let client = reqwest::Client::new(); + let mut settings: serde_json::Value = client + .get(format!("{base}/api/settings/subtitles")) + .send() + .await + .expect("read subtitle settings") + .json() + .await + .expect("subtitle settings json"); + settings["providers_enabled"] = serde_json::json!([]); + let saved = client + .put(format!("{base}/api/settings/subtitles")) + .json(&settings) + .send() + .await + .expect("save subtitle settings"); + assert!( + saved.status().is_success(), + "{}", + saved.text().await.unwrap_or_default() + ); + let health = daemon.health().await; assert_eq!(health["status"], "ok", "health report: {health}"); assert_eq!(health["prowlarr"]["status"], "ok"); -- 2.47.3