<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/app/models/commit.rb, branch bootstrap-markdown-code-highlight</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Preload pipeline data for project pipelines</title>
<updated>2018-05-17T11:53:00+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2018-05-07T16:22:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=19428e800895ba20eacb3357285acef8d69f6d8c'/>
<id>19428e800895ba20eacb3357285acef8d69f6d8c</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'blackst0ne-rails5-add-touch-later-to-commit-model' into 'master'</title>
<updated>2018-05-02T08:03:10+00:00</updated>
<author>
<name>Rémy Coutable</name>
<email>remy@rymai.me</email>
</author>
<published>2018-05-02T08:03:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=da50984bdee0a69364bcb354a7f7c461bf31bf3d'/>
<id>da50984bdee0a69364bcb354a7f7c461bf31bf3d</id>
<content type='text'>
[Rails5] Add `touch_later` to `Commit` model

See merge request gitlab-org/gitlab-ce!18642</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Rails5] Add `touch_later` to `Commit` model

See merge request gitlab-org/gitlab-ce!18642</pre>
</div>
</content>
</entry>
<entry>
<title>Merge request and commit discussions API</title>
<updated>2018-05-01T12:39:44+00:00</updated>
<author>
<name>Jan Provaznik</name>
<email>jprovaznik@gitlab.com</email>
</author>
<published>2018-05-01T12:39:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=7a76caa5a8d2c6be9aa4b698a8919e223df973d3'/>
<id>7a76caa5a8d2c6be9aa4b698a8919e223df973d3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Rails5] Add `touch_later` to `Commit` model</title>
<updated>2018-04-29T06:23:59+00:00</updated>
<author>
<name>blackst0ne</name>
<email>blackst0ne.ru@gmail.com</email>
</author>
<published>2018-04-29T06:23:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=68c75bc0f9f279602c5269569fb892b4ed243403'/>
<id>68c75bc0f9f279602c5269569fb892b4ed243403</id>
<content type='text'>
This commit fixes errors like:

```
1) API::Todos GET /todos when unauthenticated returns authentication error
    Failure/Error: @raw.__send__(method, *args, &amp;block) # rubocop:disable GitlabSecurity/PublicSend

    NoMethodError:
      undefined method `touch_later' for #&lt;Gitlab::Git::Commit:0x00005573f5196270&gt;
    # ./app/models/commit.rb:259:in `method_missing'
    # ./spec/requests/api/todos_spec.rb:12:in `block (2 levels) in &lt;top (required)&gt;'
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit fixes errors like:

```
1) API::Todos GET /todos when unauthenticated returns authentication error
    Failure/Error: @raw.__send__(method, *args, &amp;block) # rubocop:disable GitlabSecurity/PublicSend

    NoMethodError:
      undefined method `touch_later' for #&lt;Gitlab::Git::Commit:0x00005573f5196270&gt;
    # ./app/models/commit.rb:259:in `method_missing'
    # ./spec/requests/api/todos_spec.rb:12:in `block (2 levels) in &lt;top (required)&gt;'
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix N+1 queries when loading participants for a commit note</title>
<updated>2018-04-19T05:04:22+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2018-04-19T05:02:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=775211bc7076bba14d6e268fb324391124a2751f'/>
<id>775211bc7076bba14d6e268fb324391124a2751f</id>
<content type='text'>
We saw about 10,000 SQL queries for some commits in the NewNoteWorker,
which stalled the Sidekiq queue for other new notes. The notification
service took up to 8 minutes to process the commits. Avoiding this
N+1 query brings the time down significantly.

Closes #45526
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We saw about 10,000 SQL queries for some commits in the NewNoteWorker,
which stalled the Sidekiq queue for other new notes. The notification
service took up to 8 minutes to process the commits. Avoiding this
N+1 query brings the time down significantly.

Closes #45526
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for patch link extension for commit links on GFM</title>
<updated>2018-04-06T15:53:14+00:00</updated>
<author>
<name>Oswaldo Ferreira</name>
<email>oswaldo@gitlab.com</email>
</author>
<published>2018-04-06T15:13:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=4dd1f906fd60bebd433dc9c4b5879c1e575fb735'/>
<id>4dd1f906fd60bebd433dc9c4b5879c1e575fb735</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add banzai filter to detect commit message trailers and properly link the users</title>
<updated>2018-04-04T15:04:03+00:00</updated>
<author>
<name>Omar Mekky</name>
<email>alphaengine@gmail.com</email>
</author>
<published>2018-04-04T15:04:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=a069aa494a71450f3a6627b723bd5312bbf20133'/>
<id>a069aa494a71450f3a6627b723bd5312bbf20133</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Send notification emails when push to a merge request</title>
<updated>2018-03-26T12:24:52+00:00</updated>
<author>
<name>YarNayar</name>
<email>YarTheGreat@gmail.com</email>
</author>
<published>2017-07-25T11:56:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=99b01e23598e6b0b2bcae891939ea28c67f7b2e9'/>
<id>99b01e23598e6b0b2bcae891939ea28c67f7b2e9</id>
<content type='text'>
Closes #23460
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #23460
</pre>
</div>
</content>
</entry>
<entry>
<title>Lazy fetch parent commits for a commit</title>
<updated>2018-03-06T13:32:53+00:00</updated>
<author>
<name>Zeger-Jan van de Weg</name>
<email>git@zjvandeweg.nl</email>
</author>
<published>2018-03-05T09:37:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=1e08d00032c1160202567dacdf24c3b47458d86c'/>
<id>1e08d00032c1160202567dacdf24c3b47458d86c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fetch commit signatures from Gitaly in batches</title>
<updated>2018-03-01T17:31:31+00:00</updated>
<author>
<name>Ahmad Sherif</name>
<email>me@ahmadsherif.com</email>
</author>
<published>2018-02-28T16:56:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=03f3350f3f679122ce4ceacfc840db6e77763dea'/>
<id>03f3350f3f679122ce4ceacfc840db6e77763dea</id>
<content type='text'>
Closes gitaly#1046
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes gitaly#1046
</pre>
</div>
</content>
</entry>
</feed>
