summaryrefslogtreecommitdiff
path: root/db
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '22539-display-folders' into 'master' Fatih Acet2016-11-191-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Display "folders" for environments" ## What does this MR do? Adds the ability to show the grouped environments inside "folders". Adds several reusable vue components in order to accomplish the recursive tree data structure presented. For the individual components, Jasmine tests were added. For the ones that depend of an API response, rspec tests are used. ## Screenshots (if relevant) ![Screen_Shot_2016-11-16_at_02.00.13](/uploads/1278012c8639b999b53f080728d283e1/Screen_Shot_2016-11-16_at_02.00.13.png) ![Screen_Shot_2016-11-16_at_02.00.25](/uploads/a3d65416ddb553e1b8f0f4c8897a75dc/Screen_Shot_2016-11-16_at_02.00.25.png) ![Screen_Shot_2016-10-17_at_16.08.50](/uploads/af63efe1d2cbd5fc069408622ef4b607/Screen_Shot_2016-10-17_at_16.08.50.png) ![environments](/uploads/b5a1801766d82ab176fc60f96b6968cb/environments.gif) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #22539 See merge request !7015
| * Merge remote-tracking branch 'origin/master' into 22539-display-foldersKamil Trzcinski2016-11-1812-27/+219
| |\
| * | Adds props validationFilipa Lacerda2016-11-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improves documentation Adds tests Fix prop validation for objects Finish tests for environment item Adds tests for toggle folder function Environment tests Adds tests
* | | Merge branch 'feature/precalculate-authorized-projects' into 'master' Douwe Maan2016-11-186-0/+46
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Precalculate authorized projects in database ## What does this MR do? It caches user's authorized projects in database instead of using multiple unions, which should simplify and speed-up things since this operation (getting authorized projects) is used a lot. ## Are there points in the code the reviewer needs to double check? Did we miss a scenario where we need to refresh the list of projects? ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [ ] ~~API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? #23150 See merge request !6839
| * | Precalculate user's authorized projects in databaseAhmad Sherif2016-11-186-0/+46
| | | | | | | | | | | | Closes #23150
* | | Merge branch 'fix/pipeline-id-metrics-migration' into 'master' Douwe Maan2016-11-181-0/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix migration missing ignored transaction method Adds missing `disable_ddl_transaction!` to migration See merge request !7569
| * | | fix migration missing ignored transaction methodJames Lopez2016-11-181-0/+2
| | | |
* | | | Merge branch 'feature/cycle-analytics-events' into 'master' Douwe Maan2016-11-183-0/+36
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cycle Analytics: Events per stage Adds list of events to each stage: - Issue: list of issues created in the last XX days, that have been labeled or added to a milestone. - Plan: list of commits that reference for the fist time an issue from the last stage. - Code: list of MR created in this stage - Test: List of unique builds triggered by the commits. - Review: List of MR merged - Staging: List of deployed builds - Production: list of issues with the time from idea to production Fixes #23449 - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !6859
| * | | run pipeline worker in cycle analytics dev setupJames Lopez2016-11-181-0/+2
| | | |
| * | | fix schema.rbJames Lopez2016-11-171-4/+4
| | | |
| * | | more refactoring and added some auth checksJames Lopez2016-11-171-687/+507
| | | |
| * | | refactor events facade so it uses separate classes and refactor query stuffJames Lopez2016-11-171-509/+689
| | | |
| * | | use concurrent index in migrationJames Lopez2016-11-171-1/+1
| | | |
| * | | Renamed pipeline column and fixed permissions for builds in events controllerJames Lopez2016-11-172-4/+6
| | | |
| * | | add pipeline id to merge request metrics table. Also, updated the pipeline ↵James Lopez2016-11-172-0/+32
| | | | | | | | | | | | | | | | worker to populate this field.
* | | | Add a migration to remove soft-deleted groups.Timothy Andrew2016-11-182-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The database should not have any soft-deleted groups. Due to a race condition (soft-delete completes after the hard-delete), soft-deleted groups were (incorrectly) left in the database, causing issues while trying to create a new group with the same name.
* | | | Merge branch 'feature/subscribe-to-group-level-labels' into 'master' Sean McGivern2016-11-174-1/+79
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support subscribing to group labels https://gitlab.com/gitlab-org/gitlab-ce/issues/23586 See merge request !7215
| * | | | Remove extra subscribable_type filter on migrationDouglas Barbosa Alexandre2016-11-171-3/+3
| | | | |
| * | | | Use subqueries instead of joins to migrate subscriptionsDouglas Barbosa Alexandre2016-11-171-39/+24
| | | | |
| * | | | Add unique index to subscriptions on subscribable and user and projectDouglas Barbosa Alexandre2016-11-172-1/+19
| | | | |
| * | | | Migrate subscribable project id to the subscriptions tableDouglas Barbosa Alexandre2016-11-171-0/+59
| | | | |
| * | | | Add project_id to subscriptionsDouglas Barbosa Alexandre2016-11-172-0/+16
| | |/ / | |/| |
* | | | Merge branch 'chat-name-authorize' into 'master' Rémy Coutable2016-11-172-1/+37
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Allows to authorize chat user against GitLab. This is needed for: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7438 See merge request !7450
| * | | Improve code design after code reviewKamil Trzcinski2016-11-162-2/+2
| | | |
| * | | Merge remote-tracking branch 'origin/master' into chat-name-authorizeKamil Trzcinski2016-11-165-5/+85
| |\ \ \ | | | |/ | | |/|
| * | | Add most of specs for chat namesKamil Trzcinski2016-11-162-12/+14
| | | |
| * | | Create relation between chat user and GitLab user and allow to authorize ↵Kamil Trzcinski2016-11-162-1/+35
| | | | | | | | | | | | | | | | them [ci skip]
* | | | Remove empty db fixtures fileSemyon Pupkov2016-11-171-0/+0
| |_|/ |/| |
* | | Merge branch '21992-disable-access-requests-by-default' into 'master' Robert Speicher2016-11-163-2/+26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable the "request access" functionality by default for new groups and projects Currently this feature is enabled by default, and additional action is required to disable it. Closes #21992 Closes !7011 See merge request !7425
| * | | Set 'request_access_enabled' false by defaultChris Wilson2016-11-113-2/+26
| |/ / | | | | | | | | | | | | Set request access for projects/groups to false by default. Request access implemented in !5286 8.10 was enabled by default.
* | | Fix a badly-performing migrationNick Thomas2016-11-151-23/+23
| |/ |/|
* | Merge branch '24386-8-14-rc1-requires-quite-amount-of-downtime' into 'master' Stan Hu2016-11-113-5/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update 8.14-rc1 migrations to minimize downtime and deploy time ## What does this MR do? Modify 8.14-rc1 migrations and code to minimize downtime and deploy time ## Are there points in the code the reviewer needs to double check? No ## Why was this MR needed? 8.14-rc1 migrations took too much time in staging, so we didn't want to take too much downtime in production ## Does this MR meet the acceptance criteria? - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #24386 See merge request !7427
| * | Update 8.14-rc1 migrations to minimize downtime and deploy timeAlejandro Rodríguez2016-11-113-5/+2
| | | | | | | | | | | | See https://gitlab.com/gitlab-org/gitlab-ce/issues/24386
* | | Merge branch 'sidekiq-job-throttling' into 'master' Douwe Maan2016-11-112-0/+34
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow certain Sidekiq jobs to be throttled ## What does this MR do? Allows certain slow running Sidekiq jobs to be throttled. It is disabled by default and can be enabled via the Application Settings. ![Screen_Shot_2016-11-04_at_4.51.24_PM](/uploads/a1f1d24c693fcdb278602765cd404d94/Screen_Shot_2016-11-04_at_4.51.24_PM.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - Tests - [x] Added for this feature/bug - [x] All builds are passing ## What are the relevant issue numbers? Related to #23352 See merge request !7292
| * | Allow the Sidekiq queues to throttle and the factor by which to throttle ↵Patricio Cano2016-11-102-0/+4
| | | | | | | | | | | | them to be configurable
| * | Allow certain Sidekiq jobs to be throttledPatricio Cano2016-11-102-0/+30
| |/
* | Fix project records with invalid visibility_level valuesNick Thomas2016-11-102-1/+50
|/ | | | | | | | | | | | | The AddVisibilityLevelToGroups migration introduced a visibility_level for namespaces and specified that projects should always have a visibility level less than or equal to their namespace. However, some invalid rows could have been created. This commit introduces a migration that updates the invalid rows, setting the invalid project to have the same visibility_level as their namespaces. This will make some projects internal or private when they would previously have been public or internal, but this is better than silently making an internal or private group public.
* Merge branch 'use-separate-token-for-incoming-email' into 'master' Douwe Maan2016-11-082-0/+18
|\ | | | | | | | | Use separate email-friendly token for incoming email See merge request !5914
| * implements reset incoming email token on issues modal and account page,use-separate-token-for-incoming-emailtiagonbotelho2016-11-071-2/+2
| | | | | | | | reactivates all tests and writes more tests for it
| * Use separate email-friendly token for incoming email and let incomingDouwe Maan2016-11-072-1/+19
| | | | | | | | email token be reset
* | Merge branch 'jacobvosmaer-gitlab/gitlab-ce-git-gc-improvements' into 'master' Douwe Maan2016-11-072-0/+37
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Use more than one kind of Git garbage collection Replaces https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6588 by @jacobvosmaer to get the builds to pass :) Closes #22729 See merge request !7321
| * | Refine Git garbage collectionJacob Vosmaer2016-11-042-0/+37
| | |
* | | Merge branch '24059-post-facto-fixups' into 'master' Douwe Maan2016-11-071-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixups to "Round-robin repository storage" ## What does this MR do? * Simplifies a method in application_settings.rb * Correctly marks a migration as needing downtime * Documents the requirement for renamed columns to be ## Are there points in the code the reviewer needs to double check? Should any of these changes be split out? Ideally we'd get this into the same point release as !7273 ## Why was this MR needed? Post-facto review of !7273 ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added - [X] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [X] API support added - Tests - [X] Added for this feature/bug - [x] All builds are passing - [X] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [X] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [X] Branch has no merge conflicts with `master` (if it does - rebase it please) - [X] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Related to #24059 /cc @yorickpeterse @rspeicher See merge request !7287
| * | | Renaming columns requires downtimeNick Thomas2016-11-071-2/+2
| |/ /
* | | Add an index for project_id in project_import_data to improveadd-project-import-data-indexStan Hu2016-11-062-1/+15
| |/ |/| | | | | | | | | | | | | | | | | performance We see that many slow queries on GitLab.com are dominated by finding the project import data for a specific project. Adding an index is the most straightforward way of fixing this. Closes #23748
* | Add setting to only allow merge requests to be merged when all discussions ↵Rodolfo Santos2016-11-042-0/+18
|/ | | | | | are resolved Signed-off-by: Rémy Coutable <remy@rymai.me>
* Allow multiple repository storage shards to be enabled, and automatically ↵Nick Thomas2016-11-042-2/+31
| | | | round-robin between them
* Support for post deployment migrationsbackground-migrationsYorick Peterse2016-10-311-0/+0
| | | | | | | | These are regular Rails migrations that are executed by default. A user can opt-out of these migrations by setting an environment variable during the deployment process. Fixes gitlab-org/gitlab-ce#22133
* Merge branch 'use-optimistic-locking' into 'master' Stan Hu2016-10-282-0/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use optimistic locking ## What does this MR do? Removes the usage of pessimistic locking in favor of optimistic which is way cheaper and doesn't block database operation. Since this is very simple change it should be safe. If we receive `StaleObjectError` message we will reload object a retry operations in lock. However, I still believe that we need this one: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7005 as this will reduce a load on Database and FS. This changes a behavior from: ### Pesimistic locking (previous behavior) #### For updating 1. SELECT * FOR UPDATE (other updates wait on this) 2. we update ci_pipeline 3. latest_build_status 4. enqueue: (use: transition :created -> :pending) 5. [state_machine] we are in state created, we can go to pending 6. [state_machine] ci_pipeline.status = created 7. [state_machine] ci_pipeline.save 8. [state_machine] after_transition: (if for success): PipelineSuccessWorker on Sidekiq 9. release DB lock #### If no update is required 1. SELECT * FOR UPDATE (other updates wait on this) 2. we update ci_pipeline 3. latest_build_status 4. we are in pending, we can't transition to pending, because it's forbidden 5. release DB lock ### Optimistic locking (implemented by this MR) #### For updating 1. latest_build_status 2. enqueue: (use `transition :created -> :pending`) 3. [state_machine] we are in state created, we can go to pending 4. [state_machine] ci_pipeline.status = created 5. [state_machine] ci_pipeline.save 6. [state_machine] [save] where(lock_version: ci_pipeline.lock_version).update_all(status: :created, updated_at: Time.now) 7. [state_machine] [save] unless we_updated_row then raise ObjectInconsistentError #### If no update is required 1. we update ci_pipeline 2. latest_build_status 3. we are in pending, we can't transition to pending, because it's forbidden ## Why was this MR needed? We have been seeing a number of problems when we migrated Pipeline/Build processing to Sidekiq. Especially we started seeing a lot of blocking queries. We used a pessimistic locking which doesn't seem to be required. This effectively allows us to fix our issues with blocked queries by using more efficient method of operation. ## What are the relevant issue numbers? Issues: https://gitlab.com/gitlab-com/infrastructure/issues/623 and https://gitlab.com/gitlab-com/infrastructure/issues/584, but also there's a bunch of Merge Requests that try to improve behavior of scheduled jobs. cc @pcarranza @yorickpeterse @stanhu See merge request !7040
| * Use optimistic lockingKamil Trzcinski2016-10-262-0/+16
| |