Commit Graph
80 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets 2fa3acaa43 Merge branch 'advanced-cache' into 'master'
Advanced cache

Fixes #1993

* Build missing cache values in background job after each push
* Store commit_count in project table. Refresh in background job
* moved repository size calculation in background job


## Advantages

Every time push is triggered - we build cache for project even without user visiting project page. 
That means first visit is as fast as others now. This is especially good for active projects where people have some requests fast because of cache and some slow - because cache was build in their request. 

Between cache expired and cache built we we had gap when Linux repo can give 502 error because calculation commits count takes 30 seconds or even more. 
Using value from database fix this problem. Before cache is updated you see old value from database. After - you see new one. 

Basically this merge request is super win to GitLab. We don't do some heavy operations in user request but instead in background job. 

## Temporary problem

After this migration all projects will have `0` commits in database. It fill be replaced with real value on next push. I did not add recalculation to migration because it will last forever on big instances.  Can be fixed by adding rake task which will go in background on live instance without downtime

See merge request !986
2015-07-17 17:22:13 +02:00
Sytse SijbrandijandValery Sizov f8547fb90f Revert "Change default admin password from "5iveL!fe" to "password""
This reverts commit 8a01a12228.
2015-07-15 11:54:13 +03:00
Robert Speicher 8a01a12228 Change default admin password from "5iveL!fe" to "password" 2015-06-24 18:42:34 -04:00
Robert Speicher 9789b56a31 Update ffaker gem
Adds a version requirement which it didn't have before, at 2.0.0. This
version has breaking API changes in that the namespace is now `FFaker`
instead of `Faker`.
2015-05-20 19:22:00 -04:00
Dmitriy Zaporozhets 27e3b47b7f Fix user fixtures for development 2015-03-08 17:35:49 -07:00
Dmitriy Zaporozhets 2c893cb380 Fix dev fixture for admin 2015-02-17 00:23:09 -08:00
Ciro Santilli faab452af9 Remove unneeded password_confirmation from seed. 2014-12-28 14:42:15 +01:00
Dmitriy Zaporozhets 223e509f70 Merge pull request #7894 from cirosantilli/fix-dev-user-seed
Fix dev user seed: ID was used twice.
2014-12-20 20:18:15 +02:00
Dmitriy Zaporozhets f56541de9a Revert "Create dev fixture projects with fixed visibility"
This reverts commit a9fadce361.
2014-11-10 16:17:04 +02:00
Ciro Santilli a9fadce361 Create dev fixture projects with fixed visibility 2014-10-26 11:34:50 +01:00
Dmitriy Zaporozhets 32d0bf3afd Fix snippets seeds
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-16 16:50:09 +03:00
Ciro Santilli 083f1e2f13 Fix dev user seed: multiple ID was used twice. 2014-09-30 23:23:18 +02:00
Ciro Santilli 789b427592 Fix dev merge seed: update testme to gitlab-test. 2014-09-30 17:34:46 +02:00
Dmitriy Zaporozhets efcac2befc Merge pull request #7873 from cirosantilli/testme-to-gitlabtest
Replace testme with gitlab-test.
2014-09-29 19:49:59 +03:00
Dmitriy Zaporozhets 0a1176d62d Merge pull request #7897 from cirosantilli/predictable-merge-requests-dev-seed
Add predictable merge requests on dev seed.
2014-09-29 17:46:08 +03:00
Ciro Santilli 1ba26184eb Add predictable merge requests on dev seed. 2014-09-29 13:55:31 +02:00
Ciro Santilli a963e8c293 Prevent email sending on admin dev seed. 2014-09-29 13:38:54 +02:00
Ciro Santilli b49dd2c573 Replace testme with gitlab-test. 2014-09-27 10:11:20 +02:00
Dmitriy Zaporozhets e4bc359841 Fix dev fixtures
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-18 20:19:11 +03:00
Sytse Sijbrandij 07061b672c Link to the canonical repos. 2014-09-10 12:40:13 +02:00
Jacob Vosmaer b0435576df Fetch the testme repository from gitlab.com
The repository was removed from github.com/gitlabhq.
2014-09-10 12:22:47 +02:00
Ciro Santilli 57fddea8bb Add users with predictable username and password
to development seed.
2014-09-01 13:48:35 +02:00
Dmitriy Zaporozhets 2804902cfc Improve developer seeds
* Improt projects inline so after seeds you have repos
* Fix merge request seeds
* Add comment seeds to both issues and merge requests
* Remove some projects from seeds to increase speed

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-11 17:55:31 +03:00
Dmitriy Zaporozhets 3cc2c6ef79 Remove outdated seeds
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-11 16:01:07 +03:00
Dmitriy Zaporozhets c86962e098 Change deafult admin email to example.com 2014-07-19 14:27:01 +03:00
Marin Jankovski c83004a0f1 Remove milestone observer from db fixture. 2014-06-20 12:01:22 +02:00
Dmitriy Zaporozhets 600f4c6894 Fix snippet dev fixtures
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-14 12:36:31 +03:00
Dmitriy Zaporozhets f5c4bda8fe Improve MR seeds
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-05 15:07:19 +03:00
Dmitriy Zaporozhets 4f670fbe9c Create seed projects with different visibility
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-05 14:30:50 +03:00
Hiroyuki Sato 0ed2f8ded9 Fix rake db:seed_fu ENV=development
This problem was reported on https://gitlab.com/gitlab-org/cookbook-gitlab/issues/46
2014-04-09 11:02:45 +09:00
Ciro Santillli 6672d6492f Start development Key seed id from 1. 2014-03-23 23:49:22 +01:00
Dmitriy Zaporozhets 39f80884db Improve developer seeds
Return execution of observers in seeds.
Mute email sending to letter opening in you browser.
Added `rake dev` task to reset db and add seeds.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-15 11:39:35 +02:00
Dmitriy Zaporozhets 6e73b208a9 Add comments fixtures for development
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-15 10:23:48 +02:00
Dmitriy Zaporozhets 4710897c0d Add testme repo for dev seeds
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-28 10:06:17 +02:00
Dmitriy Zaporozhets 136316a92d Fix group ownership for dev seeds
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-25 10:44:29 +02:00
Marin Jankovski 5e08f8134e Replace context with service in development seed data. 2014-01-23 10:09:19 +01:00
skv a3f645ef51 Remove deprecated finders 2014-01-19 23:39:56 +04:00
Dmitriy Zaporozhets 34f994b7c5 Improve dev fixtures
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-25 09:56:39 +02:00
Dmitriy Zaporozhets 60e2a6563d Add description to issues, projects in development fixtures 2013-10-17 12:27:09 +03:00
Angus MacArthur aefe2e952f Fixing unsafe use of Thread.current variable :current_user 2013-10-16 01:20:53 -04:00
Dmitriy Zaporozhets f4733b0026 Confirm seed users 2013-10-15 12:23:25 +03:00
Dmitriy Zaporozhets cc4b638c34 Set iid in fixtures. Add rake dev:setup for development 2013-08-26 13:20:45 +03:00
Dmitriy Zaporozhets b5593683af Mars theme for generated admin account 2013-08-26 13:06:41 +03:00
Dmitriy Zaporozhets 0d715bcd81 Merge branch 'mr-on-fork' of https://github.com/karlhungus/gitlabhq into karlhungus-mr-on-fork
Conflicts:
	app/views/projects/commit/show.html.haml
	app/views/projects/compare/show.html.haml
	app/views/projects/merge_requests/branch_from.js.haml
2013-07-30 13:35:33 +03:00
Dmitriy Zaporozhets b1fbd65832 Improve UI for project snippets 2013-07-18 13:21:56 +03:00
Dmitriy Zaporozhets bbb06e504e Add seeds and improve ui. Remove snippet expires_at 2013-07-18 13:08:48 +03:00
Izaak AlpertandIzaak Alpert 3d7194f011 Merge Request on forked projects
The good:

 - You can do a merge request for a forked commit and it will merge properly (i.e. it does work).
 - Push events take into account merge requests on forked projects
 - Tests around merge_actions now present, spinach, and other rspec tests
 - Satellites now clean themselves up rather then recreate

The questionable:

 - Events only know about target projects
 - Project's merge requests only hold on to MR's where they are the target
 - All operations performed in the satellite

The bad:

  -  Duplication between project's repositories and satellites (e.g. commits_between)

(for reference: http://feedback.gitlab.com/forums/176466-general/suggestions/3456722-merge-requests-between-projects-repos)

Fixes:

Make test repos/satellites only create when needed
-Spinach/Rspec now only initialize test directory, and setup stubs (things that are relatively cheap)
-project_with_code, source_project_with_code, and target_project_with_code now create/destroy their repos individually
-fixed remote removal
-How to merge renders properly
-Update emails to show project/branches
-Edit MR doesn't set target branch
-Fix some failures on editing/creating merge requests, added a test
-Added back a test around merge request observer
-Clean up project_transfer_spec, Remove duplicate enable/disable observers
-Ensure satellite lock files are cleaned up, Attempted to add some testing around these as well
-Signifant speed ups for tests
-Update formatting ordering in notes_on_merge_requests
-Remove wiki schema update
Fixes for search/search results
-Search results was using by_project for a list of projects, updated this to use in_projects
-updated search results to reference the correct (target) project
-udpated search results to print both sides of the merge request

Change-Id: I19407990a0950945cc95d62089cbcc6262dab1a8
2013-07-17 22:41:30 -04:00
Dmitriy Zaporozhets d41940d36e Merge branch 'master' into 6-0-dev
Conflicts:
	app/views/projects/issues/show.html.haml
	db/fixtures/development/09_issues.rb
	db/fixtures/development/10_merge_requests.rb
2013-06-24 22:13:00 +03:00
Jack Weeden a5d6bbe0af cattr_accessor removed from IssueObserver and MergeRequestObserver but not updated in fixtures 2013-06-24 14:21:46 +01:00
Dmitriy Zaporozhets f47ba909a2 Fix seeds. More projects for dev seeds 2013-06-20 13:14:23 +03:00