Commit graph

24 commits

Author SHA1 Message Date
Jacopo
0ce6785851 Replaces tag: true into :tag in the specs
Replaces all the explicit include metadata syntax in the specs (tag:
true) into the implicit one (:tag).
Added a cop to prevent future errors and handle autocorrection.
2017-10-07 13:57:54 +02:00
Phil Hughes
9f32276454
Add context tabs to dashboard/projects
This allows users to quickly switch between all projects they have
access to & there own namespace projects. These tabs also keep
the same filtering/search options selected so the user can quickly
switch between the two different contexts.

Closes #29045
2017-09-22 12:12:15 +01:00
Yorick Peterse
83355336dd
Rework how recent push events are retrieved
Whenever you push to a branch GitLab will show a button to create a
merge request (should one not exist already). The underlying code to
display this data was quite inefficient. For example, it involved
multiple slow queries just to figure out what the most recent push event
was.

This commit changes the way this data is retrieved so it's much faster.
This is achieved by caching the ID of the last push event on every push,
which is then retrieved when loading certain pages. Database queries are
only executed if necessary and the cached data is removed automatically
once a merge request has been created, or 2 hours after being stored.

A trade-off of this approach is that we _only_ track the last event.
Previously if you were to push to branch A and B then create a merge
request for branch B we'd still show the widget for branch A. As of this
commit this is no longer the case, instead we will only show the widget
for the branch you pushed to most recently. Once a merge request exists
the widget is no longer displayed. Alternative solutions are either too
complex and/or too slow, hence the decision was made to settle for this
trade-off.

Performance Impact
------------------

In the best case scenario (= a user didn't push anything for more than 2
hours) we perform a single Redis GET per page. Should there be cached
data we will run a single (and lightweight) SQL query to get the
event data from the database. If a merge request already exists we will
run an additional DEL to remove the cache key.

The difference in response timings can vary a bit per project. On
GitLab.com the 99th percentile of time spent in User#recent_push hovers
between 100 milliseconds and 1 second, while the mean hovers around 50
milliseconds. With the changes in this MR the expected time spent in
User#recent_push is expected to be reduced down to just a few
milliseconds.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/35990
2017-09-08 00:46:16 +02:00
Sean McGivern
4ae8e20c9c Merge branch 'events-migration-cleanup' into 'master'
Finish migration to the new events setup

Closes #37241

See merge request !13932
2017-09-07 15:33:54 +00:00
Yorick Peterse
235b105c91
Finish migration to the new events setup
This finishes the procedure for migrating events from the old format
into the new format. Code no longer uses the old setup and the database
tables used during the migration process are swapped, with the old table
being dropped.

While the database migration can be reversed this will 1) take a lot of
time as data has to be coped around 2) won't restore data in the
"events.data" column as we have no way of restoring this.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37241
2017-09-06 16:40:31 +02:00
Robert Speicher
366ebe8b13 Fix failures introduced by Capybara upgrade 2017-09-05 10:12:12 -04:00
Robert Speicher
72a7b30c9f Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
Robert Speicher
9513bd18c4 Ensure all project factories use :repository trait or :empty_project 2017-08-01 14:51:52 -04:00
Alexander Randa
1c84f668bc Replaces dashboard/dashboard.feature spinach with rspec 2017-07-17 11:16:41 +03:00
Paul Charlton
cb3b4a15e6 Support multiple Redis instances based on queue type 2017-07-11 03:35:47 +00:00
Robert Speicher
eef068754a Merge branch 'master' into rs-sign_in 2017-07-06 12:43:51 -04:00
Robert Speicher
9eeba8fb49 Auto-correct ProjectPathHelper violations 2017-07-06 12:20:50 -04:00
Douwe Maan
fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Robert Speicher
e939bf7be1 Change gitlab_sign_in to sign_in where possible 2017-06-29 12:18:23 -04:00
Alexander Randa
af89b19d69 Replaces 'dashboard/new-project.feature' spinach with rspec 2017-06-29 16:56:36 +03:00
Ruben Davila
a89c1bf645 Fix application error when Project#last_activity_at is nil 2017-06-26 00:42:44 -05:00
Robert Speicher
45fb1f9542 Change login_as uses to gitlab_sign_in 2017-06-19 18:59:01 -05:00
Ruben Davila
44affff387 Use last_activity_at attr when showing the update date in project listing 2017-06-03 21:40:59 -05:00
blackst0ne
74253f0134 Replace 'starred_projects.feature' spinach test with an rspec analog 2017-05-28 19:29:52 +11:00
Alexis Reigel
dfc2542f55 use full caps RSS instead of rss 2017-05-24 22:29:59 +02:00
Alexis Reigel
6efe9c2f14 atom links with rss token instead of private token 2017-05-24 22:29:59 +02:00
Bob Van Landuyt
47abf00b24 Update project build status cache when transitioning 2017-04-07 17:24:11 +02:00
Bob Van Landuyt
56f6c6ac16 Test showing pipelines on the dashboard 2017-03-16 12:31:27 +01:00
Michael Kozono
a2670ee06b Show public RSS feeds to anonymous users 2017-02-28 12:50:57 -08:00