Query Reporting: Record the database queries issued during an rspec run
requested to merge 368739-query-reporting-record-the-database-queries-issued-during-an-rspec-run into master
What does this MR do and why?
This is the smallest possible piece of beginning to record queries during rspec runs.
Only enabled in development and test, and only when CI=true
, and simply records the raw SQL to an NDJSON log file in the rspec/
folder for future consumption by CI pipelines.
Part of AQA: Record all queries during test runs (&8441 - closed)
How to set up and validate locally
- Run an rspec test that queries the database with the CI variable set:
env CI=true bin/rspec spec/finders/user_finder_spec.rb:18
- Check the log file:
cat rspec/query_recorder.ndjson
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #368739 (closed)
Edited by Matt Kasa