Commit Graph

369 Commits

Author SHA1 Message Date
Oswaldo Ferreira a6c52c4e59 Make merge_jid handling less stateful in MergeService 2017-10-27 22:33:48 +02:00
Tiago Botelho 5b32a4aaff Backports EE 38771 changes to CE. 2017-10-10 10:13:00 +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
Bob Van Landuyt e8ca579d88 Add a project forks spec helper
The helper creates a fork of a project with all provided attributes,
but skipping the creation of the repository on disk.
2017-10-07 11:46:23 +02:00
Kamil Trzciński 5ee20b6375 Merge branch 'master' into '37970-ci-sections-tracking'
# Conflicts:
#   db/schema.rb
2017-10-07 08:07:33 +00:00
Shinya Maeda 638c616296 Use utc for time comparision 2017-10-06 18:23:53 +09:00
Kamil Trzcinski 354e2ef08d Add some empty spaces 2017-10-05 23:54:26 +02:00
Kamil Trzcinski 3f3e4dd1d3 Fix failing spec 2017-10-05 23:52:24 +02:00
Alessio Caiazza 91f8e734fe
Add CI build trace sections extractor 2017-10-05 15:42:25 +02:00
Kamil Trzcinski bee5c08094 Fix Rubocop failures 2017-10-04 21:13:01 +02:00
Shinya Maeda e710e766b0 fetch_gcp_operation_service_spec. finalize_cluster_creation_service_spec. wait_for_cluster_creation_worker_spec. 2017-10-05 01:55:33 +09:00
Shinya Maeda 8d9d0f9401 create_cluster_service_spec. cluster_provision_worker_spec. cluster_queue_spec. 2017-10-04 23:26:56 +09:00
Jacob Vosmaer (GitLab) 5dd26d4e5a Hide Gollum inside Gitlab::Git::Wiki 2017-10-03 16:58:33 +00:00
Jacob Vosmaer (GitLab) 403712f06e Make Repository#has_visible_content more efficient 2017-09-29 13:08:44 +00:00
Gabriel Mazetto f4de14d71f
Add support to migrate existing projects to Hashed Storage async 2017-09-28 16:32:14 +01:00
Grzegorz Bizon 3420c0f7dc Fix post receive specs regarding pipeline creation 2017-09-26 09:36:45 +02:00
Yorick Peterse b3566a0104
Stop using Sidekiq for updating Key#last_used_at
This makes things simpler as no scheduling is involved. Further we
remove the need for running a SELECT + UPDATE just to get the key and
update it, whereas we only need an UPDATE when setting last_used_at
directly in a request.

The added service class takes care of updating Key#last_used_at without
using Sidekiq. Further it makes sure we only try to obtain a Redis lease
if we're confident that we actually need to do so, instead of always
obtaining it. We also make sure to _only_ update last_used_at instead of
also updating updated_at.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36663
2017-09-20 14:24:14 +02:00
Jarka Kadlecova 0657002251 Restore has_visible_content? to improve performance (cache)
This method was moved to ::Git but it is not cached there which causes performance problems
2017-09-14 13:03:36 +02:00
Douwe Maan 40b0b1a391 Merge branch '35558-only-one-garbage-collection-should-be-running-per-project-at-once' into 'master'
Adds exclusive lease to Git garbage collect worker.

Closes #35558

See merge request !14036
2017-09-07 19:34:59 +00:00
Tiago Botelho 39298575a8 Adds exclusive lease to Git garbage collect worker. 2017-09-07 18:52:04 +01:00
Tiago Botelho cfd475a45e Removes default scope from sortable 2017-09-07 13:01:59 +01:00
Alexis Reigel 508ff17b34 pass whole commit to Gitlab::Gpg::Commit again
we need the commit object for the updated verification that also checks
the committer's email to match the gpg key and user's emails.
2017-09-05 12:18:31 +02:00
Shinya Maeda 69df47c7e4 Improve spec 2017-09-05 14:30:28 +09:00
Shinya Maeda 1d7c039072 Fix enum lists 2017-09-05 14:30:28 +09:00
Shinya Maeda dcf09d1144 Implement `failure_reason` on `ci_builds` 2017-09-05 14:30:28 +09:00
Jacob Vosmaer 6cdaa27a53 Move GitOperationService to Gitlab::Git 2017-09-01 14:37:56 +02:00
Jacob Vosmaer 8ad690b0d4 Prepare GitOperationService for move to Gitlab::Git 2017-08-31 15:35:59 +02:00
Oswaldo Ferreira 9068083f86 Add changelog 2017-08-28 15:48:09 -03:00
Douwe Maan 0b73771205 Merge branch '36792-inline-user-refresh-when-creating-project' into 'master'
Don't wait for project authorization sidekiq jobs when creating projects

Closes #36792

See merge request !13775
2017-08-28 12:21:17 +00:00
Nick Thomas 8b73df0cf5 Move sidekiq-based project authorization refresh out of Projects::CreateService
If the project is in a group, the `group.refresh_members_authorized_projects`
is made non-blocking, and we call `current_user.refresh_authorized_projects`
directly.

Projects in a personal namespace are more difficult. Rather than passing the
`blocking:` parameter through the entire `add_master` chain, have the
`AuthorizedProjectsWorker` automatically inline authorizations for three IDs or
less. Since the maximum number of IDs in this path is 2, that has the same effect.
2017-08-25 16:19:32 +01: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
Kamil Trzciński eae604e6de Merge branch 'backstage/gb/after-save-asynchronous-job-hooks' into 'master'
Do not fire synchronous hooks when creating a job

Closes #35286

See merge request !13734
2017-08-24 12:46:33 +00:00
Grzegorz Bizon 53353c849d Merge branch 'master' into backstage/gb/after-save-asynchronous-job-hooks
* 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-23 11:46:23 +02:00
Grzegorz Bizon 45d1c9a47c Fix pipeline job worker specs 2017-08-23 11:46:10 +02: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
Toon Claes 2074f39a47 Migration to remove pending delete projects with non-existing namespace
There might be some projects where the namespace was removed, but the
project wasn't. For these the projects still have a `namespace_id`
set. So this adds a post-deploy migration remove all projects that are
pending delete, and have a `namespace_id` that is non-existing.
2017-08-22 14:29:54 +02: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 73187801df Revert adding shared examples for every sidekiq worker
Since this already exists in `every_sidekiq_worker_spec.rb`.
2017-08-22 12:09:57 +02:00
Grzegorz Bizon 75dca155af Fix incorrect `let` in pipeline metrics worker specs 2017-08-22 11:37:35 +02:00
Grzegorz Bizon beb8f46e94 Fix typo in shared examples name in worker specs 2017-08-22 11:29:42 +02:00
Nick Thomas 6e8d0b78eb Use event-based waiting in Gitlab::JobWaiter 2017-08-22 09:54:46 +01:00
Gabriel Mazetto d17a7be830 Refactor project and storage types 2017-08-22 06:33:20 +02:00
Grzegorz Bizon 15f486e305 Add sidekiq worker shared examples to workers specs 2017-08-21 14:31:09 +02:00
Grzegorz Bizon 4c93668202 Remove sidekiq build queue and assign pipeline queue 2017-08-21 14:16:51 +02:00
Grzegorz Bizon 8417507201 Assign all pipeline workers to specific queues 2017-08-21 14:02:20 +02:00
Grzegorz Bizon 48776f2786 Simplify pipeline sidekiq queues naming scheme 2017-08-21 13:49:57 +02:00
Kamil Trzciński e00e62c2c8 Merge branch 'backstage/gb/migrate-stages-statuses' into 'master'
Migrate CI/CD stages statuses

Closes #33453

See merge request !12584
2017-08-21 11:47:44 +00:00
Grzegorz Bizon ce274fd61b Make it possible to check if worker uses a known queue 2017-08-21 13:32:00 +02:00
Grzegorz Bizon 0f01ce3657 Extend pipelines queue mixin and add a default queue 2017-08-21 13:05:01 +02:00
Douwe Maan 91d3e6d901 Merge branch 'ee-2628-backport-to-ce' into 'master'
Backports EE mirror stuck handling feature…

See merge request !13627
2017-08-17 13:53:39 +00:00