Skip to content

ci: rebalance integration shards, tighten retries, drop unused coverage#17

Open
appflowy wants to merge 3 commits into
mainfrom
ci/optimize-flutter-shards
Open

ci: rebalance integration shards, tighten retries, drop unused coverage#17
appflowy wants to merge 3 commits into
mainfrom
ci/optimize-flutter-shards

Conversation

@appflowy

@appflowy appflowy commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Implements the CI wall-clock optimizations from reviewing run 28731719779, where shard durations spread 16.3–31.5+ min and everything gates on the slowest shard.

Merge after AppFlowy-IO/AppFlowy-Premium#1123, which adds the per-test retry (dart_test.yaml) this PR's tighter retry wrapper relies on.

Changes

  • Run desktop_runner_16: the file exists in the app repo but the matrix stopped at 15, so its tests (BDD database, reminder, duplicate-view) silently never ran in CI.
  • Drop --coverage from integration and cloud integration tests — the lcov output was never uploaded or consumed, and instrumentation slows the test step.
  • Per-shard timing artifacts: --file-reporter json: output uploaded as integration-test-timing-N (7-day retention), for analyzing shard balance when repacking desktop_runner_N.dart files.
  • Retry wrapper 3×60min → 2×40min: flaky tests now retry individually inside the binary (app repo dart_test.yaml), so whole-shard reruns are only an infra-failure safety net. Previously one flaky test at minute 25 silently added 25+ min to the run.
  • flutter_analyze as its own job: dart format + flutter analyze ran inside prepare-linux/prepare-macos before the artifact upload, so all 17+ downstream test jobs waited on them. They now run in parallel with the tests.

Expected effect

Critical path drops from prepare-linux (+analyze) → slowest-shard (up to 3×) to prepare-linux → slowest-shard (≤2×, usually 1×), and the timing artifacts make shard rebalancing data-driven going forward.

🤖 Generated with Claude Code

appflowy and others added 3 commits July 5, 2026 15:24
- Run desktop_runner_16 (existed in the app repo but was missing from
  the matrix, so its BDD database/reminder tests never ran in CI).
- Drop --coverage from integration and cloud integration tests; the
  lcov output was never uploaded or read, and instrumentation slows
  the test step measurably.
- Emit package:test JSON timing per shard (--file-reporter) and upload
  it as an artifact, so shards can be rebalanced from real durations
  with rebalance_integration_shards.py in the app repo.
- Reduce the whole-shard retry wrapper to 2 attempts / 40 min; flaky
  tests now retry individually via dart_test.yaml (retry: 2) instead
  of re-running an entire 15-25 min shard.
- Move dart format + flutter analyze out of prepare-linux/macos into a
  dedicated flutter_analyze job so the 17 downstream test jobs stop
  waiting on it before the artifact upload.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant