summaryrefslogtreecommitdiff
path: root/db
Commit message (Collapse)AuthorAgeFilesLines
...
* | | fix specsMicaël Bergeron2018-02-012-4/+6
| | |
* | | port of 594e6a0a625^..f74c90f68c6Micaël Bergeron2018-02-011-0/+20
|/ /
* | Use limit for search count queriessearch-100Jan Provaznik2018-01-232-1/+17
|/ | | | | | | | | | | | | | | | | | | | | | Search query is especially slow if a user searches a generic string which matches many records, in such case search can take tens of seconds or time out. To speed up the search query, we search only for first 1000 records, if there is >1000 matching records we just display "1000+" instead of precise total count supposing that with such amount the exact count is not so important for the user. Because for issues even limited search was not fast enough, 2-phase approach is used for issues: first we use simpler/faster query to get all public issues, if this exceeds the limit, we just return the limit. If the amount of matching results is lower than limit, we re-run more complex search query (which includes also confidential issues). Re-running the complex query should be fast enough in such case because the amount of matching issues is lower than limit. Because exact total_count is now limited, this patch also switches to to "prev/next" pagination. Related #40540
* Merge branch 'fix-redirect-routes-schema' into 'master'Yorick Peterse2018-01-192-3/+69
|\ | | | | | | | | rework indexes on redirect_routes See merge request gitlab-org/gitlab-ce!16211
| * Rework indexes on redirect_routes to be more effective and enforce a case ↵fix-redirect-routes-schemaGreg Stark2018-01-182-3/+69
| | | | | | | | insensitive unique path
* | Get rid of a Rails 5 deprecation warning in ↵Rémy Coutable2018-01-181-1/+1
| | | | | | | | | | | | db/migrate/20170425112128_create_pipeline_schedules_table.rb Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Applied fixFrancisco Javier López2018-01-172-28/+68
| |
* | Resolve conflicts in VERSION, db/schema.rb, and spec/models/service_spec.rbStan Hu2018-01-161-4/+0
| |
* | Merge branch 'sh-migrate-can-push-to-deploy-keys-projects-10-3' into ↵Douwe Maan2018-01-165-1/+124
| | | | | | | | | | | | | | | | | | | | | | | | 'security-10-3' [10.3] Migrate `can_push` column from `keys` to `deploy_keys_project` See merge request gitlab/gitlabhq!2276 (cherry picked from commit f6ca52d31bac350a23938e0aebf717c767b4710c) 1f2bd3c0 Backport to 10.3
* | Last push widget will show banner for new pushes to previously merged branchDrew Blessing2018-01-152-0/+19
| | | | | | | | | | | | Previously, the last push widget would only show when the branch never had a merge request associated with it - even merged or closed ones. Now the widget will disregard merge requests that are merged or closed.
* | Display related merge requests in commit detail pageHiroyuki Sato2018-01-122-0/+18
|/
* Adds Rubocop rule for line break around conditionals🙈 jacopo beschi 🙉2018-01-114-0/+5
|
* Merge branch 'remove-soft-removals' into 'master'Douwe Maan2018-01-113-8/+239
|\ | | | | | | | | | | | | Remove soft removals related code Closes #37447 See merge request gitlab-org/gitlab-ce!15789
| * Added tests for removing soft removed objectsremove-soft-removalsYorick Peterse2018-01-101-12/+10
| |
| * Remove soft removals related codeYorick Peterse2018-01-083-8/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes all usage of soft removals except for the "pending delete" system implemented for projects. This in turn simplifies all the query plans of the models that used soft removals. Since we don't really use soft removals for anything useful there's no point in keeping it around. This _does_ mean that hard removals of issues (which only admins can do if I'm not mistaken) can influence the "iid" values, but that code is broken to begin with. More on this (and how to fix it) can be found in https://gitlab.com/gitlab-org/gitlab-ce/issues/31114. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37447
* | Denormalize commits count for merge request diffs38068-commits-countJan Provaznik2018-01-102-1/+31
| | | | | | | | | | | | | | | | | | For each MR diff an extra 'SELECT COUNT()' is executed to get number of commits for the diff. Overall time to get counts for all MR diffs may be quite expensive. To speed up loading of MR info, information about number of commits is stored in a MR diff's extra column. Closes #38068
* | Merge branch 'jej/backport-authorized-keys-to-ce' into 'master'Douwe Maan2018-01-093-0/+37
|\ \ | | | | | | | | | | | | | | | | | | Backport authorized_keys Closes gitlab-ee#3953 See merge request gitlab-org/gitlab-ce!16014
| * | Avoid adding index if already existsPaco Guzman2018-01-081-1/+2
| | |
| * | Backport authorized_keys_enabled defaults to true'Michael Kozono2018-01-082-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-082-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Backport authorized_keys branch 'find-key-by-fingerprint'Pablo Carranza2018-01-081-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add find key by base64 key or fingerprint to the internal API See merge request !250 Squashed changes: Add unique index to fingerprint Add new index to schema Add internal api to get ssh key by fingerprint Change API endpoint to authorized_keys Add InsecureKeyFingerprint that calculates the fingerprint without shelling out Add require for gitlab key fingerprint Remove uniqueness of fingerprint index Remove unique option from migration Fix spec style in fingerprint test Fix rubocop complain Extract insecure key fingerprint to separate file Change migration to support building index concurrently Remove those hideous tabs
* | | Merge branch 'osw-merge-request-metrics-population-scheduler-improvement' ↵Stan Hu2018-01-081-31/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Remove unnecessary queries on Merge Request Metrics population scheduler Closes gitlab-org/release/tasks#13 See merge request gitlab-org/gitlab-ce!16292
| * | | Remove unnecessary queries on Merge Request Metrics population schedulerOswaldo Ferreira2018-01-081-31/+1
| | |/ | |/|
* | | Add memoization for properties40418-migrate-existing-data-from-kubernetesservice-to-clusters-platforms-kubernetesShinya Maeda2018-01-081-4/+10
| | |
* | | Disable STI of ActiveRecord. Refactoring specs.Shinya Maeda2018-01-081-2/+20
| | |
* | | Fix StaticSnalysysShinya Maeda2018-01-081-1/+1
| | |
* | | Revert bulk_insert and bring back AR insert(one by one)Shinya Maeda2018-01-081-52/+26
| | |
* | | Use batch update for Service deactivationShinya Maeda2018-01-081-4/+5
| | |
* | | Fix query to look for proper unmanaged kubernetes serviceShinya Maeda2018-01-081-17/+12
| | |
* | | Fix static anylysyShinya Maeda2018-01-081-2/+3
| | |
* | | Use bulk_insert instead of AR createShinya Maeda2018-01-081-12/+45
| | |
* | | Opitmize migration process by using both unmanaged_kubernetes_service and ↵Shinya Maeda2018-01-081-34/+36
| | | | | | | | | | | | kubernetes_service_without_template
* | | Avoid quotes in ActiveRecord queryShinya Maeda2018-01-081-4/+4
| | |
* | | Use explicit namespace for avoiding reference from application codeShinya Maeda2018-01-081-13/+16
| | |
* | | Add logic to swtich environment_scope by the situationShinya Maeda2018-01-081-23/+29
| | |
* | | Add env_scope testsShinya Maeda2018-01-081-0/+1
| | |
* | | Fix commentsShinya Maeda2018-01-081-10/+10
| | |
* | | Fix migration file typos and reorder Table definitionShinya Maeda2018-01-081-25/+21
| | |
* | | Fix unmanaged_kubernetes_service scope for multiple clustersShinya Maeda2018-01-081-17/+27
| | |
* | | Add test. Disable KubernetesService when migratedShinya Maeda2018-01-081-11/+12
| | |
* | | Migrate existing data from KubernetesService to Clusters::Platforms::KubernetesShinya Maeda2018-01-081-0/+104
|/ /
* | Merge branch '41249-clearing-the-cache' into 'master'Kamil Trzciński2018-01-062-0/+14
|\ \ | | | | | | | | | | | | | | | | | | Resolve "Clearing the cache" Closes #41249 See merge request gitlab-org/gitlab-ce!16067
| * \ Merge branch 'master' into 41249-clearing-the-cacheMatija Čupić2018-01-053-2/+10
| |\ \ | | |/
| * | Fix jobs_cache_index migration class nameMatija Čupić2018-01-051-1/+1
| | |
| * | Merge branch 'master' into 41249-clearing-the-cacheMatija Čupić2018-01-0411-35/+294
| |\ \
| * | | Rename Project#cache_index to jobs_cache_indexMatija Čupić2018-01-042-2/+2
| | | |
| * | | Remove default value from cache_index migrationMatija Čupić2017-12-222-9/+3
| | | |
| * | | Add cache_index migrationMatija Čupić2017-12-222-1/+21
| | | |
* | | | Merge branch 'fix-ce-migration-timestamp' into 'master'Robert Speicher2018-01-063-7/+37
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix rebase commit SHA migration name See merge request gitlab-org/gitlab-ce!16256
| * | | | Add the EE `rebase_commit_sha` migration back in its original locationRobert Speicher2018-01-051-0/+22
| | | | |