knapsack_pro-ruby icon indicating copy to clipboard operation
knapsack_pro-ruby copied to clipboard

Feature requests(adding --seed & --bisect to rspec debug command)

Open partounian opened this issue 3 years ago • 1 comments

Could you please add the --seed #{seed_number} and --bisect so we don't have to manually add these flags to debug the CI?

partounian avatar Aug 06 '21 20:08 partounian

Hi @partounian

Basically, you would like the seed number to be automatically added to the below message:

I, [2021-08-06T22:43:53.827804 #47352]  INFO -- : [knapsack_pro] To retry in development the subset of tests fetched from API queue please run below command on your machine. If you use --order random then remember to add proper --seed 123 that you will find at the end of rspec command.
I, [2021-08-06T22:43:53.827920 #47352]  INFO -- : [knapsack_pro] bundle exec rspec --format d  --default-path spec "spec/controllers/dashboard/pending_controller_spec.rb"

We would need to figure out how to extract the seed number from RSpec. I'm not sure if RSpec provides a way for that. This should be a good starting point if you would like to help with this.

I'm wondering should we always add the bisect option? Maybe not every user wants to use it? Docs for bisect. https://relishapp.com/rspec/rspec-core/docs/command-line/bisect

ArturT avatar Aug 06 '21 20:08 ArturT

@partounian displaying of the relevant --seed option has been added in the 3.4.1 version.

shadre avatar Oct 26 '22 13:10 shadre

I was wondering, maybe adding the --bisect option should be a user decision, not the knapsack_pro gem doing it by default. I can imagine someone wants to just retry tests without the bisect option.

@partounian Is adding --bisect option still something you find useful and needed? Or it's not needed, and we could close this issue for now.

ArturT avatar Nov 07 '22 22:11 ArturT

Hey,

Sadly I haven't been using Ruby since my last job so I don't have a need for this.

partounian avatar Nov 08 '22 00:11 partounian