Skip to content

Commit

Permalink
docs(predict): troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
3v0k4 committed Feb 10, 2025
1 parent 0b078c3 commit b58d23a
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions docusaurus/docs/ruby/predict.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ pagination_next: null
pagination_prev: null
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# PREDICT

:::caution
Expand Down Expand Up @@ -66,3 +69,47 @@ You can expect the following behaviour:
* `Gemfile` or `Gemfile.lock` were modified
* The current commit message contains `[skip predict]` / `[predict skip]`
* The per-test coverage does not exist on the Knapsack Pro API (e.g., just enabled the feature)

## Troubleshooting

### Sidekiq throws a segmentation fault

The latest patch versions of Sidekiq are affected by an [issue](https://github.com/sidekiq/sidekiq/issues/6502) that causes segmentation faults.

On CI, before running your tests you can downgrade to the latest patch that works correctly:

```ruby
bundle config --local deployment false # "Unfreezes" the lock file. May not be necessary.
bundle remove sidekiq && bundle add sidekiq --version=7.3.2
```

### Using with Coverage or SimpleCov

If you are executing `Coverage` or [`SimpleCov`](https://github.com/simplecov-ruby/simplecov) before Knapsack Pro, enable both line and eval coverage:

<Tabs>
<TabItem value="simplecov" label="SimpleCov">

```ruby
require 'simplecov'
SimpleCov.start do
# line coverage is the default
enable_coverage_for_eval
end

require 'knapsack_pro'
# ...
```

</TabItem>
<TabItem value="coverage" label="Coverage">

```ruby
Coverage.start(lines: true, eval: true)

require 'knapsack_pro'
# ...
```

</TabItem>
</Tabs>

0 comments on commit b58d23a

Please sign in to comment.