summaryrefslogtreecommitdiff
path: root/spec/requests/api
Commit message (Collapse)AuthorAgeFilesLines
* Defer saving project services to the database if there are no user changesadam-build-missing-services-when-necessaryAdam Niedzielski2016-11-161-2/+1
|
* Update 8.14-rc1 migrations to minimize downtime and deploy timeAlejandro Rodríguez2016-11-111-0/+8
| | | | See https://gitlab.com/gitlab-org/gitlab-ce/issues/24386
* Merge branch 'grapify-token-api' into 'master' Rémy Coutable2016-11-101-1/+1
|\ | | | | | | | | | | | | | | | | Grapify triggers API ## What are the relevant issue numbers? Related to #22928 See merge request !7378
| * Grapify token APIRobert Schilling2016-11-101-1/+1
| |
* | Merge branch 'grapify-milestone-api' into 'master' Rémy Coutable2016-11-101-0/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Grapify milestones API ## What are the relevant issue numbers? Related to #22928 See merge request !7373
| * | Grapify milestones APIgrapify-milestone-apiRobert Schilling2016-11-101-0/+9
| | |
* | | Merge branch 'grapify-runners-api' into 'master' Rémy Coutable2016-11-101-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grapify runners API ## What are the relevant issue numbers? Related to #22928 See merge request !7377
| * | | Grapify runners APIRobert Schilling2016-11-101-2/+2
| |/ /
* | | Merge branch 'grapify-session-api' into 'master' Rémy Coutable2016-11-101-7/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grapify the session API ## What are the relevant issue numbers? Related to #22928 See merge request !7381
| * | | Grapify the session APIgrapify-session-apiRobert Schilling2016-11-091-7/+9
| |/ /
* | | Merge branch 'feature/api_owned_resource' into 'master' Sean McGivern2016-11-102-0/+42
|\ \ \ | |_|/ |/| | | | | | | | Add api endpoint `/groups/owned` See merge request !7103
| * | Added API endpoint groups/ownedBorja Aparicio2016-11-081-0/+18
| | |
| * | Added API spec test for projects/owned endpointBorja Aparicio2016-11-081-0/+24
| | |
* | | Remove order-dependent expectation24341-fix-failureRémy Coutable2016-11-091-1/+1
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Add query param to filter users on 'external' & 'blocked' type on APIYatish Mehta2016-11-081-0/+21
| | |
* | | Merge branch 'fix-systemhook-api' into 'master' Rémy Coutable2016-11-081-0/+6
|\ \ \ | |/ / |/| | | | | | | | | | | | | | API: Return 400 when creating a systemhook fails Closes #23335 See merge request !7350
| * | API: Return 400 when creating a systemhook failsRobert Schilling2016-11-081-0/+6
| |/
* | Expose Label id to APIRares Sfirlogea2016-11-071-0/+6
| | | | | | | | | | | | [e44da1c] Add Label API expected keys to tests [ac929c8] Update Label API documentation
* | Ability to update labels priority via APIRobert Schilling2016-11-071-6/+82
|/
* Merge remote-tracking branch 'origin/labels-api'Rémy Coutable2016-11-041-1/+14
|\ | | | | | | | | | | See merge request !7014 Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Return conflict error in label API when title is taken by group labellabels-apiDouwe Maan2016-10-201-1/+14
| |
* | Add setting to only allow merge requests to be merged when all discussions ↵Rodolfo Santos2016-11-041-1/+35
| | | | | | | | | | | | are resolved Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch 'backport-ee-js-groups-api' into 'master' Robert Speicher2016-11-041-1/+12
|\ \ | | | | | | | | | | | | | | | | | | Backport Group API code that was added in EE only Group API code that was added in EE only. /cc @vsizov See merge request !7205
| * | Backport Group API code that was added in EE onlybackport-ee-js-groups-apiRémy Coutable2016-10-311-1/+12
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch '24059-round-robin-repository-storage' into 'master' Douwe Maan2016-11-041-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Introduce round-robin project creation to spread load over multiple shards" ## What does this MR do? Allow multiple shards to be enabled in the admin settings page, balancing project creation across all enabled shards. ## Are there points in the code the reviewer needs to double check? * `f.select ..., multiple: true` isn't the most beautiful UI in the world, but switching to `collection_check_boxes` (or a facsimile thereof) isn't trivial * Should `pick_repository_storage` be a method of `ApplicationSetting`, or `Project`? It's going to accrete logic over time so perhaps it should be its own class already? * This is written to avoid the need for a database migration, so it is`serialize :repository_storage` without `, Array`. This is tested, but alternatives include: * Add a database migration * Write a custom Coder that will accept a String or Array in `load` and always `dump an Array. ## Why was this MR needed? ## Screenshots (if relevant) ![Screen_Shot_2016-11-03_at_14.42.41](/uploads/7de15d6c1b3fa60bb7a34d6a7d9f00ce/Screen_Shot_2016-11-03_at_14.42.41.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) - [x] 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 #24059 See merge request !7273
| * | | Allow multiple repository storage shards to be enabled, and automatically ↵Nick Thomas2016-11-041-0/+1
| | | | | | | | | | | | | | | | round-robin between them
* | | | Merge branch 'spec_optimization' into 'master' Sean McGivern2016-11-042-24/+24
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Make specs a bit faster See merge request !6992
| * | | Make specs a bit fasterspec_optimizationValery Sizov2016-11-012-24/+24
| | | |
* | | | Merge branch 'zj-expose-system-hooks' into 'master' Rémy Coutable2016-11-031-0/+14
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Expose more info for SystemHooks See merge request !6964
| * | | | Update docs and test descriptionzj-expose-system-hooksZ.J. van de Weg2016-11-021-1/+2
| | | | | | | | | | | | | | | | | | | | [ci skip]
| * | | | Update docs and unexpose tokenZeger-Jan van de Weg2016-11-021-1/+0
| | | | |
| * | | | Be able to POST subscriptions for system hooksZ.J. van de Weg2016-10-311-0/+14
| | |/ / | |/| |
* | | | Merge branch 'gpocentek/gitlab-ce-api-webhook-token' into 'master' Rémy Coutable2016-11-021-0/+32
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This MR adds support for the `token` attribute in the project hook API. Feature requested on a dependant project: https://github.com/gpocentek/python-gitlab/issues/170 See merge request !7220
| * | | | Ensure hook tokens are write-only in the APIgpocentek/gitlab-ce-api-webhook-tokenSean McGivern2016-11-011-4/+32
| | | | |
| * | | | Add support for token attr in project hooks APIGauvain Pocentek2016-11-011-0/+4
| | |/ / | |/| | | | | | | | | | | | | | The UI allows to define a token to validate payload on the target URL, this patch adds the feature to the API.
* | | | Fix project features default valuesFelipe Artur2016-11-011-30/+0
|/ / /
* | | GrapeDSL for branches endpointszj-grape-branchesZ.J. van de Weg2016-10-311-12/+0
|/ /
* | Merge branch 'use-optimistic-locking' into 'master' Stan Hu2016-10-281-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Fix optimistic lockingKamil Trzcinski2016-10-261-0/+2
| | |
* | | API: Fix booleans not recognized as such when using the `to_boolean` helper23890-api-should-accepts-booleanRémy Coutable2016-10-271-11/+18
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Fixes various errors when adding deploy keys caused by not exiting the ↵Joshua Welsh2016-10-261-0/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | control flow. When adding a deploy key that already exists in the project the existing key would not be returned, resulting in an attempt to create a new one, which in turn caused a 500 error due to an ActiveRecord exception. When adding a deploy key that exists within another project the key would be joined to the project, but would also attempt to create a new one, which resulted in a 400 error due to the key already existing. Fixes #22741 Fixes #21754 Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Make events order spec deterministic, create only 3 record instead of 5, ↵Airat Shigapov2016-10-241-8/+10
| | | | | | | | explicitely check for events order
* | Rewrite events order spec to simulate wrong order without changing idsAirat Shigapov2016-10-241-9/+10
| |
* | Add test for events order in APIAirat Shigapov2016-10-241-0/+20
| |
* | Merge branch 'grapify-labels-api' into 'master' Rémy Coutable2016-10-241-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grapify the labels API Add the Grape-DSL to the labels API. Since the input validation messages are checked, two tests are modified slightly. ## What are the relevant issue numbers? Related to #22928 See merge request !7070
| * | Grapify the labels APIgrapify-labels-apiRobert Schilling2016-10-241-3/+3
| | |
* | | Added path parameter to Commits APILuis HGO2016-10-241-0/+11
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch 'barthc/gitlab-ce-prevent_authored_vote_from_notes'Rémy Coutable2016-10-241-2/+13
|\ \ \ | | | | | | | | | | | | See merge request !6544.
| * | | Fix authored vote from notesbarthc2016-10-241-2/+13
| |/ / | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Fix branch protection API.Timothy Andrew2016-10-241-67/+123
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Previously, we were not removing existing access levels before creating new ones. This is not a problem for EE, but _is_ for CE, since we restrict the number of access levels in CE to 1. 2. The correct approach is: CE -> delete all access levels before updating a protected branch EE -> delete developer access levels if "developers_can_{merge,push}" is switched off 3. The dispatch is performed by checking if a "length: 1" validation is present on the access levels or not. 4. Another source of problems was that we didn't put multiple queries in a transaction. If the `destroy_all` passes, but the `update` fails, we should have a rollback. 5. Modifying the API to provide users direct access to CRUD access levels will make things a lot simpler. 6. Create `create/update` services separately for this API, which perform the necessary data translation, before calling the regular `create/update` services. The translation code was getting too large for the API endpoint itself, so this move makes sense.