codebar / codebar/planner

Address all the query related exception thrown by Bullet

Open
#1,885 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
104
Forks
205
Avg merge
1d 5h
Merged PRs (30d)
63

Description

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 📋

  • Claim this issue (comment below, or assign yourself if you are part of the codebar org)
  • Fork and clone the repository
  • Update the relevant files. Follow the steps to fix section in this issue.
  • Commit your changes as one commit. Use the title of this issue as your commit message
  • Submit a pull request
  • Mention this issue in the PR description by including it's number
  • Have your pull request reviewed & merged by a codebar team member

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review config/environments/test.rb and the Rails 5 update in pull request #1882, then run the test suite with Bullet exceptions enabled to identify the affected queries. Work through each reported n+1 or eager-loading offence and confirm the tests pass without suppressing Bullet exceptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
backend, databases, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.