summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/shell_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove hook directory requirement from Shellgitaly-version-v1.43.0Zeger-Jan van de Weg2019-05-301-10/+0
| | | | | | | | | | | | It used to be the case that GitLab created symlinks for each repository to one copy of the Git hooks, so these ran when required. This changed to set the hooks dynamically on Gitaly when invoking Git. The side effect is that we didn't need all these symlinks anymore, which Gitaly doesn't create anymore either. Now that means that the tests in GitLab-Rails should test for it either. Related: https://gitlab.com/gitlab-org/gitaly/issues/1392#note_175619926
* Integrate Gitlab::Keys with Gitlab::ShellPatrick Bajao2019-03-191-195/+389
| | | | | | | | | | | In this commit, some methods that aren't being used are removed from `Gitlab::Shell`. They are the ff: - `#remove_keys_not_found_in_db` - `#batch_read_key_ids` - `#list_key_ids` The corresponding methods in `Gitlab::Keys` have been removed as well.
* Prepare test suite for switch to Gitaly-embedded Git hooksJacob Vosmaer2019-02-271-1/+0
|
* Clean up Shell.fork_repositoryStan Hu2019-02-051-8/+3
| | | | Use project models instead of a list of parameters.
* Send project name with Gitaly repository requestsStan Hu2019-02-051-4/+6
| | | | | | | When hashed storage is in use, it's helpful to have the project name associated with the request. Closes https://gitlab.com/gitlab-org/gitaly/issues/1394
* Stop Repository#fetch_remote from using Gitlab::ShellNick Thomas2018-11-061-120/+0
| | | | This indirection doesn't provide any value, so remove it
* Remove Rugged and shell code from Gitlab::GitAlejandro RodrĂ­guez2018-09-121-5/+0
|
* Use Gitaly for fetches and creating bundlesJacob Vosmaer2018-07-091-81/+24
|
* Move forking to Gitalyzj-fork-mandatoryZeger-Jan van de Weg2018-06-191-25/+9
| | | | | | Closes https://gitlab.com/gitlab-org/gitaly/issues/817 Closes https://gitlab.com/gitlab-org/gitaly/issues/1236
* Find and mark more Git disk access locations, part 2Jacob Vosmaer2018-06-121-16/+56
|
* Find and mark more Git disk access locationsJacob Vosmaer (GitLab)2018-06-051-1/+5
|
* Gitlab::Shell works on shard name, not pathZeger-Jan van de Weg2018-04-251-26/+26
| | | | | | | | | | | Direct disk access is done through Gitaly now, so the legacy path was deprecated. This path was used in Gitlab::Shell however. This required the refactoring in this commit. Added is the removal of direct path access on the project model, as that lookup wasn't needed anymore is most cases. Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
* Resolve "Make a Rubocop that forbids returning from a block"🙈 jacopo beschi 🙉2018-04-181-1/+1
|
* Use shard name in Git::GitlabProjects instead of shard pathAhmad Sherif2018-04-031-7/+7
| | | | Closes gitaly#1110
* Merge branch 'mark-legacy-git-access' into 'master'Sean McGivern2018-03-231-2/+2
|\ | | | | | | | | Route path lookups through legacy_disk_path See merge request gitlab-org/gitlab-ce!17743
| * Route path lookups through legacy_disk_pathmark-legacy-git-accessJacob Vosmaer2018-03-211-2/+2
| |
* | Change Gitlab::Shell#add_namespace to #create_namespaceZeger-Jan van de Weg2018-03-141-8/+8
|/ | | | | | | | | | | Prior to this change, this method was called add_namespace, which broke the CRUD convention and made it harder to grep for what I was looking for. Given the change was a find and replace kind of fix, this was changed without opening an issue and on another feature branch. If more dynamic calls are made to add_namespace, these could've been missed which might lead to incorrect bahaviour. However, going through the commit log it seems thats not the case.
* Make --prune a configurable parameter in fetching a git remotesh-make-prune-optional-in-git-fetchStan Hu2018-03-061-13/+19
| | | | | | By default, --prune is added to the command-line of a `git fetch` operation, but for repositories with many references this can take a long time to run. We shouldn't need to run --prune the first time we fetch a new repository.
* Use hashed storage in the specs40744-hashed-storage-specsNick Thomas2018-02-071-1/+1
|
* Merge branch 'zj-migrate-gitlab-project-rm-mv' into 'master'Douwe Maan2018-01-101-11/+23
|\ | | | | | | | | | | | | Migrate GitlabProject (re)move project endpoints Closes gitaly#873 See merge request gitlab-org/gitlab-ce!16249
| * Migrate GitlabProject (re)move project endpointsZeger-Jan van de Weg2018-01-091-11/+23
| | | | | | | | | | | | | | | | | | Migration is done through a small refactoring, which makes us call endpoins which are performing the same actions for namespaces. Tests are added to ensure only the project is removed that should be removed. Closes gitlab-org/gitaly#873
* | Merge branch 'jej/backport-authorized-keys-to-ce' into 'master'Douwe Maan2018-01-091-11/+313
|\ \ | |/ |/| | | | | | | | | Backport authorized_keys Closes gitlab-ee#3953 See merge request gitlab-org/gitlab-ce!16014
| * Fix spec in shell_spec.rbJames Edwards-Jones2018-01-081-1/+1
| | | | | | | | | | The spec for "#add_key does nothing" would always have passed, since the expectation was on both the wrong object and message.
| * Backport spec fixes in spec/lib/gitlab/shell_spec.rbValery Sizov2018-01-081-10/+12
| |
| * Backport authorized_keys_enabled defaults to true'Michael Kozono2018-01-081-0/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally from branch 'fix-authorized-keys-enabled-default-2738' via merge request https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2240 Removed background migrations which were intended to fix state after using Gitlab without a default having been set Squashed commits: Locally, if Spring was not restarted, `current_application_settings` was still cached, which prevented the migration from editing the file. This will also ensure that any app server somehow hitting old cache data will properly default this setting regardless. Retroactively fix migration This allows us to identify customers who ran the broken migration. Their `authorized_keys_enabled` column does not have a default at this point. We will fix the column after we fix the `authorized_keys` file. Fix authorized_keys file if needed Add default to authorized_keys_enabled setting Reminder: The original migration was fixed retroactively a few commits ago, so people who did not ever run GitLab 9.3.0 already have a column that defaults to true and disallows nulls. I have tested on PostgreSQL and MySQL that it is safe to run this migration regardless. Affected customers who did run 9.3.0 are the ones who need this migration to fix the authorized_keys_enabled column. The reason for the retroactive fix plus this migration is that it allows us to run a migration in between to fix the authorized_keys file only for those who ran 9.3.0. Tweaks to address feedback Extract work into background migration Move batch-add-logic to background migration Do the work synchronously to avoid multiple workers attempting to add batches of keys at the same time. Also, make the delete portion wait until after adding is done. Do read and delete work in background migration Fix Rubocop offenses Add changelog entry Inform the user of actions taken or not taken Prevent unnecessary `select`s and `remove_key`s Add logs for action taken Fix optimization Reuse `Gitlab::ShellAdapter` Guarantee the earliest key Fix migration spec for MySQL
| * Backport option to disable writing to `authorized_keys` fileMichael Kozono2018-01-081-11/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally branch 'mk-toggle-writing-to-auth-keys-1631' See merge request !2004 Squashed commits: Add authorized_keys_enabled to Application Settings Ensure default settings are exposed in UI Without this change, `authorized_keys_enabled` is unchecked when it is nil, even if it should be checked by default. Add “Speed up SSH operations” documentation Clarify the reasons for disabling writes Add "How to go back" section Tweak copy Update Application Setting screenshot
* | Pass timeout to RepositoryService.FetchRemote Gitaly RPC calls41683-timeout-is-not-set-for-gitaly-fetch_remote-callsAlejandro RodrĂ­guez2018-01-051-2/+18
|/
* Move delete_remote_branches from Gitlab::Shell to Gitlab::Git::RepositoryAlejandro RodrĂ­guez2018-01-031-28/+0
|
* Move push_remote_branches from Gitlab::Shell to Gitlab::Git::RepositoryAlejandro RodrĂ­guez2018-01-031-28/+0
|
* Import gitlab_projects.rb from gitlab-shellNick Thomas2017-12-141-93/+138
| | | | | | | | | By importing this Ruby code into gitlab-rails (and gitaly-ruby), we avoid 200ms of startup time for each gitlab_projects subprocess we are eliminating. By not having a gitlab_projects subprocess between gitlab-rails / sidekiq and any git subprocesses (e.g. for fork_project, fetch_remote, etc, calls), we can also manage these git processes more cleanly, and avoid sending SIGKILL to them
* Fix the fork project functionality for projects with hashed storageNick Thomas2017-12-041-4/+4
| | | | Note the dependency on gitlab-shell v5.10.0
* Replaces `tag: true` into `:tag` in the specsJacopo2017-10-071-2/+2
| | | | | | 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.
* Gitaly namespace service enabled for GitLabZeger-Jan van de Weg2017-10-051-4/+48
|
* Fix 'gitlay' typo in specJacob Vosmaer2017-10-021-1/+1
|
* Create repositories via GitalyJacob Vosmaer2017-09-291-17/+29
|
* [Backported from EE] Readonly flag for ProjectsGabriel Mazetto2017-09-281-10/+31
| | | | | This is used in EE for the storage migration, and we want to use this in CE as well to be able to migrate projects to hashed_storage.
* Migrate Repository.FetchRemote to Gitalygitaly-440-shell-fetch-remoteKim "BKC" CarlbÀcker2017-08-301-15/+49
| | | | - `Gitlab::Shell.fetch_remote` now takes a `Gitlab::Git::Repository` instead
* Speed up project creation by inlining repository creationNick Thomas2017-08-151-11/+24
|
* Backport changes in ↔Nick Thomas2017-08-071-8/+82
| | | | https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2551 to CE
* Use described_class when possibleRĂ©my Coutable2017-07-271-3/+3
| | | | Signed-off-by: RĂ©my Coutable <remy@rymai.me>
* Remove superfluous lib: true, type: redis, service: true, models: true, ↔RĂ©my Coutable2017-07-271-2/+2
| | | | | | services: true, no_db: true, api: true Signed-off-by: RĂ©my Coutable <remy@rymai.me>
* Speed up operations performed by gitlab-shellStan Hu2017-07-031-5/+82
|
* Merge branch 'mrchrisw-import-shell-timeout'Sean McGivern2017-05-051-0/+41
|
* Enable RSpec/FilePath copenable-spec-file-name-copSean McGivern2017-04-261-0/+94
- Ignore JS fixtures - Ignore qa directory - Rewrite concern specs to put concern name first