Open golddiga opened 5 years ago
Thanks for the detailed report. Is this running mysql or postgres? Can you provide the output of analyzing the query in the rails console? This requires running the same database locally as in production. If you're using sqlite you'll receive an error. Alternatively the output from your local run is fine too.
rails console
require 'shiba/console'
shiba Model.find_something
Console usage is documented at https://github.com/burrito-brothers/shiba#analyze-queries-from-the-developer-console
Also, I see you're running parallel jobs. Is the output for both identical?
Thanks, We are running on mysql 5.6 and there is only one output
The output when running in local is:
2.6.3 :004 > require 'shiba/console'
=> true
2.6.3 :005 > shiba Model.find_something
Severity: high
----------------------------
* Fuzzed Data: Table sizes estimated as follows -- 100000: models
* Table Scan: mysql reads 100% (100000) of the of the rows in **models**, skipping any indexes.
* Results: mysql returns 40.1mb (100000 rows) to the client.
* Estimated query time: 15.69s
=> #<Shiba::Console::ExplainRecord:0x00007f95748c8eb0>: 'SELECT `models`.* FROM `models` WHERE (title like "%something%")'. Call the 'help' method on this object for more info.
I have created a method that clearly is of high severity when I test it with shiba locally. But when pushing this mehtod + specs to CircleCI it returns me that no errors where found in the diff.
The diff includes the problematic lines in
spec/../model_spec.rb
andmodels/model.rb
circleci/config.yml