<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/app/models/service.rb, branch api-shared-groups</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>Added Bugzilla as external issue tracker option</title>
<updated>2016-06-29T10:01:54+00:00</updated>
<author>
<name>Tim</name>
<email>tgaudette88@gmail.com</email>
</author>
<published>2016-06-26T17:36:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=bc313deaae2fae3e5532a28245fe72fcf9aef9a6'/>
<id>bc313deaae2fae3e5532a28245fe72fcf9aef9a6</id>
<content type='text'>
Requested in #14669

Added note to changelog
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Requested in #14669

Added note to changelog
</pre>
</div>
</content>
</entry>
<entry>
<title>Set inverse_of for Project/Services relation</title>
<updated>2016-06-15T16:54:23+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2016-06-08T16:10:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=8a9164bf04fe20bfee9ea7923c655f4600e88c7f'/>
<id>8a9164bf04fe20bfee9ea7923c655f4600e88c7f</id>
<content type='text'>
This ensures that code such as this don't run needless SQL queries:

    project.gitlab_issue_tracker_service.project

This also means that if the root `project` eager loads any associations
the Service object will be able to re-use those.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This ensures that code such as this don't run needless SQL queries:

    project.gitlab_issue_tracker_service.project

This also means that if the root `project` eager loads any associations
the Service object will be able to re-use those.
</pre>
</div>
</content>
</entry>
<entry>
<title>Cache the presence of an issue_tracker at project level</title>
<updated>2016-06-10T13:41:56+00:00</updated>
<author>
<name>Paco Guzman</name>
<email>pacoguzmanp@gmail.com</email>
</author>
<published>2016-06-03T08:21:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=136a4ea39bb82d7e88b79a3bb7b2f3b4a5ec42ab'/>
<id>136a4ea39bb82d7e88b79a3bb7b2f3b4a5ec42ab</id>
<content type='text'>
Using update_column to store the boolean flag to avoid
any side effects with the current state of the project
instance
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using update_column to store the boolean flag to avoid
any side effects with the current state of the project
instance
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove the annotate gem and delete old annotations</title>
<updated>2016-05-09T16:00:28+00:00</updated>
<author>
<name>Jeroen van Baarsen</name>
<email>jeroenvanbaarsen@gmail.com</email>
</author>
<published>2016-05-09T16:00:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f1479b56b71bef63517b90fcde99e6508e9c54af'/>
<id>f1479b56b71bef63517b90fcde99e6508e9c54af</id>
<content type='text'>
In 8278b763d96ef10c6494409b18b7eb541463af29 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.

Fixes: #17382
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 8278b763d96ef10c6494409b18b7eb541463af29 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.

Fixes: #17382
</pre>
</div>
</content>
</entry>
<entry>
<title>Annotate the models</title>
<updated>2016-05-06T06:27:46+00:00</updated>
<author>
<name>Zeger-Jan van de Weg</name>
<email>zegerjan@gitlab.com</email>
</author>
<published>2016-05-04T17:42:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=47da013cf83b4a42fc9f4b049d8ba41dc3f325d2'/>
<id>47da013cf83b4a42fc9f4b049d8ba41dc3f325d2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add slack notifications for wiki pages</title>
<updated>2016-04-20T00:25:40+00:00</updated>
<author>
<name>Sebastian Klier</name>
<email>sebastian@sebastianklier.com</email>
</author>
<published>2016-02-28T07:26:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=54661d3d44a7d98ed52680b074b2caed7aa33676'/>
<id>54661d3d44a7d98ed52680b074b2caed7aa33676</id>
<content type='text'>
update changelog
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
update changelog
</pre>
</div>
</content>
</entry>
<entry>
<title>Greatly improve external_issue_tracker performance</title>
<updated>2016-01-19T13:03:20+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2016-01-19T12:48:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=b4ee6f57b9322401d1439eb21f9160ae2cb91d14'/>
<id>b4ee6f57b9322401d1439eb21f9160ae2cb91d14</id>
<content type='text'>
This greatly improves the performance of Project#external_issue_tracker
by moving most of the fields queried in Ruby to the database and letting
the database handle all logic. Prior to this change the process of
finding an external issue tracker was along the lines of the following:

1. Load all project services into memory.
2. Reduce the list to only services where "issue_tracker?" returns true
3. Reduce the list from step 2 to service where "default?" returns false
4. Find the first service where "activated?" returns true

This has to two big problems:

1. Loading all services into memory only to reduce the list down to a
   single item later on is a waste of memory (and slow timing wise).
2. Calling Array#select followed by Array#reject followed by Array#find
   allocates extra objects when this really isn't needed.

To work around this the following service fields have been moved to the
database (instead of being hardcoded):

* category
* default

This in turn means we can get the external issue tracker using the
following query:

    SELECT *
    FROM services
    WHERE active IS TRUE
    AND default IS FALSE
    AND category = 'issue_tracker'
    AND project_id = XXX
    LIMIT 1

This coupled with memoizing the result (just as before this commit)
greatly reduces the time it takes for Project#external_issue_tracker to
complete. The exact reduction depends on one's environment, but locally
the execution time is reduced from roughly 230 ms to only 2 ms (= a
reduction of almost 180x).

Fixes gitlab-org/gitlab-ce#10771
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This greatly improves the performance of Project#external_issue_tracker
by moving most of the fields queried in Ruby to the database and letting
the database handle all logic. Prior to this change the process of
finding an external issue tracker was along the lines of the following:

1. Load all project services into memory.
2. Reduce the list to only services where "issue_tracker?" returns true
3. Reduce the list from step 2 to service where "default?" returns false
4. Find the first service where "activated?" returns true

This has to two big problems:

1. Loading all services into memory only to reduce the list down to a
   single item later on is a waste of memory (and slow timing wise).
2. Calling Array#select followed by Array#reject followed by Array#find
   allocates extra objects when this really isn't needed.

To work around this the following service fields have been moved to the
database (instead of being hardcoded):

* category
* default

This in turn means we can get the external issue tracker using the
following query:

    SELECT *
    FROM services
    WHERE active IS TRUE
    AND default IS FALSE
    AND category = 'issue_tracker'
    AND project_id = XXX
    LIMIT 1

This coupled with memoizing the result (just as before this commit)
greatly reduces the time it takes for Project#external_issue_tracker to
complete. The exact reduction depends on one's environment, but locally
the execution time is reduced from roughly 230 ms to only 2 ms (= a
reduction of almost 180x).

Fixes gitlab-org/gitlab-ce#10771
</pre>
</div>
</content>
</entry>
<entry>
<title>Annotate models</title>
<updated>2016-01-06T13:09:55+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2016-01-06T02:30:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=79c0e7212af0a6b0243bc0512a75eb936fb8d862'/>
<id>79c0e7212af0a6b0243bc0512a75eb936fb8d862</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Migrate CI::Project to Project</title>
<updated>2015-12-11T17:02:09+00:00</updated>
<author>
<name>Kamil Trzcinski</name>
<email>ayufan@ayufan.eu</email>
</author>
<published>2015-12-04T11:55:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=e80e3f5372d6bcad1fbe04a85b3086bb66794828'/>
<id>e80e3f5372d6bcad1fbe04a85b3086bb66794828</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix indentation and BuildsEmailService</title>
<updated>2015-12-11T17:01:57+00:00</updated>
<author>
<name>Kamil Trzcinski</name>
<email>ayufan@ayufan.eu</email>
</author>
<published>2015-12-11T17:01:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=8b4cdc50fca816b4f56f8579e17c4dba836ec797'/>
<id>8b4cdc50fca816b4f56f8579e17c4dba836ec797</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
