Skip to content

Send files for bisection over DRb instead of ARGV

gitlab-qa-bot requested to merge github/fork/al2o3cr/fix_2145 into master

Created by: al2o3cr

(Addresses #2145 (closed))

When bisecting a large set of specs, the maximum argument length for open3 can be exceeded. To work around this issue, pass the list of files and directories via the DRb connection.

There are a couple things that I'm not entirely happy with in this:

  • some of the specs didn't make as much sense anymore. In particular, it wasn't clear to me what spec/rspec/core/bisect/runner_spec.rb:226 should be checking now that files aren't passed on the command line.
  • the bisect mechanism isn't particularly isolated from the rest of the system. The check in Rspec::Core::Configuration#files_or_directories_to_run works but seems messy.
  • run_formatter_specs sets up an odd not-entirely-realistic scenario (files passed on the command line AND via DRb). Cleaning that up would require a sizable refactor of that helper method.
  • client vs server naming is not clear. I can't decide if introducing RSpec::Core::Bisect::Client makes the situation worse or better.
  • there are now two slightly-different ways to specify the spec files to be run over DRb (via the --drb switch and via the bisect plumbing added here). They serve distinct purposes, so I'm unsure if the duplication is a problem or not.

A more significant refactor might solve some of these issues. Perhaps instead of --files-over-drb, a flag like --bisect-client that activates an alternative runner? That runner could handle setting the formatter to bisect and pulling files from DRb.

Merge request reports