summaryrefslogtreecommitdiff
path: root/lib/tasks
Commit message (Collapse)AuthorAgeFilesLines
* Backport EE changes to gitlab:env:inforemaining-lib-differencesYorick Peterse2019-04-021-0/+27
| | | | | | | This backports EE specific changes for the Rake task `gitlab:env:info`, wrapping them in a conditional. There is no way to inject code in the middle of a Rake task in EE, so unfortunately this is the best we can do.
* Fix attempting to drop views in PostgreSQLweimeng-master-patch-83366Wei-Meng Lee2019-04-021-1/+4
|
* Document ApplicationRecord / pluck_primary_keyNick Thomas2019-03-291-1/+1
| | | | We also enable the rubocop that makes it mandatory
* Add helper method to return a human-friendly name for database adapterDouglas Barbosa Alexandre2019-03-211-4/+2
|
* Merge branch ↵Lin Jen-Shin2019-03-191-1/+12
|\ | | | | | | | | | | | | | | | | '58844-follow-up-from-don-t-create-ee-specific-files-when-creating-emojis-fixture-files' into 'master' Simplify JavaScriptFixturesHelpers Closes gitlab-ee#10386, #58898, and #58844 See merge request gitlab-org/gitlab-ce!26045
| * Simplify the JavaScriptFixturesHelpers moduleRémy Coutable2019-03-191-1/+12
| | | | | | | | | | | | | | | | | | | | | | - Only storing fixtures in one place - This place changes whether we are in CE or EE We discovered with @winh that only fixtures located under spec/javascripts/fixtures are used, even in EE so there's no need to clean/create fixtures in ee/spec/javascripts/fixtures. Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Integrate Gitlab::Keys with Gitlab::ShellPatrick Bajao2019-03-191-11/+4
|/ | | | | | | | | | | 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.
* Run rubocop -aNick Thomas2019-03-135-48/+37
|
* Prevent storage migration and rollback running at the same time58739-hashed-storage-prevent-a-migration-and-rollback-running-at-the-same-timeGabriel Mazetto2019-03-121-1/+14
| | | | | | This is a small polishing on the storage migration and storage rollback rake tasks. By aborting a migration while a rollback is already scheduled we want to prevent unexpected consequences.
* Update cleanup.rake to fix a typo in the error messageRay Paik2019-03-071-1/+1
|
* Moved all emojis to the public folderTim Zallmann2019-03-071-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Created new emojis map in public folder Renamed folder to emojis Loading now the emojis from Localstorage or from Server Moved all emojis to the public folder Loading the emojis.json file now through AJAX Loads now the map in the web element instead when building the emoji tag Updated the custom Element Setup to modern method Fixed Emoji Karma Specs for async loading Loading now the emojis from Localstorage or from Server Loads now the map in the web element instead when building the emoji tag Fixed problem with FIXTURE_PATH for emojis fixtures Fixes Linting Error in gemojione.rake Fixed Emoji Karma Specs Fix static type check in gemojione and check if already registered Testing if the Emoji Support Check is failing Rspec Change of CLass Name, returning true on check to test Fixes failing Emoji RSpec Tests Moved Emojis into public/-/emojis/1/ Fixed Linting Errors in gl_emoji Fix to fixtures creation for emojis Fixed path spec for new subdirectory -/emojis Optimized emojis.json output Fix for Emoji Spec failure due to unicode dataset Better catch handling for emojis
* Merge branch 'resolve-some-rake-differences' into 'master'Rémy Coutable2019-03-042-2/+2
|\ | | | | | | | | Resolve some Rake task differences See merge request gitlab-org/gitlab-ce!25644
| * Make the backup Rake task the same as in EEYorick Peterse2019-02-281-1/+1
| | | | | | | | | | | | EE uses single quotes for the changed line, whereas CE was using double quotes. This commit ensures both repositories use the same kind of quotes.
| * Backport EE changes to the Karma Rake taskYorick Peterse2019-02-281-1/+1
| | | | | | | | | | There's no harm in globbing for the ee/ directory, since this will effectively be a noop in CE.
* | Merge branch 'sh-rugged-find-commit' into 'master'Sean McGivern2019-03-041-0/+24
|\ \ | | | | | | | | | | | | Bring back Rugged implementation of find_commit See merge request gitlab-org/gitlab-ce!25477
| * | Bring back Rugged implementation of find_commitStan Hu2019-03-011-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings back some of the changes in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20339. For users using Gitaly on top of NFS, accessing the Git data directly via Rugged is more performant than Gitaly. This merge request introduces the feature flag `rugged_find_commit` to activate Rugged paths. There are also Rake tasks `gitlab:features:enable_rugged` and `gitlab:features:disable_rugged` to enable/disable these feature flags altogether. Part of four Rugged changes identified in https://gitlab.com/gitlab-org/gitlab-ce/issues/57317.
* | | Added Rollbacker workers and support on the rake taskGabriel Mazetto2019-03-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rollback is done similar to Migration for the Hashed Storage. It also shares the same ExclusiveLease key to prevent both happening at the same time. All Hashed Storage related workers now share the same queue namespace which allows for assigning dedicated workers easily.
* | | Rake task for storage rollbackGabriel Mazetto2019-03-011-0/+45
|/ /
* | Prepare test suite for switch to Gitaly-embedded Git hooksJacob Vosmaer2019-02-271-2/+2
|/
* Reduce remaining diff with EE in app/servicesRémy Coutable2019-02-141-0/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Move terminate_all_connections into setup Rake taskStan Hu2019-02-111-1/+21
|
* Kill all PostgreSQL connections for rake dev:setupStan Hu2019-02-111-0/+5
| | | | | | | | | | | | | | If there are any clients connected to the DB, PostgreSQL won't let you drop the database. It's possible that Sidekiq, Unicorn, or some other client will be hanging onto a connection, preventing the DROP DATABASE from working. To workaround this problem, this method cancels all the connections so that the db:reset command will work. Note that there's still a slight possibility a client connects after its connection is terminated. If this is an issue, we could solve it by revoking CONNECT access, but for now it seems this works. Closes https://gitlab.com/gitlab-org/gitlab-development-kit/issues/450
* Fix MySQL error when truncating a table that doesn't existJose Torres2019-02-051-2/+3
| | | | | | | This adds a conditional statement before truncating the `schema_migrations` table. This comit also ports this code to Rails 5.
* Add cache to the 'compile-assets' and 'gitlab:assets:compile' jobsRémy Coutable2019-02-051-7/+11
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch 'master' into ↵Rémy Coutable2019-02-0425-645/+417
|\ | | | | | | | | | | '46448-add-timestamps-for-each-stage-of-gitlab-rake-gitlab-backup-restore' # Conflicts: # spec/tasks/gitlab/backup_rake_spec.rb
| * Refactor Storage MigrationGabriel Mazetto2019-01-251-1/+1
| | | | | | | | | | | | | | | | | | Specs were reviewed and improved to better cover the current behavior. There was some standardization done as well to facilitate the implementation of the rollback functionality. StorageMigratorWorker was extracted to HashedStorage namespace were RollbackerWorker will live one as well.
| * Prepare rake task for storage rollbackGabriel Mazetto2019-01-251-1/+1
| | | | | | | | We are keeping compatibility with existing scheduled jobs.
| * Enable the Layout/ExtraSpacing cop56392-enable-the-layout-extraspacing-copRémy Coutable2019-01-241-3/+3
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Prevent admins from attempting hashed storage migration on read only DBMichael Kozono2018-12-191-2/+8
| |
| * Fix gitlab:web_hook tasksNick Thomas2018-12-061-13/+32
| |
| * Extract system check rake task logicMichael Kozono2018-12-031-246/+13
| | | | | | | | | | These changes make the code more reusable, testable, and most importantly, overrideable.
| * Fix typo in method name "silence_stderr"Brett Walker2018-11-291-2/+2
| |
| * Merge branch 'zj-object-pool-path' into 'master'Nick Thomas2018-11-281-2/+2
| |\ | | | | | | | | | | | | Rename Repository table to PoolRepository See merge request gitlab-org/gitlab-ce!23236
| | * Rename the Repository table to PoolRepositoryZeger-Jan van de Weg2018-11-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To separate the different kinds of repositories we have at GitLab this table will be renamed to pool_repositories. A project can, for now at least, be member of none, or one of these. The table will get additional columns in a later merge request where more logic is implemented for the model. Further included is a small refactor of logic around hashing ids for the disk_path, mainly to ensure a previous implementation is reusable. The disk_path for the pool_repositories table no longer has a NOT NULL constraint, but given the hashing of the ID requires the DB to assign the record an ID, an after_create hook is used to update the value. A related MR is: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23143, adding tables for 'normal' repositories and wiki_repositories.
| * | Merge branch '50341-cleanup-useless-project-import-attributes' into 'master'Douwe Maan2018-11-281-2/+2
| |\ \ | | | | | | | | | | | | | | | | Removes all the irrelevant code and columns that were migrated from the Project… See merge request gitlab-org/gitlab-ce!21497
| | * | Removes all the irrelevant import related code and columnsTiago Botelho2018-11-271-2/+2
| | |/ | | | | | | | | | | | | Clears the import related columns and code from the Project model over to the ProjectImportState model
| * | Remove Site Statistic53778-remove-site-statisticsGabriel Mazetto2018-11-261-15/+0
| |/ | | | | | | | | This approach caused many different problems as we tightened the query execution timeout.
| * Migrate storage checks to GitalyZeger-Jan van de Weg2018-11-091-37/+0
| | | | | | | | | | | | | | | | Most of these checks are not valuable in the current setup, thus removed and replaced by Gitaly checking if its read and writeable. Depends on: 1. https://gitlab.com/gitlab-org/gitaly/merge_requests/675
| * Merge branch 'rake-gitaly-check' into 'master'Rémy Coutable2018-11-061-117/+22
| |\ | | | | | | | | | | | | | | | | | | Delegate storage health check to Gitaly's health check Closes gitaly#1336 See merge request gitlab-org/gitlab-ce!22063
| | * Add gitlab:gitaly:check task for Gitaly health checkrake-gitaly-checkAlejandro Rodríguez2018-10-231-117/+22
| | | | | | | | | | | | | | | | | | | | | Also, since Gitaly now takes care of checking for storage paths existence/accessibility, we can remove those check from the gitlab:gitlab_shell_check task and advance further into 0 direct disk approach on gitlab-rails
| * | Merge remote-tracking branch 'origin/master' into dev-masterDJ Mountney2018-10-291-1/+1
| |\ \
| | * | Use gitlab_environment for ldap rake task52993-ldap-rename_provider-rake-task-brokenCindy Pallares2018-10-251-1/+1
| | | |
| * | | [master] Persist only SHA digest of PersonalAccessToken#tokenImre Farkas2018-10-291-9/+5
| |/ /
| * | Convert parser warnings to stdout in haml_lintsh-bump-ruby-2.4.5Lin Jen-Shin2018-10-241-0/+11
| |/ | | | | | | | | | | This was used in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16648 and this could happen from time to time, so let's just keep it.
| * Make getting a user by the username case insensitiveWilliam George2018-10-181-1/+1
| |
| * Typo in log message of gitlab-rake gitlab:artifacts:migrateMichael Bisbjerg2018-09-271-1/+1
| |
| * Resolve "Un-vendor CI templates"Dylan Griffith2018-09-261-4/+0
| |
| * Merge branch 'follow-up-geo-sync-disabled-wikis' into 'master'Douglas Barbosa Alexandre2018-09-251-8/+0
| |\ | | | | | | | | | | | | CE port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6906 See merge request gitlab-org/gitlab-ce!21903
| | * Geo: sync disabled wikis. Stage 2follow-up-geo-sync-disabled-wikisValery Sizov2018-09-251-8/+0
| | | | | | | | | | | | | | | | | | | | | We started syncing all the wiki regardless of the fact it's disabled or not. We couldn't do that in one stage because of needing of smoth update and deprecating things. This is the second stage that finally removes unused columns in the geo_node_status table.
| * | Enable write to auth_keys file during restoreCindy Pallares2018-09-251-2/+44
| |/ | | | | | | | | | | Fast lookup of authorized SSH keys in the database was ported to CE in v10.4. This change adds the option to enable the setting via the restore rake task and assumes yes if the force env variable is set.