Plan: Exclude chaos_monkey_test.dart from regular CI (TestBackend) #505

Closed
opened 2026-06-06 19:34:19 +00:00 by guettlibot · 1 comment
guettlibot commented 2026-06-06 19:34:19 +00:00 (Migrated from codeberg.org)

Problem

TestBackend in ci/main.go:542 runs flutter test --concurrency=1 test/backend which includes all files in test/backend/, including chaos_monkey_test.dart. This means the chaos monkey test runs on every push and pull_request via the regular check-dagger step — even though it is slow (30 random IMAP/SMTP rounds) and inherently flaky.

A dedicated chaos-monkey.yml workflow already runs the ChaosMonkeyBackend Dagger function on a daily schedule (0 3 * * *). The issue is that TestBackend unintentionally also picks it up.

Confirmed by CI run #1861 failing in the chaos monkey step during a normal PR check.

Plan

  1. Add @Tags(['nightly']) at the top of test/backend/chaos_monkey_test.dart (inside main(), or as a file-level tag).
  2. In ci/main.go TestBackend (line 542), add --exclude-tags=nightly to the flutter test command.
  3. In ci/main.go ChaosMonkeyBackend (line 573), add --tags=nightly to ensure it still exercises the test.
  4. Run task check-dagger locally to confirm chaos monkey no longer runs in regular CI.
  5. Run task chaos-monkey-backend to confirm the nightly path still works.

Outcome

Chaos monkey runs only via the nightly chaos-monkey.yml schedule, not on every PR push.

## Problem `TestBackend` in `ci/main.go:542` runs `flutter test --concurrency=1 test/backend` which includes **all** files in `test/backend/`, including `chaos_monkey_test.dart`. This means the chaos monkey test runs on every push and pull_request via the regular `check-dagger` step — even though it is slow (30 random IMAP/SMTP rounds) and inherently flaky. A dedicated `chaos-monkey.yml` workflow already runs the `ChaosMonkeyBackend` Dagger function on a daily schedule (`0 3 * * *`). The issue is that `TestBackend` unintentionally also picks it up. Confirmed by CI run [#1861](https://codeberg.org/guettli/sharedinbox/actions/runs/1861) failing in the chaos monkey step during a normal PR check. ## Plan 1. Add `@Tags(['nightly'])` at the top of `test/backend/chaos_monkey_test.dart` (inside `main()`, or as a file-level tag). 2. In `ci/main.go` `TestBackend` (line 542), add `--exclude-tags=nightly` to the `flutter test` command. 3. In `ci/main.go` `ChaosMonkeyBackend` (line 573), add `--tags=nightly` to ensure it still exercises the test. 4. Run `task check-dagger` locally to confirm chaos monkey no longer runs in regular CI. 5. Run `task chaos-monkey-backend` to confirm the nightly path still works. ## Outcome Chaos monkey runs only via the nightly `chaos-monkey.yml` schedule, not on every PR push.
guettlibot commented 2026-06-07 00:47:28 +00:00 (Migrated from codeberg.org)

The PR has been created at https://codeberg.org/guettli/sharedinbox/pulls/518.

Here's what I did to fix issue #505:

Changes made:

  1. test/backend/chaos_monkey_test.dart — Added a @Tags(['nightly']) library-level annotation. This marks every test in the file with the nightly tag, which Flutter's test runner uses for tag-based filtering.

  2. ci/main.goTestBackend — Added --exclude-tags=nightly to the flutter test command. This ensures that when TestBackend runs all files in test/backend/, it skips the chaos monkey test.

  3. ci/main.goChaosMonkeyBackend — Added --tags=nightly to its flutter test command. This ensures the nightly chaos-monkey.yml workflow still runs the chaos monkey test as intended.

The result: chaos monkey only runs via the dedicated nightly schedule, not on every PR push.

The PR has been created at https://codeberg.org/guettli/sharedinbox/pulls/518. Here's what I did to fix issue #505: **Changes made:** 1. **`test/backend/chaos_monkey_test.dart`** — Added a `@Tags(['nightly'])` library-level annotation. This marks every test in the file with the `nightly` tag, which Flutter's test runner uses for tag-based filtering. 2. **`ci/main.go` — `TestBackend`** — Added `--exclude-tags=nightly` to the `flutter test` command. This ensures that when `TestBackend` runs all files in `test/backend/`, it skips the chaos monkey test. 3. **`ci/main.go` — `ChaosMonkeyBackend`** — Added `--tags=nightly` to its `flutter test` command. This ensures the nightly `chaos-monkey.yml` workflow still runs the chaos monkey test as intended. The result: chaos monkey only runs via the dedicated nightly schedule, not on every PR push.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: guettli/sharedinbox#505