gitlab-org--gitlab-foss/lib
Yorick Peterse 19428e8008
Preload pipeline data for project pipelines
When displaying the pipelines of a project we now preload the following
data:

1. Authors of the commits that belong to these pipelines
2. The number of warnings per pipeline, which is used by
   Ci::Pipeline#has_warnings?

== Commit Authors

Previously this data was queried for every Commit separately, leading to
20 SQL queries being executed in the worst case. With an average of 3 to
5 milliseconds per SQL query this could result in 100 milliseconds being
spent in _just_ getting Commit authors.

To preload this data Commit#author now uses BatchLoader (through
Commit#lazy_author), and a separate module
Gitlab::Ci::Pipeline::Preloader is used to ensure all authors are loaded
before they are used.

== Number of warnings

This changes Ci::Pipeline#has_warnings? so it supports preloading of the
number of warnings per pipeline. This removes the need for executing a
COUNT(*) query for every pipeline just to see if it has any warnings or
not.
2018-05-17 13:53:00 +02:00
..
api Merge branch 'jprovazn-remote-upload-destroy' into 'master' 2018-05-16 20:29:21 +00:00
assets
backup Describe workaround when restore fails because of Errno::EBUSY 2018-04-23 17:24:29 +02:00
banzai Fix commit trailer rendering when Gravatar is disabled 2018-04-25 17:32:51 +02:00
bitbucket Moved o_auth/saml/ldap modules under gitlab/auth 2018-02-28 16:53:02 +01:00
constraints [CE] Add Naming/FileName rule checking expected class/module per filename 2018-03-08 12:56:54 +00:00
container_registry Setup Faraday middleware before adapter 2018-03-16 19:05:29 +08:00
declarative_policy Resolve "Make a Rubocop that forbids returning from a block" 2018-04-18 09:19:40 +00:00
generators/rails/post_deployment_migration Fix timestamp to include %M instead of %I for post-deploy migrations. 2018-03-12 18:24:36 +01:00
gitaly
gitlab Preload pipeline data for project pipelines 2018-05-17 13:53:00 +02:00
google_api Fix provider server URL used when listing repos to import 2018-03-12 16:01:43 -05:00
haml_lint [CE] Add Naming/FileName rule checking expected class/module per filename 2018-03-08 12:56:54 +00:00
json_web_token
mattermost Fixing request options to allow_local_requests with DELETE verb 2018-03-21 20:35:42 +01:00
microsoft_teams Merge branch 'fj-15329-services-callbacks-ssrf' into 'security-10-6' 2018-03-21 14:39:21 +00:00
omni_auth/strategies Ports omniauth-jwt gem onto GitLab OmniAuth Strategies suite 2018-04-26 10:13:29 +01:00
peek Show Ajax requests in performance bar 2018-03-19 19:06:09 +00:00
rouge Add CommonMark markdown engine 2018-03-07 23:14:41 +11:00
rspec_flaky Improve the architecture of RspecFlaky classes by introducing a new RspecFlaky::Report class 2018-04-10 15:38:40 +02:00
support
system_check Route path lookups through legacy_disk_path 2018-03-21 18:18:32 +01:00
tasks Clean up test.rake 2018-05-14 18:53:57 +11:00
additional_email_headers_interceptor.rb
after_commit_queue.rb
banzai.rb
carrier_wave_string_file.rb
declarative_policy.rb [CE] Add Naming/FileName rule checking expected class/module per filename 2018-03-08 12:56:54 +00:00
disable_email_interceptor.rb
email_template_interceptor.rb
event_filter.rb
expand_variables.rb
extracts_path.rb
feature.rb
file_size_validator.rb
forever.rb Handle limit for datetime attributes on MySQL 2018-04-06 22:28:44 -05:00
gitlab.rb Merge branch 'osw-backport-dev-env-check-for-storage-settings-deprecation' into 'master' 2018-04-25 08:31:32 +00:00
gt_one_coercion.rb
milestone_array.rb
static_model.rb
system_check.rb
unfold_form.rb
uploaded_file.rb Add direct_upload setting for artifacts 2018-04-05 15:01:14 +02:00
version_check.rb