Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a replication command on failed node #228

Closed
kholbekj opened this issue Oct 30, 2023 · 2 comments
Closed

Create a replication command on failed node #228

kholbekj opened this issue Oct 30, 2023 · 2 comments
Labels

Comments

@kholbekj
Copy link

Hey there,

I don't know if I'm missing something, but I'm finding it very hard to replicate a failing CI node locally.

We have a flaky test, and would like to track it down, but am unsure how to get all the right information.

Would it be possible to (optionally?) have a command output on failing tests that could be used to run it locally?

@ArturT
Copy link
Member

ArturT commented Oct 30, 2023

If you are using Knapsack Pro in Queue Mode for RSpec then you can see the copy&paste command that you can use to run tests locally. It's at the end of the output for executing each batch of tests fetched from Queue API. The command uses the same RSpec seed number that you were using to run tests. Please ensure you are running the latest version of the knapsack_pro gem.

To make it work you need to use the debug log level (it's a default, KNAPSACK_PRO_LOG_LEVEL=debug).
https://docs.knapsackpro.com/ruby/reference/#knapsack_pro_log_level

You can also find info how to reproduce tests locally here if you need to run tests using Regular or Queue Mode locally.
https://docs.knapsackpro.com/ruby/troubleshooting/#debug-knapsack-pro-on-your-development-environmentmachine

@ArturT
Copy link
Member

ArturT commented Feb 23, 2024

We have released version 7.0.0 of the knapsack_pro gem. This version has many improvements in Queue Mode for RSpec.

It also produces the RSpec copy & paste command that you can use to reproduce tests executed on a given CI node.

@kholbekj Please update the knapsack_pro gem version.

Please find the migration steps at the following link:
https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md#700

@ArturT ArturT closed this as completed Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants