summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Constrain environment deployments to project IDsYorick Peterse2017-09-132-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When querying the deployments of an environment the query Rails produces will be along the lines of the following: SELECT * FROM deployments WHERE environment_id = X For queries such as this (or queries that use this as their base and add more conditions) there is no meaningful index that can be used as long as deployments.project_id is not part of a WHERE clause. To work around this we change that "has_many :deployments" relation to always add a "WHERE project_id = X" condition. This means that queries filtering deployments can make better use of the existing indexes. For example, when filtering by deployments.iid this will result in the following query: SELECT * FROM deployments WHERE environment_id = X AND project_id = Y AND iid = Z This means PostgreSQL can use the existing index on (project_id, environment_id, iid) instead of having to use a different index (or none at all) and having to scan over a large amount of data. Query plan wise this means that instead of this query and plan: EXPLAIN (BUFFERS, ANALYZE) SELECT deployments.* FROM deployments WHERE deployments.environment_id = 5 AND deployments.iid = 225; Index Scan using index_deployments_on_project_id_and_iid on deployments (cost=0.42..14465.75 rows=1 width=117) (actual time=6.394..38.048 rows=1 loops=1) Index Cond: (iid = 225) Filter: (environment_id = 5) Rows Removed by Filter: 839 Buffers: shared hit=4534 Planning time: 0.076 ms Execution time: 38.073 ms We produce the following query and plan: EXPLAIN (BUFFERS, ANALYZE) SELECT deployments.* FROM deployments WHERE deployments.environment_id = 5 AND deployments.iid = 225 AND deployments.project_id = 1292351; Index Scan using index_deployments_on_project_id_and_iid on deployments (cost=0.42..4.45 rows=1 width=117) (actual time=0.018..0.018 rows=1 loops=1) Index Cond: ((project_id = 1292351) AND (iid = 225)) Filter: (environment_id = 5) Buffers: shared hit=4 Planning time: 0.088 ms Execution time: 0.039 ms On GitLab.com these changes result in a (roughly) 11x improvement in SQL timings for the CI environment status endpoint. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36877
* Merge branch 'zj-auto-devops-banner' into 'master'Kamil Trzciński2017-09-133-1/+25
|\ | | | | | | | | | | | | AutoDevOps banner hidden on explicit CI config Closes #37652 See merge request !14207
| * Fix extra space in YAML arrayZeger-Jan van de Weg2017-09-131-1/+1
| |
| * AutoDevOps banner hidden on explicit CI configZeger-Jan van de Weg2017-09-133-1/+25
| | | | | | | | | | | | | | Extends the helper method to no show the banner as soon as the project has a `.gitlab-ci.yml` file on the default branch. Fixes gitlab-org/gitlab-ce#37652
* | Merge branch 'fix/gpg-tmp-dir-removal-race-condition' into 'master'Rémy Coutable2017-09-132-4/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: GPG tmp dir removal race condition Ignore any errors when removing the tmp directory, as we may run into a race condition: The `gpg-agent` agent process may clean up some files as well while `FileUtils.remove_entry` is iterating the directory and removing all its contained files and directories recursively, which could raise an error. Closes #36998 See merge request !14194
| * | Fix: GPG tmp dir removal race conditionAlexis Reigel2017-09-132-4/+15
|/ /
* | Merge branch 'replace_profile_active_tab.feature' into 'master'Rémy Coutable2017-09-138-58/+79
|\ \ | |/ |/| | | | | Replace the 'profile/active_tab.feature' spinach test with an rspec analog See merge request !14239
| * Replace the 'profile/active_tab.feature' spinach test with an rspec analogVitaliy @blackst0ne Klachkov2017-09-138-58/+79
| |
* | Merge branch ↵Douwe Maan2017-09-134-1/+27
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | '37629-lazy-image-loading-breaks-notification-mails-for-an-added-screenshot' into 'master' Resolve "Lazy image loading breaks notification mails for an added screenshot" Closes #37629 See merge request !14161
| * | Remove ImageLazyLoadFilter from EmailPipeline37629-lazy-image-loading-breaks-notification-mails-for-an-added-screenshotRobert Speicher2017-09-124-1/+27
| | |
* | | Merge branch 'docs-inherit-milestone-labels-new-mr' into 'master'Douwe Maan2017-09-131-1/+2
|\ \ \ | | | | | | | | | | | | | | | | Docs for automatically inherit the milestone and labels of the issue See merge request !14223
| * | | Automatically inherit the milestone and labels of the issuedocs-inherit-milestone-labels-new-mrVictor Wu2017-09-121-1/+2
| |/ /
* | | Merge branch 'fix-doorkeeper-failure' into 'master'Rémy Coutable2017-09-131-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix the Doorkeeper.optional_scopes issue triggered by !13314 Closes #37753 See merge request !14219
| * | | Fix doorkeeper failureKamil Trzciński2017-09-131-1/+1
|/ / /
* | | Merge branch 'zj-feature-flipper-disable-banner' into 'master'Kamil Trzciński2017-09-134-1/+34
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Allow all AutoDevOps banners to be disabled Closes #37653 See merge request !14218
| * | | Allow all AutoDevOps banners to be disabledZeger-Jan van de Weg2017-09-124-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the default in the development and production environment is false, the negation of enabling is used in the flag to signal you'd turn it off. It reads a bit awkward, but makes us have a migration less. Fixes gitlab-org/gitlab-ce#37653
* | | | Merge branch 'zj-usage-data-auto-devops' into 'master'Kamil Trzciński2017-09-134-0/+16
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add usage ping for Auto DevOps Closes #37648 See merge request !14162
| * | | | Add auto devops enabled/disabled to usage pingZeger-Jan van de Weg2017-09-123-0/+7
| | | | |
| * | | | Add usage ping for Auto DevOpsZeger-Jan van de Weg2017-09-083-0/+9
| | | | | | | | | | | | | | | | | | | | Fixes gitlab-org/gitlab-ce#37648
* | | | | Merge branch '37405-admin-page-runner-tag-help-update' into 'master'Rémy Coutable2017-09-132-1/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add help text to runner edit page that tags should be separated by commas. Closes #37405 See merge request !14224
| * | | | | Add help text to runner edit page that tags should be separated by commas.Brendan O'Leary2017-09-132-1/+6
|/ / / / /
* | | | | Merge branch ↵Grzegorz Bizon2017-09-133-6/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '36907-new-issue-from-failed-build-no-longer-links-to-failed-build' into 'master' Resolve "New issue from failed build no longer links to failed build" Closes #36907 See merge request !13790
| * | | | | Fixed Tests + Reverted Try out from before36907-new-issue-from-failed-build-no-longer-links-to-failed-buildTim Zallmann2017-09-122-2/+3
| | | | | |
| * | | | | Implemented the new Description ContentTim Zallmann2017-09-123-3/+2
| | | | | |
| * | | | | Changed Var nameTim Zallmann2017-09-121-2/+2
| | | | | |
| * | | | | Adapting Test for JobsTim Zallmann2017-09-121-2/+2
| | | | | |
| * | | | | Fixed the URL + renamed to Job FailedTim Zallmann2017-09-122-3/+3
| | | | | |
* | | | | | Merge branch '5836-move-lib-ci-into-gitlab-namespace' into 'master'Grzegorz Bizon2017-09-1336-2448/+2465
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Move `lib/ci` to `lib/gitlab/ci`" Closes #5836 See merge request !14078
| * | | | | adds changelogMaxim Rydkin2017-09-123-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix CI fix CI
| * | | | | move `lib/ci/mask_secret.rb` into `lib/gitlab/ci/mask_secret.rb`Maxim Rydkin2017-09-125-13/+15
| | | | | |
| * | | | | move `lib/ci/gitlab_ci_yaml_processor.rb` into `lib/gitlab/ci/yaml_processor.rb`Maxim Rydkin2017-09-129-1956/+1960
| | | | | |
| * | | | | move `lib/ci/model.rb` into `lib/gitlab/ci/model.rb`Maxim Rydkin2017-09-1213-22/+24
| | | | | |
| * | | | | move `lib/ci/charts.rb` into `lib/gitlab/ci/charts.rb`Maxim Rydkin2017-09-124-122/+124
| | | | | |
| * | | | | move `lib/ci/ansi2html.rb` into `lib/gitlab/ci/ansi2html.rb`Maxim Rydkin2017-09-124-334/+336
| | | | | |
* | | | | | Merge branch 'rs-remove-bad-foreground-migration' into 'master'Stan Hu2017-09-121-57/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove db/migrate/20170828135939_migrate_user_external_mail_data.rb See merge request !14240
| * | | | | | Remove db/migrate/20170828135939_migrate_user_external_mail_data.rbRobert Speicher2017-09-121-57/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file is a duplicate of a post-deploy migration and appears to have been left in by mistake. Looping through the Users table in a foreground migration would've been a bad idea. [ci skip]
* | | | | | | Merge branch 'patch-25' into 'master'Stan Hu2017-09-121-0/+2
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | Update mysql_to_postgresql.md to deprecate these docs in favor of PGLoader See merge request !14238
| * | | | | | Improve formatting of pgloader lineStan Hu2017-09-121-1/+1
| | | | | | |
| * | | | | | Update mysql_to_postgresql.md to deprecate these docs in favor of PGLoaderLee Matos2017-09-121-0/+2
| | | | | | |
* | | | | | | Merge branch '37730-image-onion-skin-does-not-work-anymore' into 'master'Clement Ho2017-09-122-4/+9
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Image onion skin + swipe does not work anymore" Closes #37730 and #37732 See merge request !14215
| * | | | | | Resolve "Image onion skin + swipe does not work anymore"Tim Zallmann2017-09-122-4/+9
|/ / / / / /
* | | | | | Merge branch 'revert-2f46c3a8' into 'master'Robert Speicher2017-09-1233-111/+648
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert "Merge branch 'revert-f2421b2b' into 'master'" See merge request !14190
| * | | | | | Revert "Merge branch 'revert-f2421b2b' into 'master'"revert-2f46c3a8Annabel Dunstone Gray2017-09-1133-111/+648
| | | | | | | | | | | | | | | | | | | | | This reverts merge request !14148
* | | | | | | Merge branch 'docs/autodevops-fixes' into 'master'Achilleas Pipinellis2017-09-121-19/+61
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Auto DevOps quick start guide Closes #37768 See merge request !14230
| * | | | | | Fix Auto DevOps quick start guideAchilleas Pipinellis2017-09-121-19/+61
|/ / / / / /
* | | | | | Merge branch '31358_decrease_perceived_complexity_threshold_step2' into 'master'Robert Speicher2017-09-123-13/+26
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decrease Perceived Complexity threshold to 15 See merge request !14160
| * | | | | | Decrease Perceived Complexity threshold to 15Maxim Rydkin2017-09-123-13/+26
|/ / / / / /
* | | | | | Merge branch '31362_decrease_cyclomatic_complexity_threshold_step4' into ↵Robert Speicher2017-09-124-20/+42
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Decrease Cyclomatic Complexity threshold to 13 See merge request !14152
| * | | | | | Decrease Cyclomatic Complexity threshold to 13Maxim Rydkin2017-09-124-20/+42
|/ / / / / /
* | | | | | Merge branch 'gitaly-519-commit-stats' into 'master'Robert Speicher2017-09-125-3/+61
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate Git::CommitStats to Gitaly Closes gitaly#519 See merge request !14077