rspec_profiling is enabled for MySQL
It appears that when we enabled the test suite to run against PostgreSQL, the conditional for only activating rspec_profiling for PostgreSQL was wrong.
if ENV.has_key?('CI') && ENV['GITLAB_DATABASE'] == 'postgresql'
RspecProfiling::VCS::Git.prepend(RspecProfilingExt::Git)
RspecProfiling::Run.prepend(RspecProfilingExt::Run)
end
What this does is only prepending two homemade modifications we're doing to track the correct branch name and to avoid failing a job if rspec_profiling cannot connect to the database. This leads to monitoring rows recorded with the HEAD
branch.
The real switch is done in spec/spec_helper.rb
:
rspec_profiling_is_configured =
ENV['RSPEC_PROFILING_POSTGRES_URL'] ||
ENV['RSPEC_PROFILING']
branch_can_be_profiled =
ENV['CI_COMMIT_REF_NAME'] == 'master' ||
ENV['CI_COMMIT_REF_NAME'] =~ /rspec-profile/
if rspec_profiling_is_configured && (!ENV.key?('CI') || branch_can_be_profiled)
require 'rspec_profiling/rspec'
end
Another issue is that the latest commit reported for ce:master
is https://gitlab.com/gitlab-org/gitlab-ce/commit/3855751d024d20a05343141c65aa3b588645dcfa/pipelines which is the last one before we started testing on PostgreSQL...