summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'import-sources-fix' into 'master'Rémy Coutable2017-09-111-1/+1
|\ | | | | | | | | Read import sources from setting at first initialization See merge request !14141
| * Read import sources from setting at first initializationVisay Keo2017-09-091-1/+1
| |
* | Merge branch 'user-recent-push' into 'master'Douwe Maan2017-09-113-14/+45
|\ \ | | | | | | | | | | | | | | | | | | Rework how recent push events are retrieved Closes #35990 See merge request !13995
| * | Rework how recent push events are retrieveduser-recent-pushYorick Peterse2017-09-083-14/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever you push to a branch GitLab will show a button to create a merge request (should one not exist already). The underlying code to display this data was quite inefficient. For example, it involved multiple slow queries just to figure out what the most recent push event was. This commit changes the way this data is retrieved so it's much faster. This is achieved by caching the ID of the last push event on every push, which is then retrieved when loading certain pages. Database queries are only executed if necessary and the cached data is removed automatically once a merge request has been created, or 2 hours after being stored. A trade-off of this approach is that we _only_ track the last event. Previously if you were to push to branch A and B then create a merge request for branch B we'd still show the widget for branch A. As of this commit this is no longer the case, instead we will only show the widget for the branch you pushed to most recently. Once a merge request exists the widget is no longer displayed. Alternative solutions are either too complex and/or too slow, hence the decision was made to settle for this trade-off. Performance Impact ------------------ In the best case scenario (= a user didn't push anything for more than 2 hours) we perform a single Redis GET per page. Should there be cached data we will run a single (and lightweight) SQL query to get the event data from the database. If a merge request already exists we will run an additional DEL to remove the cache key. The difference in response timings can vary a bit per project. On GitLab.com the 99th percentile of time spent in User#recent_push hovers between 100 milliseconds and 1 second, while the mean hovers around 50 milliseconds. With the changes in this MR the expected time spent in User#recent_push is expected to be reduced down to just a few milliseconds. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/35990
* | | Merge branch 'feature/gpg-verification-status-remove-ignore-rule' into 'master'Douwe Maan2017-09-111-3/+0
|\ \ \ | |_|/ |/| | | | | | | | Remove ignore rule for GpgSignature#valid_signature See merge request !14050
| * | Revert "make valid_signature an ignored column"Alexis Reigel2017-09-051-3/+0
| | | | | | | | | | | | This reverts commit cce9afa38a8aa3f3e5a43ab952e1c022c9dd9385.
* | | Revert "Merge branch ↵revert-f2421b2bRubén Dávila2017-09-081-1/+0
| | | | | | | | | | | | | | | '35012-navigation-add-option-to-change-navigation-color-palette' into 'master'" This reverts merge request !13619
* | | Merge branch '29943-environment-folder' into 'security-9-5'Kamil Trzciński2017-09-071-7/+6
| |/ |/| | | | | | | Do not use `location.pathname` when accessing environments folders See merge request !2147
* | Merge branch 'improve-share-locking-feature-for-subgroups' into 'master'Douwe Maan2017-09-071-0/+14
|\ \ | | | | | | | | | | | | | | | | | | Improve "Share with group lock" feature for subgroups Closes #30550 See merge request !13944
| * | Refactor based on code reviewMichael Kozono2017-09-061-2/+2
| | |
| * | Enable share_with_group_lock on subgroupMichael Kozono2017-09-061-0/+14
| | | | | | | | | | | | …when needed
* | | Merge branch '37158-autodevops-banner' into 'master'Kamil Trzciński2017-09-071-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Banner to enable Auto DevOps at project level" Closes #37158 See merge request !13991
| * \ \ Merge branch 'zj/gitlab-ce-zj-auto-devops-table' into 37158-autodevops-bannerKamil Trzcinski2017-09-078-169/+56
| |\ \ \
| * | | | Add has_auto_devops_implicitly_disabledKamil Trzcinski2017-09-071-0/+4
| | | | |
* | | | | Merge branch 'zj-auto-devops-table' into 'master'Kamil Trzciński2017-09-074-5/+76
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | Implement the implied CI/CD config for AutoDevOps Closes #34777 See merge request !13923
| * | | | Merge remote-tracking branch 'origin/master' into ↵Kamil Trzcinski2017-09-078-169/+56
| |\ \ \ \ | | |/ / / | |/| | | | | | | | zj/gitlab-ce-zj-auto-devops-table
| * | | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵Kamil Trzcinski2017-09-069-5/+103
| |\ \ \ \ | | | |/ / | | |/| | | | | | | zj/gitlab-ce-zj-auto-devops-table
| * | | | Add tests to cover all introduced changesKamil Trzcinski2017-09-062-2/+2
| | | | |
| * | | | Implement `Project#has_ci?`Kamil Trzcinski2017-09-061-0/+4
| | | | |
| * | | | Improve config source handling codeKamil Trzcinski2017-09-064-16/+24
| | | | |
| * | | | Merge branch 'master' into zj-auto-devops-tableZeger-Jan van de Weg2017-09-0617-143/+195
| |\ \ \ \
| * | | | | Use hook for setting Pipeline config_sourceZeger-Jan van de Weg2017-09-063-14/+26
| | | | | |
| * | | | | Incorporate another round of feedbackZeger-Jan van de Weg2017-09-063-4/+4
| | | | | |
| * | | | | Fix boolean logic with nil valueZeger-Jan van de Weg2017-09-041-1/+1
| | | | | |
| * | | | | Incorporate reviewZeger-Jan van de Weg2017-09-043-11/+25
| | | | | |
| * | | | | Merge branch 'master' into zj-auto-devops-tableZeger-Jan van de Weg2017-09-0413-18/+137
| |\ \ \ \ \
| * | | | | | Fix testsZeger-Jan van de Weg2017-09-041-1/+5
| | | | | | |
| * | | | | | Add config_source to ci_pipelinesZeger-Jan van de Weg2017-08-311-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the user can soon have multiple config sources for CI, we now store what type at the time of the pipeline run we chose. This will give us insight into what triggered the new pipeline so we can display it to the enduser.
| * | | | | | Form for setting project auto devops settingsZeger-Jan van de Weg2017-08-311-0/+1
| | | | | | |
| * | | | | | Implement the implied CI/CD config for AutoDevOpsZeger-Jan van de Weg2017-08-313-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Behind an application setting, which defaults to false, this commit implements the implied CI/CD config. Which means that in the case we can't find the `.gitlab-ci.yml` on the commit we want to start a pipeline for, we fall back to an implied configuration. For now the Bash template has been copied to `Auto-Devops.gitlab-ci.yml` so the tests actually work. Fixes #34777
* | | | | | | Merge branch '23079-remove-default-scope-in-sortable' into 'master'Douwe Maan2017-09-073-9/+7
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes default scope from sortable Closes #23079 See merge request !13558
| * | | | | | Removes default scope from sortable23079-remove-default-scope-in-sortableTiago Botelho2017-09-073-9/+7
| | | | | | |
* | | | | | | Merge branch ↵Sean McGivern2017-09-071-0/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '35012-navigation-add-option-to-change-navigation-color-palette' into 'master' Add option to change navigation color palette Closes #35012 See merge request !13619
| * | | | | | | Restore some changes from !9199Rubén Dávila2017-09-061-0/+1
| | | | | | | |
* | | | | | | | Merge branch 'events-migration-cleanup' into 'master'Sean McGivern2017-09-073-162/+22
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finish migration to the new events setup Closes #37241 See merge request !13932
| * | | | | | | | Finish migration to the new events setupevents-migration-cleanupYorick Peterse2017-09-063-162/+22
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This finishes the procedure for migrating events from the old format into the new format. Code no longer uses the old setup and the database tables used during the migration process are swapped, with the old table being dropped. While the database migration can be reversed this will 1) take a lot of time as data has to be coped around 2) won't restore data in the "events.data" column as we have no way of restoring this. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37241
* | | | | | | | Merge branch 'ee_issue_928_backport' into 'master'Sean McGivern2017-09-074-7/+33
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | Group boards CE backport See merge request !13883
| * | | | | | | Fix failing specee_issue_928_backportFelipe Artur2017-09-061-1/+1
| | | | | | | |
| * | | | | | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵Simon Knox2017-09-0637-174/+395
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | ee_issue_928_backport
| * | | | | | | | Small fixesFelipe Artur2017-08-311-0/+8
| | | | | | | | |
| * | | | | | | | Continue BE backportFelipe Artur2017-08-311-0/+1
| | | | | | | | |
| * | | | | | | | Group boards CE backportFelipe Artur2017-08-284-7/+24
| | | | | | | | |
* | | | | | | | | Merge branch ↵Kamil Trzciński2017-09-062-2/+0
|\ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'fix/sm/33281-activerecord-recordinvalid-when-build-has-nil-protected' into 'master' Fix 422 error when retry job Closes #33281 See merge request !14082
| * | | | | | | | Remove only validationfix/sm/33281-activerecord-recordinvalid-when-build-has-nil-protectedShinya Maeda2017-09-072-2/+0
| | | | | | | | |
| * | | | | | | | Revert set_protectedShinya Maeda2017-09-072-10/+2
| | | | | | | | |
| * | | | | | | | Fix /models/ci/pipeline.rbShinya Maeda2017-09-061-1/+1
| | | | | | | | |
| * | | | | | | | Use before_save :set_protectedShinya Maeda2017-09-062-2/+10
| | |/ / / / / / | |/| | | | | |
* | | | | | | | Merge branch ↵Douwe Maan2017-09-061-0/+9
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '34509-improves-markdown-rendering-performance-for-commits-list' into 'master' Resolve "Projects::CommitsController#show is slow partially due to SQL queries" Closes #34509 See merge request !13762
| * | | | | | | | Adds cacheless render to Banzai object render34509-improves-markdown-rendering-performance-for-commits-listTiago Botelho2017-09-061-0/+9
| | |_|_|_|_|/ / | |/| | | | | |
* | | | | | | | Merge branch '35161_first_time_contributor_badge' into 'master'Sean McGivern2017-09-064-2/+48
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First time contributor badge Closes #35161 See merge request !13902