codebar / planner

πŸ—“ the main codebar site
https://codebar.io
MIT License
94 stars 194 forks source link

Address all the query related exception thrown by Bullet #1885

Open asideofcode-dev opened 1 year ago

asideofcode-dev commented 1 year ago

Description of the issue πŸ“„

As part of the pull request to update to Rails 5, https://github.com/codebar/planner/pull/1882, Bullet has started throwing exceptions on certain queries. For the moment we have set Bullet.raise = false in config/environments/test.rb. Bullet is still turned on it just logs any offences instead of raising exceptions.

Screenshots πŸ“·

Steps to fix πŸ› 

Methodically go through all queries raising Bullet exceptions, and address the issue. It's almost always something to do with n+1 queries or eager loading.

To do πŸ“‹

gnclmorais commented 1 year ago

Definitely, a long time ago I looked into a few of these queries, while I was trying to update Rails version. Have you heard of query_diet as well? I read some interesting things about it…