Commit Graph
110 Commits
Author SHA1 Message Date
Yorick Peterse b1203108b0 Flush all repository caches when deleting a repo
This ensures that _all_ caches (including any caches normally only
flushed under certain conditions) are flushed whenever a project is
removed. Because cache keys are based on project namespaces (excluding
IDs) not doing so could result in a newly created project re-using old
caches (if the project was re-created using the same name).
2016-02-17 11:38:18 +01:00
Josh Frye 91b9cbff8d First pass at deleting projects in the background. 2016-01-29 09:14:16 -05:00
Douglas Barbosa Alexandre c040323419 Move Gitlab::BitbucketImport::KeyDeleter to it's own importer 2016-01-26 10:56:22 -02:00
Douglas Barbosa Alexandre 6dd88e090e Extract Projects::ImportService service from RepositoryImportWorker 2016-01-25 22:58:30 -02:00
Douglas Barbosa Alexandre 096485ef65 Creator should be added as a master of the project on creation
This also enable a project creator to add themselves as a master of the
project.
2016-01-20 20:06:28 -02:00
Douglas Barbosa Alexandre 2ece1b774a Fix creator should be added as a master of the project on creation 2016-01-19 13:24:42 -02:00
Jeroen Nijhof 706255b926 Merge gitlab.com:gitlab-org/gitlab-ce 2016-01-11 09:32:35 +01:00
Douwe Maan 0614793b38 DRY up upload and download services 2016-01-08 17:38:53 +01:00
Douwe Maan 1886d727f7 Add API project upload endpoint 2016-01-07 13:37:14 +01:00
Jeroen Nijhof 9b28220f88 Merge gitlab.com:gitlab-org/gitlab-ce 2016-01-06 14:55:44 +01:00
Steve Norman 79ec7f2897 Added system hooks messages for renaming and transferring a project 2016-01-04 13:48:00 +00:00
Tomasz Maczukin 3cfd892f38 Merge branch 'master' into fix/visibility-level-setting-in-forked-projects
* master: (723 commits)
  Bump Rack Attack to v4.3.1 for security fix
  Remove duplicate entry in the changelog
  Remove extra spaces after branchname
  Fix merge-request-reopen button title
  Add branch and tag operation to tree dropdown
  Use gitlab-shell 2.6.9
  Clarify Windows shell executor artifact upload support
  Fix feature specs: we always show the build status if ci_commit is present
  Do not display project group/name when issue and MR are in same project
  Don't create CI status for refs that doesn't have .gitlab-ci.yml, even if the builds are enabled
  Use gitlab-workhorse 0.5.1
  Fix ci_projects migration by using the value only from latest row [ci skip]
  Revert sidebar position for issue and merge request
  Add info on using private Docker registries in CI [ci skip]
  Upgrade Poltergeist to 1.8.1. #4131
  Fix ux issue with "This issue will be closed automatically" message
  Move MR Builds tab next to Commits
  Api support for requesting starred projects for user
  Fix Rubocop complain.
  Fix merge widget JS for buttons
  ...

Conflicts:
	app/models/project.rb
2015-12-21 13:27:34 +01:00
Kamil Trzciński c810234357 Merge branch 'ci-project-migrate' into 'master'
Ci Project migrate

- This doesn't migrate: allow_git_fetch, coverage_regex, timeout. Since this are project configuration settings I would propose to migrate them to `.gitlab-ci.yml`.
- This requires offline migrations.
- It simplifies database models making all CI objects to be attached to: Project.
- It removes Ci::Project, but makes /ci/projects working by adding method: Project.find_by_ci_id for backward compatibility (badges, triggers).
- We should add default `timeout` to Application Settings.
- It misses specs.
- It is based on ci-services-migrate for now.
- It removes CI events.
- It removes administrator CI projects overview.
- It removes CI application settings.

In 8.4 or 8.5 we can remove redundant tables and columns.


See merge request !1987
2015-12-14 10:35:40 +00:00
Kamil Trzcinski e80e3f5372 Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00
Stan Hu 8d5527007a Provide better diagnostic message upon project creation errors
Prevents an Error 500 when project fails to create due to invalid parameters.

See #3937
2015-12-09 09:50:16 -08:00
Tomasz Maczukin 85ad95be74 Merge branch 'master' into fix/visibility-level-setting-in-forked-projects
* master: (296 commits)
  fox tests
  Don't rescue Exception, but StandardError
  adressing comments
  Update gitlab-shell documentation [ci skip]
  Align hash literals in IssuesFinder spec
  Fix tests
  Fix 'Attach a file' link in new tag form
  Add link to git-lfs client  [ci skip]
  Do not limit workhorse POST/PUT size in NGINX
  added specs
  added spinach tests
  Since GitLab CI is enabled by default, remove enabling it by pushing .gitlab-ci.yml
  Fix tests
  Commits without .gitlab-ci.yml are marked as skipped
  Changelog entry for finding issues performance
  Use a JOIN in IssuableFinder#by_project
  Memoize IssuableFinder#projects
  Removed trailing whitespace from IssuableFinder
  Added benchmark for IssuesFinder
  Updated DB schema with new issues/projects indexes
  ...

Conflicts:
	app/models/project.rb
2015-11-20 00:29:04 +01:00
Tomasz Maczukin 1144b70ab6 Change update_forks_visibility_level into after_update hook in Project model 2015-11-20 00:13:56 +01:00
Tomasz Maczukin 945e4293cb Prevent unnecessary forks iteration at parent update 2015-11-19 23:40:29 +01:00
Jeroen Nijhof d4690af8bc Use GitlabShellWorker.perform_async for housekeeping 2015-11-19 16:04:07 +01:00
Jeroen Nijhof 839aae0e47 Added housekeeping status and moved path check to gitlab-shell 2015-11-19 15:16:54 +01:00
Tomasz Maczukin 6f41e3d9ca Change forks method to has_many relation 2015-11-18 22:11:15 +01:00
Douwe Maan a0519818cb Tweak code formatting. 2015-11-18 12:02:05 +01:00
Kamil Trzcinski 6384c757b7 Expose CI enable option in project features
- Enable CI by default for all new projects
2015-11-13 10:52:50 +01:00
Tomasz Maczukin 3a52662ce3 Merge branch 'master' into fix/visibility-level-setting-in-forked-projects
* master: (23 commits)
  Use single spaces
  Improvements to profile page UI
  Replace all usages of `git` command with configurable binary path
  Update Shell Commands doc for configurable git binary path
  Minor reformatting for Facebook integration doc
  Use proper labels for OAuth providers
  Add Facebook authentication
  Bump stamp to ~> 0.6.0
  Add extra padding between user description and links on profile page
  Fix tests
  Fix clipboard button overflow
  Apply new design for user profile page
  Improve profile page UI
  Better name for up-level links
  Fixed User sorting specs
  Only sort by IDs by default
  Added benchmark for User.all
  Add changelog entry for contacted_at
  Spread out runner contacted_at updates
  Only redirect to homepage url when its not the root url
  ...
2015-11-04 23:45:27 +01:00
Tomasz Maczukin 89ecba5e6c Update forks visibility_level after parent project visibility_level change 2015-11-04 23:42:02 +01:00
Tomasz Maczukin 7cb442eed4 Fix Project update service
When project is updated and it is a fork, then visibility_level
should not be less restrictive than in its parent project.
2015-11-03 18:23:48 +01:00
Yorick Peterse 29b3ce56ac Removed extra activity update for new projects
When a project is created the last activity timestamp is already set so
there's no need for another update.
2015-10-29 14:06:11 +01:00
Jeroen Nijhof 4f0a38f1a8 Added housekeeping for git repositories 2015-10-21 15:15:54 +02:00
Valery Sizov 8f584d5f2c Fix: Images cannot show when projects' path was changed 2015-10-14 18:50:35 +03:00
Guilherme Garnier 1cfb48ddd0 Merge remote-tracking branch 'upstream/master' 2015-10-03 11:46:29 -05:00
Guilherme Garnier 2b075f16c7 Fix rubocop warnings in app 2015-10-03 00:56:37 -05:00
Dmitriy Zaporozhets 37e9e71ea1 Remove unnecessary fork ci logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-02 10:26:56 +02:00
Valery Sizov 5b57313051 Note the original location of a moved project when notifying users of the move 2015-10-01 09:54:56 +03:00
Valery SizovandKamil Trzcinski a0c1a12dee remove API calls from CE to CI 2015-09-18 18:02:11 +02:00
Stan Hu 9995f0806b Import forked repositories asynchronously to prevent large repositories from timing out
Use import_status to track async import status and give feedback to the user

Closes #2388
Closes #2400
2015-09-11 00:34:04 -07:00
Dmitriy Zaporozhets b05cc8bc9a Merge branch 'global_labels' into 'master'
Global labels

https://dev.gitlab.org/gitlab/gitlabhq/issues/2353

See merge request !1240
2015-09-09 08:57:54 +00:00
Jared Szechy e156f42079 FogBugz project import 2015-09-08 20:23:01 -04:00
Valery Sizov f5ffeac058 Create labels in new project 2015-09-03 17:12:15 +03:00
Douwe Maan 3d51a6d435 Merge branch 'master' into reply-by-email 2015-08-20 12:19:19 -07:00
Douwe Maan ee1eb2948d Turn reply-by-email attachments into uploads. 2015-08-19 10:18:05 -07:00
Dmitriy Zaporozhets 3e259ea8bc Revert "Merge branch 'revert-satellites' into 'master' "
This reverts commit 5daf44b7c8, reversing
changes made to 2f706fbd23.
2015-08-11 14:33:31 +02:00
Dmitriy Zaporozhets 9f10943c1a Revert "Merge branch 'drop-satellites'"
This reverts commit 957e849f41, reversing
changes made to 6b9dbe9f5a.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-11 10:28:42 +02:00
Dmitriy Zaporozhets b48b07044b Merge branch 'master' into drop-satellites
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-04 16:42:36 +02:00
Robert Speicher 88aed40962 Create project services on Project creation 2015-07-25 16:43:55 -04:00
Dmitriy Zaporozhets a87989fb7d Remove satellites 2015-07-15 15:45:57 +02:00
Douwe MaanandRobert Speicher b93053695a Fix transferring of project to another group using the API. 2015-07-11 16:47:33 -04:00
Douwe Maan 4ae67fcaef Show warning when a comment will add 10 or more people to the discussion. 2015-06-05 12:07:13 +02:00
Dmitriy Zaporozhets 53a0ac4734 Skip repo removing whem remove user or group
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 16:16:27 +02:00
Dmitriy Zaporozhets 58ab8a4a9d Fix tests and increase delay time before remove repository
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 15:09:12 +02:00
Dmitriy Zaporozhets 97ff86e07c Move repository when project is removed
Ths commit does next:

* When we remove project we move repository to path+deleted.git
* Then we schedule removal of path+deleted with sidekiq
* If repository move failed we abort project removal

This should help us with NFS issue when project get removed but
repository stayed. The full explanation of problem is below:

* rm -rf project.git
* rm -rf removes project.git/objects/foo
* NFS server renames foo to foo.nfsXXXX because some NFS client (think
* Unicorn) still has the file open
* rm -rf exits, but project.git/objects/foo.nfsXXX still exists
* Unicorn closes the file, the NFS client closes the file (foo), and the
* NFS server removes foo.nfsXXX
* the directory project.git/objects/ still exists => problem

So now we move repository and even if repository removal failed

Repository directory is moved so no bugs with project removed but
repository directory taken. User still able to create new project with
same name. From administrator perspective you can easily find stalled
repositories by searching `*+deleted.git`

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-03 13:05:43 +02:00