summaryrefslogtreecommitdiff
path: root/db
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'disallow-retry-of-old-builds' into 'master'Grzegorz Bizon2018-11-052-0/+12
|\ | | | | | | | | | | | | Disallow retry of old builds Closes #50939 See merge request gitlab-org/gitlab-ce!22538
| * Allow to make builds soft-archived.disallow-retry-of-old-buildsKamil Trzciński2018-11-052-0/+12
| | | | | | | | | | The soft-archived builds cannot be run after some deadline time. The intent is to aggressively recycle old builds after sometime.
* | Start tracking pool repositoriesNick Thomas2018-11-053-0/+49
| |
* | Start tracking shards in the databaseNick Thomas2018-11-052-0/+17
|/
* Merge branch 'rd-set-missing-fields-on-migration' into 'master'Douwe Maan2018-11-021-2/+2
|\ | | | | | | | | | | | | Fixes a migration that causes error on some legacy DBs Closes #46862 See merge request gitlab-org/gitlab-ce!22761
| * Fixes a migration that causes error on some legacy DBsrd-set-missing-fields-on-migrationRubén Dávila2018-11-011-2/+2
| | | | | | | | | | | | | | | | | | Looks like there are some legacy GitLab databases that have a NOT NULL constraint for the `created_at` and `updated` fields. This change fixes the migration by adding a default value to those columns and I think we always should have it in mind when inserting DB records through raw SQL.
* | Add index to find stuck merge requests.ab-45608-stuck-mr-queryAndreas Brandl2018-11-012-1/+18
| | | | | | | | | | | | | | See https://gitlab.com/gitlab-org/gitlab-ce/issues/45608#note_113803790 for query and plan. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/45608.
* | Merge branch 'gt-update-typos-in-comments-and-specs' into 'master'Achilleas Pipinellis2018-11-011-1/+1
|\ \ | | | | | | | | | | | | Fix typos in comments and specs See merge request gitlab-org/gitlab-ce!22683
| * | Fix typos in comments and specsGeorge Tsiolis2018-11-011-1/+1
| | |
* | | Drop gcp_clusters tableShinya Maeda2018-10-312-33/+54
| | |
* | | Enhance performance of counting local LFS objectstc-index-lfs-objects-file-storeToon Claes2018-10-302-0/+18
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an index to the `file_store` column on `lfs_objects`. This makes counting local objects faster. Also, there is no longer need to check for objects with `file_store` being `NULL`. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18557 --- ### Query plans #### Before & with `NULL` ``` Aggregate (cost=113495.96..113495.97 rows=1 width=8) (actual time=1691.394..1691.394 rows=1 loops=1) -> Seq Scan on lfs_objects (cost=0.00..106415.50 rows=2832186 width=0) (actual time=0.012..1312.488 rows=2852607 loops=1) Filter: ((file_store = 1) OR (file_store IS NULL)) Rows Removed by Filter: 131 Planning time: 0.077 ms Execution time: 1691.433 ms ``` #### Before, without `NULL` ``` Aggregate (cost=113495.96..113495.97 rows=1 width=8) (actual time=856.423..856.424 rows=1 loops=1) -> Seq Scan on lfs_objects (cost=0.00..106415.50 rows=2832186 width=0) (actual time=0.012..672.181 rows=2852607 loops=1) Filter: (file_store = 1) Rows Removed by Filter: 131 Planning time: 0.128 ms Execution time: 856.470 ms ``` #### After & with `NULL` ``` Aggregate (cost=68819.95..68819.96 rows=1 width=8) (actual time=583.355..583.355 rows=1 loops=1) -> Index Only Scan using index_lfs_objects_on_file_store on lfs_objects (cost=0.43..61688.35 rows=2852643 width=0) (actual time=0.028..399.177 rows=2852607 loops=1) Filter: ((file_store = 1) OR (file_store IS NULL)) Rows Removed by Filter: 131 Heap Fetches: 867 Planning time: 0.096 ms Execution time: 583.404 ms ``` #### After, without `NULL` ``` Aggregate (cost=68817.29..68817.30 rows=1 width=8) (actual time=490.550..490.551 rows=1 loops=1) -> Index Only Scan using index_lfs_objects_on_file_store on lfs_objects (cost=0.43..61685.68 rows=2852643 width=0) (actual time=0.040..311.760 rows=2852607 loops=1) Index Cond: (file_store = 1) Heap Fetches: 831 Planning time: 0.294 ms Execution time: 490.590 ms ``` Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/6067
* | Merge remote-tracking branch 'origin/master' into dev-masterDJ Mountney2018-10-295-1/+118
|\ \
| * | Associate clusters model to groups34758-create-group-clustersThong Kuah2018-10-293-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though we currently only should have one group for a cluster, we allow the flexibility to associate to other groups in the future. This also matches the runner <=> groups association. - Adds Cluster#first_group, aliased to Cluster#group. For the conceivable future, a cluster will have at most one group. - Prevent mixing of group and project clusters. If project type clusters, it should only have projects assigned. Similarly with groups. - Default cluster_type to :project_type. As it's very small table we can set default and null: false in one release.
| * | Automatically navigate to last board visitedBrett Walker2018-10-263-1/+72
| | |
* | | Merge branch 'security-redact-links' into 'master'Jan Provaznik2018-10-292-1/+66
|\ \ \ | | | | | | | | | | | | | | | | [master] Redact unsubscribe links in issuable texts See merge request gitlab/gitlabhq!2528
| * | | Redact unsubscribe links in issuable textsJan Provaznik2018-10-232-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible that user pastes accidentally also unsubscribe link which is included in footer of notification emails. This unsubscribe link contains personal token which attacker then use to act as the original user (e.g. for sending comments under his/her identity).
* | | | [master] Persist only SHA digest of PersonalAccessToken#tokenImre Farkas2018-10-294-1/+67
| |/ / |/| |
* | | Resolve "Filter discussion (tab) by comments or activity in issues and merge ↵Oswaldo Ferreira2018-10-232-0/+42
|/ / | | | | | | requests"
* | Merge branch '51716-add-kubernetes-namespace-model' into 'master'Andreas Brandl2018-10-222-0/+44
|\ \ | | | | | | | | | | | | Add Clusters::KubernetesNamespace model See merge request gitlab-org/gitlab-ce!22404
| * | Add Clusters::KubernetesNamespace model51716-add-kubernetes-namespace-modelMayra Cabrera2018-10-222-0/+44
| |/ | | | | | | | | This model will be used to persist into database Kubernetes properties, such as namespace, service account name and service account token.
* | Merge branch 'refactor-project-rename-repo' into 'master'Robert Speicher2018-10-222-4/+8
|\ \ | | | | | | | | | | | | Move Project#rename_repo to a service class See merge request gitlab-org/gitlab-ce!22419
| * | Move Project#rename_repo to a service classrefactor-project-rename-repoYorick Peterse2018-10-222-4/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the logic of Project#rename_repo and all methods _only_ used by this method into a new service class: Projects::AfterRenameService. By moving this code into a separate service class we can more easily refactor it, and we also get rid of some RuboCop "disable" statements automatically. During the refactoring of this code, I removed most of the explicit logging using Gitlab::AppLogger. The data that was logged would not be useful when debugging renaming issues, as it does not add any value on top of data provided by users. I also removed a variety of comments that either mentioned something the code does in literal form, or contained various grammatical errors. Instead we now resort to more clearly named methods, removing the need for code comments. This method was chosen based on analysis in https://gitlab.com/gitlab-org/release/framework/issues/28. In this issue we determined this method has seen a total of 293 lines being changed in it. We also noticed that RuboCop determined the ABC size (https://www.softwarerenovation.com/ABCMetric.pdf) was too great.
* | Merge branch 'use-raw-file-format' into 'master'Grzegorz Bizon2018-10-221-1/+74
|\ \ | | | | | | | | | | | | | | | | | | Add RAW file format which is used to store security reports Closes gitlab-ee#7996 See merge request gitlab-org/gitlab-ce!22365
| * | Make all legacy security reports to use raw formatuse-raw-file-formatKamil Trzciński2018-10-161-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | - This introduces and uses `:raw` format for all legacy reports, the ones that do not have yet proper parsers on Backend - Raw format is needed to make Frontend be able to parse reports, without the need of decompressing, - This also extends fixtures to seed security reports with database, even though parser code is part of EE
* | | Update the moved Git repos for developersTakuya Noguchi2018-10-221-5/+5
| |/ |/| | | | | Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* | Remove Koding integration and documentationStan Hu2018-10-122-3/+18
|/ | | | | | This integration no longer works and does not appear to be supported. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/39697
* Remove Git circuit breakerZeger-Jan van de Weg2018-10-102-6/+31
| | | | | | | Was introduced in the time that GitLab still used NFS, which is not required anymore in most cases. By removing this, the API it calls will return empty responses. This interface has to be removed in the next major release, expected to be 12.0.
* Remove unencrypted webhook token and URL columnsNick Thomas2018-10-093-3/+26
|
* Use a CTE to remove the query timeoutBrett Walker2018-10-052-1/+33
|
* Merge branch 'master-ce' into scheduled-manual-jobsShinya Maeda2018-10-052-0/+17
|\
| * Make GitLab pages support access controlTuomo Ala-Vannesluoma2018-10-052-0/+17
| |
* | Remove unnecessary change in schema.rbShinya Maeda2018-10-051-1/+0
| |
* | Change partial index's condition to make stale delayed builds removal a lot ↵Shinya Maeda2018-10-052-2/+3
| | | | | | | | faster
* | Merge branch 'master-ce' into scheduled-manual-jobsShinya Maeda2018-10-053-5/+1
|\ \ | |/
| * Merge branch 'fix-todo-cops' into 'master'Rémy Coutable2018-10-043-5/+1
| |\ | | | | | | | | | | | | Fix todo cops See merge request gitlab-org/gitlab-ce!21850
| | * Fix UnneededRequireStatement copSemyon Pupkov2018-09-212-4/+0
| | |
| | * Fix SpaceBeforeFirstArg copSemyon Pupkov2018-09-201-1/+1
| | |
* | | Remove unnecessary changes in schema.rbShinya Maeda2018-10-031-1/+0
| | |
* | | Improve performance of stale scheduled builds searchShinya Maeda2018-10-032-3/+4
| | |
* | | Merge branch 'master-ce' into scheduled-manual-jobsShinya Maeda2018-10-031-0/+2
|\ \ \ | |/ /
| * | Fix rename_login_root_namespaces post migrationMario de la Ossa2018-10-021-0/+2
| | |
* | | Fix partial index for scheduled_atShinya Maeda2018-10-022-2/+2
| | |
* | | Remove unnecessary change from schema.rbShinya Maeda2018-10-021-1/+0
| | |
* | | Remove unnecessary tableShinya Maeda2018-10-021-8/+0
| | |
* | | Add scheduled_at column to ci_builds, and add a partial index as wellShinya Maeda2018-10-024-20/+31
| | |
* | | Squashed commit of the following:Shinya Maeda2018-10-022-0/+27
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 9d9594ba20097dc4598f7eb42a9f9d78d73eae54 Author: Shinya Maeda <shinya@gitlab.com> Date: Thu Sep 13 20:18:31 2018 +0900 Cancel scheduled jobs commit f31c7172e07a9eb03b58c1e62eaa18cda4064aa6 Author: Shinya Maeda <shinya@gitlab.com> Date: Thu Sep 13 11:18:42 2018 +0900 Add Ci::BuildSchedule commit fb6b3ca638f40f9e1ee38b1fdd892bda4f6fede7 Author: Shinya Maeda <shinya@gitlab.com> Date: Wed Sep 12 20:02:50 2018 +0900 Scheduled jobs
* | Merge branch 'osw-configurable-single-diff-file-limit' into 'master'Douwe Maan2018-10-022-1/+27
|\ \ | | | | | | | | | | | | | | | | | | Make single diff patch limit configurable Closes #48027 See merge request gitlab-org/gitlab-ce!21886
| * | Make single diff patch limit configurableosw-configurable-single-diff-file-limitOswaldo Ferreira2018-10-012-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Creates a new column to hold the single patch limit value on application_settings - Allows updating this value through the application_settings API - Calculates single diff patch collapsing limit based on diff_max_patch_bytes column - Updates diff limit documentation - Adds documentation (with warning) as of how one can update this limit
* | | Migrate sensitive web hook data in the backgroundNick Thomas2018-10-011-0/+33
| | |
* | | Encrypt webhook tokens and URLs in the databaseNick Thomas2018-10-012-0/+19
| | |