<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/spec/models/commit_spec.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>Workhorse to send raw diff and patch for commits</title>
<updated>2018-05-16T09:52:43+00:00</updated>
<author>
<name>Zeger-Jan van de Weg</name>
<email>git@zjvandeweg.nl</email>
</author>
<published>2018-05-15T15:05:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=dfdd88151092fde3e32729dd466ad9ba44e158c6'/>
<id>dfdd88151092fde3e32729dd466ad9ba44e158c6</id>
<content type='text'>
Prior to this change, this was done through unicorn. In theory this
could time out. Workhorse has been sending these raw patches and diffs
for a long time and is stable in doing so.

Added bonus is the fact that `Commit#to_patch` can be removed.

`Commit#to_diff` too, which closes
https://gitlab.com/gitlab-org/gitaly/issues/324

Closes https://gitlab.com/gitlab-org/gitaly/issues/1196
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior to this change, this was done through unicorn. In theory this
could time out. Workhorse has been sending these raw patches and diffs
for a long time and is stable in doing so.

Added bonus is the fact that `Commit#to_patch` can be removed.

`Commit#to_diff` too, which closes
https://gitlab.com/gitlab-org/gitaly/issues/324

Closes https://gitlab.com/gitlab-org/gitaly/issues/1196
</pre>
</div>
</content>
</entry>
<entry>
<title>Return nil on empty path</title>
<updated>2018-04-17T14:30:18+00:00</updated>
<author>
<name>Zeger-Jan van de Weg</name>
<email>git@zjvandeweg.nl</email>
</author>
<published>2018-04-17T14:30:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=e02f1271f5784fe7c17a9efae8612999e1e62ee3'/>
<id>e02f1271f5784fe7c17a9efae8612999e1e62ee3</id>
<content type='text'>
The execution path wasn't clear from the error, but either way this is a
fix.

Closes gitlab-org/gitaly#1115
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The execution path wasn't clear from the error, but either way this is a
fix.

Closes gitlab-org/gitaly#1115
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix an order dependency in a spec</title>
<updated>2018-01-29T16:18:31+00:00</updated>
<author>
<name>Nick Thomas</name>
<email>nick@gitlab.com</email>
</author>
<published>2018-01-29T16:18:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=7b276a10764f629393ddac1fbd237d2efb69dfd6'/>
<id>7b276a10764f629393ddac1fbd237d2efb69dfd6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Migrate Commit#uri_type to Gitaly</title>
<updated>2018-01-15T13:16:22+00:00</updated>
<author>
<name>Ahmad Sherif</name>
<email>me@ahmadsherif.com</email>
</author>
<published>2018-01-15T09:39:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f32f04a50f702f7a021e79b17dddc8cc1e3f6d5a'/>
<id>f32f04a50f702f7a021e79b17dddc8cc1e3f6d5a</id>
<content type='text'>
Closes gitaly#915
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes gitaly#915
</pre>
</div>
</content>
</entry>
<entry>
<title>Display related merge requests in commit detail page</title>
<updated>2018-01-12T20:38:36+00:00</updated>
<author>
<name>Hiroyuki Sato</name>
<email>sathiroyuki@gmail.com</email>
</author>
<published>2018-01-12T20:38:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=a7d26f00c35b945199d40332349f463043ae6122'/>
<id>a7d26f00c35b945199d40332349f463043ae6122</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove the Commit#tree method</title>
<updated>2018-01-04T17:00:28+00:00</updated>
<author>
<name>Jacob Vosmaer</name>
<email>jacob@gitlab.com</email>
</author>
<published>2018-01-04T17:00:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ac2cb65ab3dc2688b3a1db9de661dc01ed196177'/>
<id>ac2cb65ab3dc2688b3a1db9de661dc01ed196177</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace '.team &lt;&lt; [user, role]' with 'add_role(user)' in specs</title>
<updated>2017-12-22T08:18:28+00:00</updated>
<author>
<name>blackst0ne</name>
<email>blackst0ne.ru@gmail.com</email>
</author>
<published>2017-12-22T08:18:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=27c95364b52f4e93054c45211010aeb22e40a2b2'/>
<id>27c95364b52f4e93054c45211010aeb22e40a2b2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Load commit in batches for pipelines#index</title>
<updated>2017-12-19T09:05:40+00:00</updated>
<author>
<name>Zeger-Jan van de Weg</name>
<email>git@zjvandeweg.nl</email>
</author>
<published>2017-12-05T13:15:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=c6edae38870a4228e3b964d647b9ef588df11f27'/>
<id>c6edae38870a4228e3b964d647b9ef588df11f27</id>
<content type='text'>
Uses `list_commits_by_oid` on the CommitService, to request the needed
commits for pipelines. These commits are needed to display the user that
created the commit and the commit title.

This includes fixes for tests failing that depended on the commit
being `nil`. However, now these are batch loaded, this doesn't happen
anymore and the commits are an instance of BatchLoader.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Uses `list_commits_by_oid` on the CommitService, to request the needed
commits for pipelines. These commits are needed to display the user that
created the commit and the commit title.

This includes fixes for tests failing that depended on the commit
being `nil`. However, now these are batch loaded, this doesn't happen
anymore and the commits are an instance of BatchLoader.
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimise getting the pipeline status of commits</title>
<updated>2017-11-16T15:01:14+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2017-11-10T19:57:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ab16a6fb34c0f3e4d9afed3332c559868201e606'/>
<id>ab16a6fb34c0f3e4d9afed3332c559868201e606</id>
<content type='text'>
This adds an optimised way of getting the latest pipeline status for a
list of Commit objects (or just a single one).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds an optimised way of getting the latest pipeline status for a
list of Commit objects (or just a single one).
</pre>
</div>
</content>
</entry>
</feed>
