Commit Graph

9504 Commits

Author SHA1 Message Date
Douwe Maan e599281e41 Merge branch 'rs-update-rubocop-gitlab-security' into 'master'
Update rubocop-gitlab-security to 0.1.0

See merge request !13879
2017-08-29 07:27:35 +00:00
Robert Speicher bed27b6a6d Update rubocop-gitlab-security to 0.1.0 2017-08-28 12:46:00 -04:00
James Lopez eef5135e08 Fix events error importing GitLab projects 2017-08-28 15:24:24 +02:00
Douwe Maan 073811074b Merge branch 'sh-simplify-system-hook-testing' into 'master'
Simplify system hook testing and guarantee test will fire

Closes #37067

See merge request !13858
2017-08-28 10:38:52 +00:00
Stan Hu 1e53f40c25 Simplify system hook testing and guarantee test will fire
The change in !11728 would cause an arbitrary project to be chosen to test
system hooks, and it's likely that the project would not have any commits or
relevant commits to test the hook. This would prevent admins from verifying
that the hook fired. Instead of trying to create a representative hook
dynamically, just send static data to guarantee the hook will actually be
tested.

Closes #37067
2017-08-27 15:50:20 -07:00
Grzegorz Bizon 15ace6a910 Merge commit '2be34630623711fc20ef8c101b5cef688f207cc1' into backstage/gb/rename-ci-cd-processing-sidekiq-queues
* commit '2be34630623711fc20ef8c101b5cef688f207cc1':
  Common Docker Documentation Location in `gitlab-ce`
  fix deprecation warning present during webpack compiles
  Enable 5 lines of Sidekiq backtrace lines to aid in debugging
  Add support for copying permalink to notes via more actions dropdown
  Handle creating a nested group on MySQL correctly
  Decrease statuses batch size even more in a migration
  Fix repo editor scrollbar
  Replace 'source/search_code.feature' spinach test with an rspec analog
  Authorizations regarding OAuth - style confirmation
  Update README.md
  Refactor complicated API group finding rules into GroupsFinder
  Fix group and project search for anonymous users
  Document version Group Milestones API introduced
  Allow v4 API GET requests for groups to be unauthenticated
  Adjust a range and a size in stages statuses migration
  Update README.md
  Point to /developers on docs/administration/authentiq.md
  Indexes GFM markdown guide
  use inline links instead of referenced
  Add index on ci_runners.contacted_at
2017-08-26 10:55:20 +02:00
Kamil Trzciński c842e29aad Merge branch '31409-fix-group-and-project-search-for-anonymous-users' into 'master'
Fix group and project search for anonymous users

Closes #31409

See merge request !13745
2017-08-25 12:25:37 +00:00
Kamil Trzciński a653c8ead4 Merge branch 'master' into 'backstage/gb/rename-ci-cd-processing-sidekiq-queues'
# Conflicts:
#   db/schema.rb
2017-08-25 12:10:53 +00:00
Sean McGivern 4a2cc38197 Merge branch '36939-fix-find-blobs-by-path' into 'master'
Fix searching for files by path

Closes #36939

See merge request !13798
2017-08-25 10:26:12 +00:00
Nick Thomas fa2915ec2d Fix searching for files by path 2017-08-25 10:36:32 +01:00
Sean McGivern e46a3d2fda Merge branch 'git-operation-user' into 'master'
Move GitHooksService into Gitlab::Git

See merge request !13739
2017-08-24 14:32:17 +00:00
Douwe Maan 610155e063 Merge branch 'fix-old-mr-diffs' into 'master'
Fix old MR diffs

Closes #36516

See merge request !13744
2017-08-24 10:56:57 +00:00
Nick Thomas 2adff699ce Refactor complicated API group finding rules into GroupsFinder 2017-08-24 11:33:09 +01:00
Sean McGivern e8525e107d Show un-highlighted diffs when blobs are the same
For some old merge requests, we don't have enough information to figure out the
old blob and the new blob for the file. This means that we can't highlight the
diff correctly, but we can still display it without highlighting.
2017-08-24 11:11:18 +01:00
Andrew Newdigate fb49c94e49 Delegate Repository::branch_exists? and ref_exists? to Gitlab::Git 2017-08-24 09:20:04 +00:00
Douwe Maan 93ad83443a Merge branch 'sh-fix-branch-count' into 'master'
Fix inconsistent number of branches when remote branches are present

Closes #36934

See merge request !13784
2017-08-24 07:42:30 +00:00
Stan Hu 37904108b9 Fix inconsistent number of branches when remote branches are present
Users of project mirrors would see that the number of branches did not
match the number in the branch dropdown because remote branches were
counted when Rugged was in use. With Gitaly, only local branches
are counted.

Closes #36934
2017-08-23 22:07:32 -07:00
Robert Speicher cdf87fe890 Merge branch 'dm-ldap-adapter-attributes' into 'master'
Support simple string LDAP attribute specifications, and search for name rather…

Closes #36841

See merge request !13776
2017-08-23 21:42:29 +00:00
Douwe Maan c1cf5f4101 Support simple string LDAP attribute specifications, and search for name rather than username attributes 2017-08-23 22:06:22 +02:00
Nick Thomas 502d6464b0 Allow v4 API GET requests for groups to be unauthenticated 2017-08-23 18:30:53 +01:00
Robert Speicher 2b906219a0 Merge branch 'fix/gitlay-raw-blame-request-encoding' into 'master'
Properly encode Gitaly RawBlame request params

See merge request !13764
2017-08-23 15:51:22 +00:00
Sean McGivern 9ec60b5030 Merge branch 'bvl-improve-bare-project-import' into 'master'
Make the import take subgroups into account

Closes #36664 and #30546

See merge request !13670
2017-08-23 14:04:22 +00:00
Ahmad Sherif 9240d3552a Properly encode Gitaly RawBlame request params 2017-08-23 13:44:54 +02:00
Bob Van Landuyt f76d8c902a Fix error when importing a GitHub-wiki repository
This would occur when Wiki's are enabled on GitHub, but there is no
wiki repository
2017-08-23 13:36:38 +02:00
Bob Van Landuyt 22ef4ba3a4 Migrate creation of nested groups into a service 2017-08-23 13:36:38 +02:00
Bob Van Landuyt d8d2b73b9f Improve bare repository import
- Allow imports into nested groups
- Make sure it sets the correct visibility level when creating new
  groups

While doing this, I moved the import into a testable class, that made
it easier to improve.
2017-08-23 13:36:37 +02:00
Sean McGivern d546f7d36e Merge branch 'gitaly-commit-patch' into 'master'
Incorporate DiffService.CommitPatch Gitaly RPC

Closes gitaly#463

See merge request !13441
2017-08-23 10:39:01 +00:00
Jacob Vosmaer da769135fe Rubocop whitespace 2017-08-23 10:45:20 +02: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
Grzegorz Bizon faf92651aa Fix invalid default argument in migration helpers 2017-08-23 08:58:55 +02:00
Robert Speicher 4598e0c392 Fix a potential timeout in `Gitlab::Logger.read_latest`
If this method was called for a file that didn't exist, we attempted to
first `build` it. But if the file wasn't writeable, such as a symlink
pointing to an unmounted filesystem, the method would just hang and
eventually timeout.

Further, this was entirely pointless since we were creating a file and
then shelling out to `tail`, eventually returning an empty Array. Now we
just skip building it and return the empty Array straight away.
2017-08-22 17:09:45 -04:00
Alejandro Rodríguez 258d5a50e6 Incorporate DiffService.CommitPatch Gitaly RPC 2017-08-22 16:31:59 -03:00
Kamil Trzciński 080a359e0c Merge branch 'fix/sm/34762-bad-validation-message' into 'master'
Enforce namespace of Kubernetes to lowercase

Closes #34762

See merge request !13732
2017-08-22 16:38:07 +00:00
Sean McGivern b0f09406f5 Always return a simple diff viewer
We didn't have a fallback case before, because we believed the conditions were
exhaustive. They weren't, so we can always fallback to not previewing.
2017-08-22 14:04:54 +01:00
Grzegorz Bizon 2e91f18143 Merge branch 'master' into backstage/gb/rename-ci-cd-processing-sidekiq-queues
* master: (115 commits)
  Use event-based waiting in Gitlab::JobWaiter
  Make sure repository's removal work for legacy and hashed storages
  Use `@hashed` prefix for hashed paths on disk, to avoid collision with existing ones
  Refactor project and storage types
  Prevent using gitlab import task when hashed storage is enabled
  Some codestyle changes and fixes for GitLab pages
  Removed some useless code, codestyle changes and removed an index
  Fix repository reloading in some specs
  Changelog
  Moving away from the "extend" based factory to a more traditional one.
  Enable automatic hashed storage for new projects by application settings
  New storage is now "Hashed" instead of "UUID"
  Add UUID Storage to Project
  Move create_repository back to project model as we can use disk_path and share it
  Codestyle: move hooks to the same place and move dependent methods to private
  Use non-i18n values for setting new group-level issue/MR button text
  indexes external issue tracker
  copyedit
  indexes user/search/ from /user/index
  Correctly encode string params for Gitaly's TreeEntries RPC
  ...
2017-08-22 14:58:10 +02:00
Sean McGivern ce89c425fe Merge branch 'fix/import-fork-mr' into 'master'
Fix Import/Export issue to do with fork merge requests

Closes #36666

See merge request !13717
2017-08-22 11:57:06 +00:00
Douwe Maan 78a0d27e98 Merge branch '34533-inline-single-authorized-projects' into 'master'
Use an event-based system when waiting for AuthorizedProjectsWorker to complete

See merge request !13564
2017-08-22 11:05:14 +00:00
Grzegorz Bizon 193b199672 Add Sidekiq migration helpers for migrating queues 2017-08-22 12:47:20 +02:00
Nick Thomas 6e8d0b78eb Use event-based waiting in Gitlab::JobWaiter 2017-08-22 09:54:46 +01:00
Shinya Maeda fe9fc0af75 Enfouce namespace for Kubernetes to lowercase 2017-08-22 15:12:27 +09:00
Gabriel Mazetto d17a7be830 Refactor project and storage types 2017-08-22 06:33:20 +02:00
Gabriel Mazetto 78823675b2 Prevent using gitlab import task when hashed storage is enabled 2017-08-22 06:33:20 +02:00
Gabriel Mazetto 9e6fa996ea New storage is now "Hashed" instead of "UUID" 2017-08-22 06:33:20 +02:00
Robert Speicher 539ed0a637 Merge branch 'gitaly-tree-entries-encoding' into 'master'
Correctly encode string params for Gitaly's TreeEntries RPC

Closes #36720

See merge request !13724
2017-08-21 22:22:37 +00:00
Robert Speicher 367d3d9704 Merge branch 'only-limit-fetch-when-requested' into 'master'
Only require sidekiq-limit_fetch when enabled in settings

Closes #36253

See merge request !13715
2017-08-21 19:26:12 +00:00
Alejandro Rodríguez b7ebb447d7 Correctly encode string params for Gitaly's TreeEntries RPC 2017-08-21 15:13:40 -03:00
James Lopez fb9bd552c9 Fix fork MRs importing issue 2017-08-21 16:39:28 +02:00
Sean McGivern 0db5f576fe Only require sidekiq-limit_fetch when enabled in settings
This gem allows Sidekiq jobs to be throttled. Unfortunately, it has a
side-effect: when we haven't enabled job throttling, it will still hit Redis a
lot (and miss, because nothing is configured).

As this setting already required a restart, ensure that the library is only
required when it's enabled.
2017-08-21 12:56:22 +01:00