From 9dbf255403cc9c0e8fbc7921c47ad75219b25c69 Mon Sep 17 00:00:00 2001 From: Philipp Thun Date: Mon, 3 Aug 2026 14:57:18 +0200 Subject: [PATCH] Print rerun command for failed parallel_rspec shards Add --verbose-rerun-command to the parallel_rspec invocations so a failing shard prints a copy-pasteable command with its exact file list and seed. This makes order-dependent flakes reproducible locally, since RSpec order depends on both the seed and the shard's file set and the latter was not previously recoverable from CI output. The flag only emits output on failure, so green runs are unaffected. --- lib/tasks/spec.rake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tasks/spec.rake b/lib/tasks/spec.rake index d11a9fae89d..4b86533da8b 100644 --- a/lib/tasks/spec.rake +++ b/lib/tasks/spec.rake @@ -47,6 +47,7 @@ namespace :spec do #{env_vars} bundle exec parallel_rspec \ --test-options '--order rand #{rspec_profile_option} --format progress --format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec_main.log' \ --runtime-log tmp/parallel_runtime_rspec_main.log \ + --verbose-rerun-command \ --single spec/integration/ \ --single spec/acceptance/ \ --isolate \ @@ -61,6 +62,7 @@ namespace :spec do #{env_vars} bundle exec parallel_rspec \ --test-options '--order rand #{rspec_profile_option} --format progress --format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec_migrations.log' \ --runtime-log tmp/parallel_runtime_rspec_migrations.log \ + --verbose-rerun-command \ -- spec/migrations CMD sh command