Commit fb130c7e authored by Tiger Watson's avatar Tiger Watson

Merge branch 'sh-disable-prepending-marginalia-in-dev-mode' into 'master'

Only prepend Marginalia comments in production mode

See merge request gitlab-org/gitlab!55242
parents 5215d4d8 5b043801
...@@ -8,7 +8,11 @@ require 'marginalia' ...@@ -8,7 +8,11 @@ require 'marginalia'
# query. Prepending the comment allows us to trace the source of the # query. Prepending the comment allows us to trace the source of the
# query without having to increase the `track_activity_query_size` # query without having to increase the `track_activity_query_size`
# parameter. # parameter.
Marginalia::Comment.prepend_comment = true unless Rails.env.test? # Some tests do string matching against raw SQL #
# We only enable this in production because a number of tests do string
# matching against the raw SQL, and prepending the comment prevents color
# coding from working in the development log.
Marginalia::Comment.prepend_comment = true if Rails.env.production?
Marginalia::Comment.components = [:application, :controller, :action, :correlation_id, :jid, :job_class] Marginalia::Comment.components = [:application, :controller, :action, :correlation_id, :jid, :job_class]
# As mentioned in https://github.com/basecamp/marginalia/pull/93/files, # As mentioned in https://github.com/basecamp/marginalia/pull/93/files,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment