<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/app/controllers/explore, branch api-docs-fix</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>Precalculate trending projects</title>
<updated>2016-10-10T10:27:08+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2016-10-07T13:24:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=237c8f66e6608420629503280aaea555ee980022'/>
<id>237c8f66e6608420629503280aaea555ee980022</id>
<content type='text'>
This commit introduces a Sidekiq worker that precalculates the list of
trending projects on a daily basis. The resulting set is stored in a
database table that is then queried by Project.trending.

This setup means that Unicorn workers no longer _may_ have to calculate
the list of trending projects. Furthermore it supports filtering without
any complex caching mechanisms.

The data in the "trending_projects" table is inserted in the same order
as the project ranking. This means that getting the projects in the
correct order is simply a matter of:

    SELECT projects.*
    FROM projects
    INNER JOIN trending_projects ON trending_projects.project_id = projects.id
    ORDER BY trending_projects.id ASC;

Such a query will only take a few milliseconds at most (as measured on
GitLab.com), opposed to a few seconds for the query used for calculating
the project ranks.

The migration in this commit does not require downtime and takes care of
populating an initial list of trending projects.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit introduces a Sidekiq worker that precalculates the list of
trending projects on a daily basis. The resulting set is stored in a
database table that is then queried by Project.trending.

This setup means that Unicorn workers no longer _may_ have to calculate
the list of trending projects. Furthermore it supports filtering without
any complex caching mechanisms.

The data in the "trending_projects" table is inserted in the same order
as the project ranking. This means that getting the projects in the
correct order is simply a matter of:

    SELECT projects.*
    FROM projects
    INNER JOIN trending_projects ON trending_projects.project_id = projects.id
    ORDER BY trending_projects.id ASC;

Such a query will only take a few milliseconds at most (as measured on
GitLab.com), opposed to a few seconds for the query used for calculating
the project ranks.

The migration in this commit does not require downtime and takes care of
populating an initial list of trending projects.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor TrendingProjectsFinder to support caching</title>
<updated>2016-10-05T14:39:03+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2016-10-04T12:09:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=154253cab55491d54dfe264fa946acb9c399398a'/>
<id>154253cab55491d54dfe264fa946acb9c399398a</id>
<content type='text'>
== Public Projects

This finder class now _only_ returns public projects. Previously this
finder would also return private and internal projects. Including these
projects makes caching data much harder and less efficient. Meanwhile
including this data isn't very useful as very few users would be
interested in seeing projects they have access to as trending. That is,
the feature is more useful when you want to see what _other_ popular
projects there are.

== Caching

The data returned by TrendingProjectsFinder is now cached for a day
based on the number of months the data should be restricted to. The
cache is not flushed explicitly, instead it's rebuilt whenever it
expires.

== Timings

To measure the impact I changed the finder code to use the last 24
months instead of the last month. I then executed and measured 10
requests to the explore page. On the current "master" branch (commit
88fa5916ffa0aea491cd339272ed7437c3f52dc7) this would take an average of
2.43 seconds. Using the changes of this commit this was reduced to
around 1.7 seconds.

Fixes gitlab-org/gitlab-ce#22164
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
== Public Projects

This finder class now _only_ returns public projects. Previously this
finder would also return private and internal projects. Including these
projects makes caching data much harder and less efficient. Meanwhile
including this data isn't very useful as very few users would be
interested in seeing projects they have access to as trending. That is,
the feature is more useful when you want to see what _other_ popular
projects there are.

== Caching

The data returned by TrendingProjectsFinder is now cached for a day
based on the number of months the data should be restricted to. The
cache is not flushed explicitly, instead it's rebuilt whenever it
expires.

== Timings

To measure the impact I changed the finder code to use the last 24
months instead of the last month. I then executed and measured 10
requests to the explore page. On the current "master" branch (commit
88fa5916ffa0aea491cd339272ed7437c3f52dc7) this would take an average of
2.43 seconds. Using the changes of this commit this was reduced to
around 1.7 seconds.

Fixes gitlab-org/gitlab-ce#22164
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace reject_blocked with reject_blocked! in callbacks.</title>
<updated>2016-07-27T19:56:30+00:00</updated>
<author>
<name>Connor Shea</name>
<email>connor.james.shea@gmail.com</email>
</author>
<published>2016-07-27T19:43:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=b1c94754436e4c15529276a61d601f72bb53c2b2'/>
<id>b1c94754436e4c15529276a61d601f72bb53c2b2</id>
<content type='text'>
In Rails 4.2 and below, skipping callbacks (skip_before_action, skip_after_action, etc.) that use methods which do not exist will not throw any errors.

On the other hand, Rails 5 does. See https://github.com/rails/rails/pull/19029

After testing with Rails 5 I noticed there are some methods that don't actually exist (because they were renamed, usually), this fixes a few instances of those.

reject_blocked! was introduced in c9def945d4222eeb8026a0311495259bf99267a1, I can't find any references to reject_blocked ever existing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In Rails 4.2 and below, skipping callbacks (skip_before_action, skip_after_action, etc.) that use methods which do not exist will not throw any errors.

On the other hand, Rails 5 does. See https://github.com/rails/rails/pull/19029

After testing with Rails 5 I noticed there are some methods that don't actually exist (because they were renamed, usually), this fixes a few instances of those.

reject_blocked! was introduced in c9def945d4222eeb8026a0311495259bf99267a1, I can't find any references to reject_blocked ever existing.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into issue_12658</title>
<updated>2016-03-21T22:22:21+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@selenight.nl</email>
</author>
<published>2016-03-21T22:22:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ae7b2ef62cdf61c990f914d776a6fdfc2bc49fa2'/>
<id>ae7b2ef62cdf61c990f914d776a6fdfc2bc49fa2</id>
<content type='text'>
# Conflicts:
#	app/models/issue.rb
#	app/views/projects/_home_panel.html.haml
#	app/views/shared/projects/_project.html.haml
#	db/schema.rb
#	spec/models/project_spec.rb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
# Conflicts:
#	app/models/issue.rb
#	app/views/projects/_home_panel.html.haml
#	app/views/shared/projects/_project.html.haml
#	db/schema.rb
#	spec/models/project_spec.rb
</pre>
</div>
</content>
</entry>
<entry>
<title>Use the configured Kaminari "per page" default</title>
<updated>2016-03-19T21:37:54+00:00</updated>
<author>
<name>Robert Speicher</name>
<email>rspeicher@gmail.com</email>
</author>
<published>2016-03-19T21:37:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=085538c2bd817fc083ee9e42c9fdd7f74fc48ecb'/>
<id>085538c2bd817fc083ee9e42c9fdd7f74fc48ecb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge 4009-external-users into issue_12658</title>
<updated>2016-03-16T23:16:42+00:00</updated>
<author>
<name>Felipe Artur</name>
<email>felipefac@gmail.com</email>
</author>
<published>2016-03-16T23:16:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=44c127447b5a3cfc7aaea6f19e18baf9f42ad500'/>
<id>44c127447b5a3cfc7aaea6f19e18baf9f42ad500</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add permission level to groups</title>
<updated>2016-03-10T13:38:36+00:00</updated>
<author>
<name>Felipe Artur</name>
<email>felipefac@gmail.com</email>
</author>
<published>2016-03-01T15:22:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f2a9ee258e0ee3a6fe0cb614e4b73c56dcd7339d'/>
<id>f2a9ee258e0ee3a6fe0cb614e4b73c56dcd7339d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow filtered dashboard/explore results to be paged. Fixes #14104</title>
<updated>2016-03-10T02:03:28+00:00</updated>
<author>
<name>Josh Frye</name>
<email>joshfng@gmail.com</email>
</author>
<published>2016-03-10T01:58:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=449954ecc2ad0c1796b2949b79b56329c6ce2447'/>
<id>449954ecc2ad0c1796b2949b79b56329c6ce2447</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add option to show archived projects on dahsboard</title>
<updated>2016-03-04T18:25:28+00:00</updated>
<author>
<name>Dmitriy Zaporozhets</name>
<email>dmitriy.zaporozhets@gmail.com</email>
</author>
<published>2016-03-04T15:11:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=acb211215c30244612eae6219539ced4a071b0dc'/>
<id>acb211215c30244612eae6219539ced4a071b0dc</id>
<content type='text'>
Signed-off-by: Dmitriy Zaporozhets &lt;dmitriy.zaporozhets@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Dmitriy Zaporozhets &lt;dmitriy.zaporozhets@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MR feedback</title>
<updated>2016-02-09T15:10:41+00:00</updated>
<author>
<name>Josh Frye</name>
<email>joshfng@gmail.com</email>
</author>
<published>2016-02-09T01:34:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=120dca0f35a09110a9eeb3e4b93b998eca0ecb69'/>
<id>120dca0f35a09110a9eeb3e4b93b998eca0ecb69</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
