summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Fix invalid artifact path for codequalityfix-codequalityKamil Trzciński2018-11-051-1/+1
|
* Merge branch 'scheduled-manual-jobs-environment-play-buttons' into 'master'Tim Zallmann2018-11-052-2/+10
|\ | | | | | | | | | | | | 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-2226-193/+241
| |\ | | | | | | | | | | | | Conflicts: spec/javascripts/environments/environment_actions_spec.js
| * \ Merge remote-tracking branch 'gitlab.com/master' into ↵Winnie Hellmann2018-10-0923-181/+300
| |\ \ | | | | | | | | | | | | scheduled-manual-jobs-environment-play-buttons
| * | | Add scheduled actions in deployment entityShinya Maeda2018-10-042-2/+10
| | | |
* | | | Optimize merge request refresh by using the database to check commit SHAssh-optimize-mr-commit-sha-lookupStan Hu2018-11-022-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-025-16/+72
| | | |
* | | | Merge branch '51620-cannot-add-label-to-issue-from-board' into 'master'Douwe Maan2018-11-021-1/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cannot add label to issue from board Closes #51620 See merge request gitlab-org/gitlab-ce!22475
| * | | | Rename to assignable_labels_endpoint51620-cannot-add-label-to-issue-from-boardBrett Walker2018-10-311-1/+1
| | | | |
| * | | | Dynamically store the valid label endpointBrett Walker2018-10-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to ensure we have the right endpoint to query for an issue's possible valid labels, we store that url in the issue object that gets passed to the frontend.
* | | | | Merge branch 'ce-jej/group-saml-discovery-token' into 'master'Kamil Trzciński2018-11-022-3/+10
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | TokenAuthenticatable allows non-unique tokens See merge request gitlab-org/gitlab-ce!22748
| * | | | | TokenAuthenticatable allows non-unique tokensce-jej/group-saml-discovery-tokenJames Edwards-Jones2018-10-312-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids needing an index to repeatedly check that the token doesn't already exist when saving.
* | | | | | Remove ci_enable_scheduled_build feature flagShinya Maeda2018-11-021-2/+1
| | | | | |
* | | | | | Use a method for the has_many :keys in Projectuser-model-merge-conflictsYorick Peterse2018-11-012-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the `where` in the `has_many :keys` association in Project to the Key model. This allows EE to override this method, instead of modifying the source code directly.
* | | | | | Move LDAP sync time constant to a methodYorick Peterse2018-11-011-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the `1.hour` constant used as the LDAP sync time to a separate method. This allows EE to override this method using a module, instead of directly modifying the source code.
* | | | | | Merge branch 'engwan/gitlab-ce-44012-filter-reactions-none-any'Sean McGivern2018-11-011-2/+16
|\ \ \ \ \ \
| * | | | | | Fix testsHeinrich Lee Yu2018-11-011-16/+2
| | | | | | |
| * | | | | | Add None / Any options to reaction filter in issues / MRs APIHeinrich Lee Yu2018-11-011-0/+28
| | |/ / / / | |/| | | |
* | | | | | Merge branch 'gt-update-typos-in-comments-and-specs' into 'master'Achilleas Pipinellis2018-11-019-11/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typos in comments and specs See merge request gitlab-org/gitlab-ce!22683
| * | | | | | Fix typos in comments and specsGeorge Tsiolis2018-11-019-11/+11
| | | | | | |
* | | | | | | Merge branch 'sh-optimize-merge-request-project-lookup' into 'master'Sean McGivern2018-11-011-1/+1
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | Reduce SQL queries needed to load open merge requests See merge request gitlab-org/gitlab-ce!22709
| * | | | | | Reduce SQL queries needed to load open merge requestssh-optimize-merge-request-project-lookupStan Hu2018-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'remove-ee-specific-code-from-plan-and-create-models' into 'master'Douglas Barbosa Alexandre2018-10-313-5/+9
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | Remove EE-specific code from 'Discussion' models See merge request gitlab-org/gitlab-ce!22687
| * | | | | | Remove EE-specific code from DiscussionNoteremove-ee-specific-code-from-plan-and-create-modelsSean McGivern2018-10-263-5/+9
| | | | | | |
* | | | | | | Merge branch 'add-language-param-to-highlight' into 'master'Douwe Maan2018-10-302-7/+17
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add language param to highlight See merge request gitlab-org/gitlab-ce!21584
| * | | | | | | Allow FoundBlob to access language from gitattributesMark Chao2018-10-302-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract language_from_git_attributes as a concern so it can ben included in two blob classes.
| * | | | | | | Move :plain option to Highlight classMark Chao2018-10-301-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to DRY the repeated file size check. Move spec and constants to Highlight
| * | | | | | | Add BlobPresenter for highlightingMark Chao2018-10-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Force FoundBlob to use BlobPresenter
| * | | | | | | Add access to Blob's language from gitattributesMark Chao2018-10-301-0/+7
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+4
|/ / / / / /
* | | | | | Merge remote-tracking branch 'origin/master' into dev-masterDJ Mountney2018-10-2915-55/+289
|\ \ \ \ \ \
| * \ \ \ \ \ Merge branch 'rails5-deprecated-uniq' into 'master'Robert Speicher2018-10-292-2/+2
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace deprecated uniq on a Relation with distinct See merge request gitlab-org/gitlab-ce!22625
| | * | | | | | Replace deprecated uniq on a Relation with distinctJasper Maes2018-10-262-2/+2
| | | | | | | |
| * | | | | | | post merge pipeline and environments statusAlessio Caiazza2018-10-293-6/+45
| | | | | | | |
| * | | | | | | Merge branch '34758-create-group-clusters' into 'master'Andreas Brandl2018-10-294-0/+42
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-294-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-44/+16
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing count on Milestones Closes #50848 See merge request gitlab-org/gitlab-ce!21446
| | * | | | | | | Moving state_count to Milestone model and related testsEagllus2018-10-172-60/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By moving and improving state_count the functions in GlobalMilestone are no longer used.
| | * | | | | | | Fixing count on MilestonesRonald van Zon2018-10-041-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By adding groups to milestones we can now include them in the count of Open and Closed.
| * | | | | | | | Add failure reason for execution timeoutShinya Maeda2018-10-281-1/+2
| | |/ / / / / / | |/| | | | | |
| * | | | | | | Resolve "No longer require a deploy to start Prometheus monitoring"Peter Leitzen2018-10-261-1/+1
| | |/ / / / / | |/| | | | |
| * | | | | | Automatically navigate to last board visitedBrett Walker2018-10-262-0/+50
| | | | | | |
| * | | | | | Support backward compatibility when introduce new failure reasonShinya Maeda2018-10-261-1/+1
| | | | | | |
| * | | | | | Merge branch '49565-ssh-push-mirroring' into 'master'Robert Speicher2018-10-251-0/+130
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport SSH host key detection code to CE See merge request gitlab-org/gitlab-ce!22577
| | * | | | | | Backport SSH host key detection code to CENick Thomas2018-10-251-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This functionality is needed for SSH push mirroring support, which is a CE feature.
* | | | | | | | Merge branch 'fix_pat_auth-11-4' into 'security-11-4'Robert Speicher2018-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [11.4] Fix Token lookup for Git over HTTP and registry authentication See merge request gitlab/gitlabhq!2577
* | | | | | | | Merge branch 'security-redact-links' into 'master'Jan Provaznik2018-10-294-0/+42
|\ \ \ \ \ \ \ \ | |_|_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | [master] Redact unsubscribe links in issuable texts See merge request gitlab/gitlabhq!2528
| * | | | | | | Redact unsubscribe links in issuable textsJan Provaznik2018-10-234-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).