summaryrefslogtreecommitdiff
path: root/db
Commit message (Collapse)AuthorAgeFilesLines
* Exclude non existent repository storages.Ruben Davila2016-12-211-1/+1
|
* Remove unused services from the databaseZ.J. van de Weg2016-12-212-1/+14
| | | | | | | | This adds a migration to remove unused services, where the properties are empty. As the properties are empty, those do not contain any settings or other information. Fixes #25727
* Merge branch 'dz-rename-invalid-groups' into 'master' Douwe Maan2016-12-212-2/+84
|\ | | | | | | | | | | | | Rename groups with .git in the end of the path Closes #25862 See merge request !8199
| * Rename groups with .git in the end of the pathDmitriy Zaporozhets2016-12-212-2/+84
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Rename SlackNotificationService back to SlackServiceDouglas Barbosa Alexandre2016-12-202-9/+6
|/
* Merge remote-tracking branch 'origin/master' into improve-pipeline-fixturesimprove-pipeline-fixturesKamil Trzcinski2016-12-1855-67/+822
|\
| * Merge branch '20492-access-token-scopes' into 'master' Rémy Coutable2016-12-163-0/+39
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Add a doorkeeper scope suitable for authentication" ## What does this MR do? - Add a single new scope (in addition to the `api` scope we've had) - `read_user` - Allow creating OAuth applications and Personal access tokens with a scope selected - Enforce scopes in the API ## What are the relevant issue numbers? - Closes #20492 - EE counterpart for this MR: gitlab-org/gitlab-ee!946 See merge request !5951
| | * Make `ChangePersonalAccessTokensDefaultBackToEmptyArray` a "post" migration.20492-access-token-scopesTimothy Andrew2016-12-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we leave this as a regular migration, we could have the following flow: 1. Application knows nothing about scopes. 2. First migration runs, all existing personal access tokens have `api` scope 3. Application still knows nothing about scopes. 4. Second migration runs, all tokens created after this point have no scope 5. Application still knows nothing about scopes. 6. Tokens created at this time _should have the API scope, but instead have no scope_ 7. Application code is reloaded, application knows about scopes 8. Tokens created after this point only have no scope if the user deliberately chooses to have no scopes. Point #6 is the problem here. To avoid this, we move the second migration to a "post" migration, which runs after the application code is deployed/reloaded.
| | * Implement minor changes from @dbalexandre's review.Timothy Andrew2016-12-162-45/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Mainly whitespace changes. - Require the migration adding the `scope` column to the `personal_access_tokens` table to have downtime, since API calls will fail if the new code is in place, but the migration hasn't run. - Minor refactoring - load `@scopes` in a `before_action`, since we're doing it in three different places.
| | * Add a `scopes` column to the `personal_access_tokens` tableTimothy Andrew2016-12-163-0/+76
| | |
| * | Merge branch 'issue_22269' into 'master' Kamil Trzciński2016-12-163-2/+20
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mattermost Notifications Service ## What does this MR do? closes #22269 ## Screenshots ![mattermost](/uploads/de71c121f544a91305b6dfa6dc4c5738/mattermost.png) ![slack](/uploads/081d75d49239319d94332abda214fb98/slack.png) ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) 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) See merge request !7764
| | * | Change SlackService to SlackNotificationsServiceissue_22269_fix_eeissue_22269Felipe Artur2016-12-153-2/+20
| | | |
| * | | Merge branch 'fix/25635' into 'master' Rémy Coutable2016-12-164-23/+32
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix 8.15 RC1 requires quite amount of downtime See https://gitlab.com/gitlab-org/gitlab-ce/issues/25635 See merge request !8106
| | * | | Improve performance on RemoveDuplicatesFromRoutes migrationfix/25635Douglas Barbosa Alexandre2016-12-151-14/+10
| | | | |
| | * | | Fix the AddNameIndexToNamespace migration to be reversibleDouglas Barbosa Alexandre2016-12-151-1/+1
| | | | |
| | * | | Use optimized query to fill the routes table when running PostgreSQLDouglas Barbosa Alexandre2016-12-152-6/+19
| | | | |
| | * | | Don't use the Route model in migrationsDouglas Barbosa Alexandre2016-12-152-2/+2
| | | |/ | | |/|
| * | | Merge branch 'change_development_build_fixtures' into 'master' Sean McGivern2016-12-161-1/+1
| |\ \ \ | | |/ / | |/| | | | | | | | | | Made Ci::Builds to have same ref as Ci::Pipeline in dev fixtures See merge request !8110
| | * | Made Ci::Builds to have same ref as Ci::Pipeline in dev fixturestwonegatives2016-12-151-1/+1
| | |/
| * | Add an environment slugNick Thomas2016-12-153-6/+83
| | |
| * | Make the index on environment name and project id unique, fixing up any ↵Nick Thomas2016-12-153-3/+74
| |/ | | | | | | duplicates
| * Merge branch 'seed-runner-token' into 'master' Kamil Trzciński2016-12-151-0/+16
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow users to seed the initial runner registration token using an environment variable ## What does this MR do? Allow users to seed the initial runner registration token using an environment variable ## Are there points in the code the reviewer needs to double check? - Naming, do we want to make sure we are clear it's the 'registration' token. Like GITLAB_RUNNER_REGISTRATION_TOKEN vs what I have now, GITLAB_RUNNER_TOKEN - Not sure we've tested a seed fixture before, I just made up a directory structure for the test ## Why was this MR needed? At the moment I want to use this in our idea to production demo: https://gitlab.com/gitlab-org/gitlab-ce/issues/22190 This is useful for when runner is bundled with gitlab, like in a kubernetes stack, and we want the runner to be able to register with gitlab as soon as they both come up. ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [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 - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !6642
| | * Allow users to seed the initial runner registration token using an ↵DJ Mountney2016-12-011-0/+16
| | | | | | | | | | | | | | | | | | | | | environment variable This is useful for when runner is bundled with gitlab, like in a kubernetes stack, and we want the runner to be able to register with gitlab as soon as they both come up.
| * | Merge branch 'master' into 'dz-remove-namespaces-path-uniq'Dmitriy Zaporozhets2016-12-143-7/+39
| |\ \ | | | | | | | | | | | | | | | | | | | | Merge Request - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8013 # Conflicts: # db/schema.rb
| | * \ Merge branch 'process-commit-worker-migration-encoding' into 'master' Rémy Coutable2016-12-141-5/+15
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Encode when migrating ProcessCommitWorker jobs ## What does this MR do? This adds encoding logic to the migration for ProcessCommitWorker, ensuring it doesn't throw errors when the input can not be converted to UTF-8 without extra help. ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/25489 See merge request !8064
| | | * | Encode when migrating ProcessCommitWorker jobsprocess-commit-worker-migration-encodingYorick Peterse2016-12-131-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the source encoding is not UTF-8 we need to encode the data as `JSON.dump` may throw an error if the input can not be converted to UTF-8. We only encode when necessary to reduce the overhead. Fixes gitlab-org/gitlab-ce#25489
| | * | | Add index to routes table on lower path for postgresqldz-create-routes-lower-indexDmitriy Zaporozhets2016-12-122-1/+23
| | |/ / | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | | Modify namespace name and path validationdz-remove-namespaces-path-uniqDmitriy Zaporozhets2016-12-125-3/+115
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently namespace name and path have uniq validaiton which does not allow us to use same group name/path inside different groups. This commit changes validation in next way: * Allow same namespace name with different parent_id * Allow same namespace path. Uniq validation should be handled by routes table Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | Add nested groups support on data leveldz-nested-groupsDmitriy Zaporozhets2016-12-088-6/+150
| | | | | | | | | | | | | | | | | | | | | | | | * add parent_id field to namespaces table to store relation with nested groups * create routes table to keep information about full path of every group and project * project/group lookup by full path from routes table Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | Pass commit data to ProcessCommitWorkerprocess-commit-worker-improvementsYorick Peterse2016-12-011-0/+92
| |/ | | | | | | | | | | | | | | | | | | | | By passing commit data to this worker we remove the need for querying the Git repository for every job. This in turn reduces the time spent processing each job. The migration included migrates jobs from the old format to the new format. For this to work properly it requires downtime as otherwise workers may start producing errors until they're using a newer version of the worker code.
| * Make the downtime_check task happyfix-migrationsRémy Coutable2016-11-3022-3/+47
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Merge branch '23666-set-null-true-for-timestamps-columns-in-migrations' into ↵Robert Speicher2016-11-3023-24/+24
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Add `null: true` to timestamps in migrations that does not define it This is to ensure that migrations will still be consitent when we will upgrade to Rails 5 which default to `null: false` for timestamps columns. Fixes #23666. See merge request !7791
| | * Add `null: true` to timestamps in migrations that does not define it23666-set-null-true-for-timestamps-columns-in-migrationsRémy Coutable2016-11-2823-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to ensure that migrations will still be consitent when we will upgrade to Rails 5 which default to `null: false` for timestamps columns. Fixes #23666. Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | Remove unnecessary database indexesValery Sizov2016-11-292-9/+33
| | |
| * | Merge branch '24880-configurable-plaintext-emails' into 'master' Sean McGivern2016-11-292-1/+31
| |\ \ | | |/ | |/| | | | | | | | | | | | | Add setting to enable/disable HTML emails Closes #24880 See merge request !7749
| | * Add new configuration setting to enable/disable HTML emails.24880-configurable-plaintext-emailsRuben Davila2016-11-282-1/+31
| | | | | | | | | | | | | | | | | | This new global setting will allow admins to specify if HTML emails should be sent or not, this is basically useful when system administrators want to save some disk space by avoiding emails in HTML format and using only the Plain Text version.
| * | Refresh project authorizations using a Redis leaserefresh-authorizations-with-leaseYorick Peterse2016-11-254-12/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I proposed using serializable transactions I was hoping we would be able to refresh data of individual users concurrently. Unfortunately upon closer inspection it was revealed this was not the case. This could result in a lot of queries failing due to serialization errors, overloading the database in the process (given enough workers trying to update the target table). To work around this we're now using a Redis lease that is cancelled upon completion. This ensures we can update the data of different users concurrently without overloading the database. The code will try to obtain the lease until it succeeds, waiting at least 1 second between retries. This is necessary as we may otherwise end up _not_ updating the data which is not an option.
| * Merge branch 'milestone_start_date' into 'master' Sean McGivern2016-11-232-0/+13
| |\ | | | | | | | | | | | | | | | | | | Add a starting date to milestones Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/23704 See merge request !7484
| | * Add a starting date to milestonesmilestone_start_dateValery Sizov2016-11-232-0/+13
| | |
| * | Update ProjectTeam#fetch_members to use project authorizationsfix/drop-project-authorized-for-userAhmad Sherif2016-11-231-14/+19
| |/
| * Handle orphans when removing soft deleted groupsfix-remove-undeleted-groups-orphansYorick Peterse2016-11-221-0/+41
| | | | | | | | | | | | There may be more tables but these were the tables that were problematic for GitLab.com due to foreign key constraints (without cascading deletes).
* | Improve pipeline fixturesKamil Trzcinski2016-11-281-19/+44
|/
* Merge branch 'issue_5541' into 'master' Sean McGivern2016-11-212-1/+17
|\ | | | | | | | | | | | | Allow to block JIRA events for commits and merge requests implements #5541 See merge request !7469
| * Allow enabling and disabling commit and MR events for JIRAissue_5541Felipe Artur2016-11-182-1/+17
| |
* | Remove duplicate sidekiq throttling parametersfix-db-schemaKamil Trzcinski2016-11-191-3/+0
| |
* | 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