Commit Graph

268 Commits

Author SHA1 Message Date
Alejandro Rodríguez 3f0233e5b5 Create a Wiki Repository's raw_repository properly 2017-11-03 14:33:24 -03:00
Lin Jen-Shin (godfat) 57d7ed05d9 Fetch the merged branches at once 2017-10-27 15:55:08 +00:00
Sean McGivern 15e3d33761 Merge branch 'zj-commit-cache' into 'master'
Cache commits on the repository model

See merge request gitlab-org/gitlab-ce!14863
2017-10-27 13:31:05 +00:00
Zeger-Jan van de Weg 3411fef1df
Cache commits on the repository model
Now, when requesting a commit from the Repository model, the results are
not cached. This means we're fetching the same commit by oid multiple times
during the same request. To prevent us from doing this, we now cache
results. Caching is done only based on object id (aka SHA).

Given we cache on the Repository model, results are scoped to the
associated project, eventhough the change of two repositories having the
same oids for different commits is small.
2017-10-27 12:49:11 +02:00
Alejandro Rodríguez 6d04f3789c Avoid calling underlying methods on non-existing repos
This saves us Rugged/gRPC invocations
2017-10-20 12:58:49 -03:00
Jacob Vosmaer 0aff29f96b Merge Merge Requests via Gitaly 2017-10-13 14:07:31 +02:00
Sean McGivern b7303b65b1 Cache issuable template names
We were looking these up on each request to an issue page, because the form is
pre-filled, as is the template dropdown. That was unnecessary: we could just
treat these as 'special' repository files (like the rendered README) and cache
them in Redis until they change on a push.
2017-10-12 13:26:03 +01:00
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
Zeger-Jan van de Weg 4656283c5c
Gitaly namespace service enabled for GitLab 2017-10-05 14:11:32 +02:00
Jacob Vosmaer 147e2b21be Let fetch_ref pull from Gitaly instead of from disk 2017-10-04 12:57:41 +02:00
Douwe Maan c6e5a77e51 Merge branch 'gitaly-delete-branch' into 'master'
Implement OperationService.UserDeleteBranch Gitaly RPC

See merge request gitlab-org/gitlab-ce!14603
2017-10-04 07:34:33 +00:00
Alejandro Rodríguez 79719cf003 Add OperationService.UserDeleteBranch Gitaly RPC 2017-10-03 21:06:34 -03:00
Valery Sizov a0ac2d932c Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ff_port_from_ee 2017-10-02 13:15:46 +03:00
Sean McGivern 0a69abdb28 Merge branch 'gitaly-add-branch' into 'master'
Implement OperationService.UserAddBranch Gitaly RPC

Closes gitaly#544

See merge request gitlab-org/gitlab-ce!14522
2017-10-02 09:27:23 +00:00
Douwe Maan a030dc4199 Merge branch 'remote_user' into 'master'
Add GL_USERNAME environment variable for hooks

See merge request gitlab-org/gitlab-ce!13264
2017-10-02 07:16:22 +00:00
Stan Hu 6188e449de Fix pushes to an empty repository not invalidating has_visible_content? cache
`Repository#has_visible_content?` used to rely on the cached count of local branches, but
since it is now an independently cached value it needs to be invalidated on its own.

Closes #38646
2017-10-01 22:14:11 -07:00
Alejandro Rodríguez fa5f0164eb Implement OperationService.UserAddBranch Gitaly RPC 2017-09-30 00:58:56 -03:00
David Turner dbcf48af8b Add username as GL_USERNAME in hooks (http)
When calling pre-receive, post-receive, and update hooks, add the GitLab
username as the GL_USERNAME environment variable.

This patch only handles cases where pushes are over http, or via
the web interface.  Later, we will address the ssh case.
2017-09-29 18:12:03 -04:00
Jacob Vosmaer (GitLab) 403712f06e Make Repository#has_visible_content more efficient 2017-09-29 13:08:44 +00:00
Ahmad Sherif 4f5be9ec7b Migrate Gitlab::Git::Repository#add_tag to Gitaly
Closes gitaly#601
2017-09-29 00:53:49 +02:00
Robert Speicher 07c3112ef5 Merge branch 'feature/migrate-repository-rm-tag-to-gitaly' into 'master'
Migrate Git::Repository#rm_tag to Gitaly

Closes gitaly#562

See merge request gitlab-org/gitlab-ce!14388
2017-09-28 22:43:37 +00:00
Eric Eastwood 3468ca835d Merge branch 'master' into ff_port_from_ee
Conflicts:
	app/models/project.rb
	db/schema.rb
2017-09-28 16:59:49 -05:00
Ahmad Sherif 3944e16b4b Migrate Git::Repository#rm_tag to Gitaly
Closes gitaly#562
2017-09-28 23:36:40 +02:00
Markus Koller e9eae3eb0d Support custom attributes on users 2017-09-28 16:49:42 +00:00
Valery Sizov ffa2c5d41e Add spec for Repository#ff_merge (ported from EE) 2017-09-19 23:48:40 -05:00
Jacob Vosmaer (GitLab) 75509fac17 Prepare cherry-pick and revert for migration to Gitaly 2017-09-19 17:09:10 +00:00
Jacob Vosmaer 902b5347dc Prepare Repository#merge for migration to Gitaly 2017-09-15 16:39:20 +02:00
Jacob Vosmaer 9e40baba1e Rename Gitlab::Git::Committer to User 2017-09-14 17:42:02 +02:00
Sean McGivern 4efdb451b5 Merge branch 'move-git-operation-service' into 'master'
Move GitOperationService to Gitlab::Git

See merge request !13984
2017-09-04 11:06:12 +00:00
Sean McGivern dabce2c571 Merge branch 'git-operation-service-to-git' into 'master'
Prepare GitOperationService for moving to Gitlab::Git

See merge request !13773
2017-09-04 10:56:26 +00:00
Jacob Vosmaer 6cdaa27a53 Move GitOperationService to Gitlab::Git 2017-09-01 14:37:56 +02:00
Jacob Vosmaer 129d6bf2de Fix whitespace 2017-09-01 12:49:28 +02:00
Sean McGivern 096850a49a Merge branch 'sm-cherry-pick-list-commits-in-message' into 'master'
Add 'from commit' information to cherry-picked commits

See merge request !13475
2017-09-01 10:24:29 +00:00
Jacob Vosmaer e81229805d Remove empty line 2017-09-01 11:59:27 +02:00
Jacob Vosmaer 0aadf36b4a Restore with_branch cache spec 2017-09-01 11:51:55 +02:00
Jacob Vosmaer 8ad690b0d4 Prepare GitOperationService for move to Gitlab::Git 2017-08-31 15:35:59 +02:00
Sean McGivern fbab532fc1 Merge branch 'perf.slow-issuable' into 'master'
Perf.slow issuable

Closes #32844

See merge request !13685
2017-08-30 12:41:11 +00:00
Lin Jen-Shin 9d3ee1ff13 Further break with_repo_branch_commit into parts
So it's more clear what could happen. Also add
more tests about the behaviour.
2017-08-29 22:42:34 +08:00
Maxim Rydkin 87467127b6 replace `is_ancestor?` with `ancestor?` 2017-08-29 11:14:41 +03:00
Jacob Vosmaer dc7c6bede2 Move GitHooksService to Gitlab::Git 2017-08-23 10:45:20 +02:00
Jacob Vosmaer 65f83941c3 Make gl_repository a G::G::Repository attribute 2017-08-23 10:45:20 +02:00
Jacob Vosmaer 9b93093292 Decouple GitOperationService from User 2017-08-23 10:45:20 +02:00
Saverio Miroddi 919c0c7ba7 Extended UTs for the new cherry-pick message format 2017-08-16 13:18:07 +02:00
Lin Jen-Shin e04c1ae7c7 Merge remote-tracking branch 'upstream/master' into 36089-handle-ref-failure-better
* upstream/master: (62 commits)
  Update gitlab.po: Missing 'r' in "Fouché" that comes from "Fourcher" verb.
  Docs: update user docs index
  Fix minor typos in views
  Fix Layout/SpaceBeforeBlockBraces violation in bin/changelog_spec
  Merge branch 'rs-alphanumeric-ssh-params' into 'security-9-4'
  Merge branch 'import-symlinks-9-3' into 'security-9-3'
  Fix wrong method call on prometheus histogram
  Document new all-in-one Helm chart - docs
  Fix 404 on link path
  Fix line numbers not matching up to code in code viewer.
  Hide overflow-x on collapsed sidebar
  removed global use of breakpoint checker
  Increase performance of the breakpoint size checker
  Filter sensitive query string parameters from NGINX access logs
  Added a template for database changes
  Render new issue link in failed job as a regular link instead of a UJS one
  Include RE2 in the upgrade docs
  Remove affix plugin from issuable sidebar with new navigation
  Fix linter error
  alternative route for download archive
  ...
2017-08-11 19:15:35 +08:00
Lin Jen-Shin 029fb98b02 Detect if we didn't create the ref sooner 2017-08-09 18:41:20 +08:00
Rémy Coutable c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00
Ahmad Sherif c0b41064ff Migrate Repository#find_commits_by_message to Gitaly
Closes gitaly#443
2017-08-07 18:57:06 +02:00
Bob Van Landuyt faabcbd3ae GRPC::Unavailable (< GRPC::BadStatus) is wrapped in a CommandError 2017-08-07 14:37:01 +02:00
Douwe Maan 727b6d16e5 Merge branch 'master' into 'bvl-nfs-circuitbreaker'
# Conflicts:
#   app/models/repository.rb
#   spec/models/repository_spec.rb
2017-08-07 09:13:10 +00:00
Bob Van Landuyt 3598e60bf2 Add a Circuitbreaker for storage paths 2017-08-04 15:38:48 +02:00