summaryrefslogtreecommitdiff
path: root/spec/models
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'scheduled-manual-jobs-environment-play-buttons' into 'master'Tim Zallmann2018-11-052-2/+60
|\ | | | | | | | | | | | | Add the Play button for delayed jobs in environment page Closes #52129 See merge request gitlab-org/gitlab-ce!22106
| * Merge branch 'master' into scheduled-manual-jobs-environment-play-buttonsWinnie Hellmann2018-10-2215-162/+273
| |\ | | | | | | | | | | | | Conflicts: spec/javascripts/environments/environment_actions_spec.js
| * | Add spec for Deployment#scheduled_actionsShinya Maeda2018-10-181-1/+16
| | |
| * | Fix and add specShinya Maeda2018-10-102-2/+45
| | |
* | | Optimize merge request refresh by using the database to check commit SHAssh-optimize-mr-commit-sha-lookupStan Hu2018-11-022-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously for a given merge request, we would: 1. Create the array of commit SHAs involved in the push (A) 2. Request all merge request commits and map the SHA (B) 3. Reload the diff if there were any common commits between A and B We can avoid additional database querying and overhead by checking with the database whether the merge request contains any of the commit SHAs. Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/53213
* | | Incorporates Kubernetes Namespace into Cluster's flowThong Kuah2018-11-026-62/+113
| | |
* | | Remove ci_enable_scheduled_build feature flagShinya Maeda2018-11-021-12/+0
| | |
* | | Merge branch 'sh-optimize-reload-diffs-service' into 'master'Sean McGivern2018-11-022-8/+8
|\ \ \ | | | | | | | | | | | | | | | | Significantly cut memory and SQL queries when reloading diffs See merge request gitlab-org/gitlab-ce!22725
| * | | Fix merge request specs that expect diff_files to be calledsh-optimize-reload-diffs-serviceStan Hu2018-11-012-8/+8
| | | |
* | | | Merge branch 'engwan/gitlab-ce-44012-filter-reactions-none-any'Sean McGivern2018-11-011-1/+17
|\ \ \ \
| * | | | Fix testsHeinrich Lee Yu2018-11-011-1/+17
| |/ / /
* | | | Merge branch 'gt-update-typos-in-comments-and-specs' into 'master'Achilleas Pipinellis2018-11-016-10/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix typos in comments and specs See merge request gitlab-org/gitlab-ce!22683
| * | | | Fix typos in comments and specsGeorge Tsiolis2018-11-016-10/+10
| | | | |
* | | | | Reduce SQL queries needed to load open merge requestssh-optimize-merge-request-project-lookupStan Hu2018-10-302-0/+18
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SQL queries and memory allocation in MergeRequests::RefreshService is dominated by queries for Project and Route loads. On staging, the absence of an inverse relationship caused Rails to make over 1100 extraneous SQL queries for the www-gitlab-com repository. Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/49703
* | | | Merge branch 'add-language-param-to-highlight' into 'master'Douwe Maan2018-10-301-0/+25
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Add language param to highlight See merge request gitlab-org/gitlab-ce!21584
| * | | | Allow FoundBlob to access language from gitattributesMark Chao2018-10-302-16/+25
| | | | | | | | | | | | | | | | | | | | | | | | | Extract language_from_git_attributes as a concern so it can ben included in two blob classes.
| * | | | Add access to Blob's language from gitattributesMark Chao2018-10-301-0/+16
| |/ / / | | | | | | | | | | | | | | | | Ported from Highlight class since it as a concept is more related to blob, and this allows more flexibility.
* | | | Merge branch 'tc-index-lfs-objects-file-store' into 'master'Douglas Barbosa Alexandre2018-10-301-19/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enhance performance of counting local LFS objects Closes gitlab-ee#6067 See merge request gitlab-org/gitlab-ce!22143
| * | | | Enhance performance of counting local LFS objectstc-index-lfs-objects-file-storeToon Claes2018-10-301-19/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Renaming Secret Variables in the codebaseMarcel Amirault2018-10-303-24/+24
|/ / /
* | | Merge remote-tracking branch 'origin/master' into dev-masterDJ Mountney2018-10-2911-73/+461
|\ \ \
| * | | post merge pipeline and environments statusAlessio Caiazza2018-10-292-1/+51
| | | |
| * | | Merge branch '34758-create-group-clusters' into 'master'Andreas Brandl2018-10-293-0/+77
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Models and migrations for group level clusters See merge request gitlab-org/gitlab-ce!22307
| | * | | Associate clusters model to groups34758-create-group-clustersThong Kuah2018-10-293-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Merge branch 'rz_fix_milestone_count' into 'master'Sean McGivern2018-10-292-35/+37
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | Fixing count on Milestones Closes #50848 See merge request gitlab-org/gitlab-ce!21446
| | * | | Update MR based on Sean's feedbackrz_fix_milestone_countEagllus2018-10-261-5/+5
| | | | |
| | * | | Removed the print in testRonald van Zon2018-10-251-3/+0
| | | | |
| | * | | Update related tests based on commentEagllus2018-10-221-6/+11
| | | | |
| | * | | Moving state_count to Milestone model and related testsEagllus2018-10-172-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | By moving and improving state_count the functions in GlobalMilestone are no longer used.
| * | | | Resolve "No longer require a deploy to start Prometheus monitoring"Peter Leitzen2018-10-261-37/+4
| | | | |
| * | | | Automatically navigate to last board visitedBrett Walker2018-10-262-0/+128
| | | | |
| * | | | Backport SSH host key detection code to CENick Thomas2018-10-251-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | This functionality is needed for SSH push mirroring support, which is a CE feature.
* | | | | Merge branch 'security-redact-links' into 'master'Jan Provaznik2018-10-291-0/+69
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | [master] Redact unsubscribe links in issuable texts See merge request gitlab/gitlabhq!2528
| * | | | | Redact unsubscribe links in issuable textsJan Provaznik2018-10-231-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-293-11/+297
| | | | | |
* | | | | | Merge branch 'sh-fix-hipchat-ssrf' into 'master'Jan Provaznik2018-10-291-0/+18
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | [master] Prevent SSRF attacks in HipChat integration See merge request gitlab/gitlabhq!2530
| * | | | | Prevent SSRF attacks in HipChat integrationStan Hu2018-10-021-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change monkey patches the HipChat client to use the GitLab HTTParty connection adapter, which can block access to certain hosts. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51142
* | | | | | Update Runner Chart to 0.1.35Tomasz Maczukin2018-10-231-3/+3
| | | | | |
* | | | | | Resolve "Filter discussion (tab) by comments or activity in issues and merge ↵Oswaldo Ferreira2018-10-233-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | requests"
* | | | | | Merge branch '42611-removed-branch-link' into 'master'Grzegorz Bizon2018-10-231-0/+35
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Removed branch link in pipelines page is broken" Closes #42611 See merge request gitlab-org/gitlab-ce!21451
| * | | | | Do not raise error when checking pipeline reference42611-removed-branch-linkGrzegorz Bizon2018-10-221-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return from the `Ci::Pipeline#ref_exists?` in case when there is no repository present. This also fixes pipeline page feature specs by changing pipeline reference instead of stubbing `ref_exist?` method.
| * | | | | Fix pipeline reference existence check and add specsGrzegorz Bizon2018-10-221-0/+23
| | | | | |
* | | | | | Merge branch '51716-add-kubernetes-namespace-model' into 'master'Andreas Brandl2018-10-224-23/+142
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Clusters::KubernetesNamespace model See merge request gitlab-org/gitlab-ce!22404
| * | | | | | Add Clusters::KubernetesNamespace model51716-add-kubernetes-namespace-modelMayra Cabrera2018-10-224-23/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-221-167/+0
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | 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-221-167/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+8
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 used version of Runner Helm Chart to 0.1.34Tomasz Maczukin2018-10-191-3/+3
| | | | | | |
* | | | | | | Merge branch 'ccr/43034_issues_controller_100_queries' into 'master'Douglas Barbosa Alexandre2018-10-191-3/+31
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add preload for routes and namespaces for issues controller. Closes #43034 See merge request gitlab-org/gitlab-ce!21651