summaryrefslogtreecommitdiff
path: root/spec/requests/api
Commit message (Collapse)AuthorAgeFilesLines
* Introduce source to pipeline entitytrigger-sourceKamil Trzcinski2017-05-313-6/+6
|
* Return 202 for destory. Remove []. Remove def pipeline_schedules from helper.Shinya Maeda2017-05-301-1/+1
|
* Improve API with optinal and default. Allow to use scope as a parameter.Shinya Maeda2017-05-301-0/+18
|
* Include owner for pipeline_schedules. Improve N+1 spec. Use PipelineBasic ↵Shinya Maeda2017-05-301-1/+5
| | | | for small payload.
* includes last_pipelineShinya Maeda2017-05-301-0/+3
|
* zj keen eye2Shinya Maeda2017-05-301-6/+1
|
* zj keen eyeShinya Maeda2017-05-301-26/+12
|
* avoids N + 1 queriesShinya Maeda2017-05-301-0/+12
|
* Concatinate dot behind endShinya Maeda2017-05-301-2/+1
|
* Add space between curly bracketsShinya Maeda2017-05-301-1/+1
|
* Use attributes_forShinya Maeda2017-05-301-24/+16
|
* Use 'set' to top-level variables. Remove repository.Shinya Maeda2017-05-301-3/+3
|
* Add validation specShinya Maeda2017-05-301-11/+21
|
* Change status number to ailiasShinya Maeda2017-05-301-2/+2
|
* Add API support for pipeline scheduleShinya Maeda2017-05-301-0/+278
|
* Merge branch 'rework-authorizations-performance' into 'master'Douwe Maan2017-05-296-23/+16
|\ | | | | | | | | Rework project authorizations and nested groups for better performance See merge request !10885
| * Use CTEs for nested groups and authorizationsYorick Peterse2017-05-176-23/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces the usage of Common Table Expressions (CTEs) to efficiently retrieve nested group hierarchies, without having to rely on the "routes" table (which is an _incredibly_ inefficient way of getting the data). This requires a patch to ActiveRecord (found in the added initializer) to work properly as ActiveRecord doesn't support WITH statements properly out of the box. Unfortunately MySQL provides no efficient way of getting nested groups. For example, the old routes setup could easily take 5-10 seconds depending on the amount of "routes" in a database. Providing vastly different logic for both MySQL and PostgreSQL will negatively impact the development process. Because of this the various nested groups related methods return empty relations when used in combination with MySQL. For project authorizations the logic is split up into two classes: * Gitlab::ProjectAuthorizations::WithNestedGroups * Gitlab::ProjectAuthorizations::WithoutNestedGroups Both classes get the fresh project authorizations (= as they should be in the "project_authorizations" table), including nested groups if PostgreSQL is used. The logic of these two classes is quite different apart from their public interface. This complicates development a bit, but unfortunately there is no way around this. This commit also introduces Gitlab::GroupHierarchy. This class can be used to get the ancestors and descendants of a base relation, or both by using a UNION. This in turn is used by methods such as: * Namespace#ancestors * Namespace#descendants * User#all_expanded_groups Again this class relies on CTEs and thus only works on PostgreSQL. The Namespace methods will return an empty relation when MySQL is used, while User#all_expanded_groups will return only the groups a user is a direct member of. Performance wise the impact is quite large. For example, on GitLab.com Namespace#descendants used to take around 580 ms to retrieve data for a particular user. Using CTEs we are able to reduce this down to roughly 1 millisecond, returning the exact same data. == On The Fly Refreshing Refreshing of authorizations on the fly (= when users.authorized_projects_populated was not set) is removed with this commit. This simplifies the code, and ensures any queries used for authorizations are not mutated because they are executed in a Rails scope (e.g. Project.visible_to_user). This commit includes a migration to schedule refreshing authorizations for all users, ensuring all of them have their authorizations in place. Said migration schedules users in batches of 5000, with 5 minutes between every batch to smear the load around a bit. == Spec Changes This commit also introduces some changes to various specs. For example, some specs for ProjectTeam assumed that creating a personal project would _not_ lead to the owner having access, which is incorrect. Because we also no longer refresh authorizations on the fly for new users some code had to be added to the "empty_project" factory. This chunk of code ensures that the owner's permissions are refreshed after creating the project, something that is normally done in Projects::CreateService.
* | Improve pipelines API specs related to special parametersGrzegorz Bizon2017-05-291-9/+15
| |
* | Simplify pipeline spec by using order instead of sort_bysh-fix-issue-33011Stan Hu2017-05-281-1/+1
| |
* | Fix failing spec in spec/requests/api/pipelines_spec.rbStan Hu2017-05-281-5/+5
| | | | | | | | | | | | | | The spec was trying to sort pipelines by user ID, but the same user ID was being used for each pipeline in the spec. Closes #33001
* | Revert "Remove changes that are not absolutely necessary"Douwe Maan2017-05-241-2/+2
| | | | | | This reverts commit b0498c176fa134761d899c9b369be12f1ca789c5
* | Prevent errors from non-functional notify_post_receive endpointfix-notify-post-receiveAlejandro Rodríguez2017-05-181-80/+81
| |
* | Merge branch 'bvl-rename-build-events-to-job-events' into 'master' cherry-pick-0663458cDouwe Maan2017-05-162-4/+4
| | | | | | | | | | | | | | Rename `build_events` to `job_events` Closes #31620 See merge request !11287
* | Revert "Merge branch 'bvl-rename-build-events-to-job-events' into 'master'"Douwe Maan2017-05-152-4/+4
| | | | | | This reverts merge request !11287
* | Rename `build_events` to `job_events` in codeBob Van Landuyt2017-05-152-4/+4
|/
* Update SystemHooks API to expose and handle new repository_update_eventsGabriel Mazetto2017-05-122-2/+4
|
* fix for Follow-up from "Backport of Multiple Assignees featurefixes_for_multiple_issue_assigneesValery Sizov2017-05-111-1/+1
|
* Merge branch 'retried-in-database-mysql' into 'master' Regis Boudinot2017-05-101-2/+2
|\ | | | | | | | | | | | | Retried in database Closes #25737 See merge request !11115
| * Store retried in database for CI buildsretried-in-database-mysqlKamil Trzcinski2017-05-071-2/+2
| |
* | Enable the Style/TrailingCommaInLiteral copRémy Coutable2017-05-106-8/+8
| | | | | | | | | | | | Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Use relative paths for group/project/user avatarsblackst0ne2017-05-102-2/+2
| |
* | Add confirm delete protected branch modalSam Rose2017-05-082-26/+0
|/
* Merge branch 'feature/gb/manual-actions-protected-branches-permissions' into ↵Kamil Trzciński2017-05-061-16/+51
|\ | | | | | | | | | | | | | | | | | | 'master' Check access to a branch when user triggers manual action Closes #20261 See merge request !10494
| * Merge commit '3a2b60f7' from 'master'Grzegorz Bizon2017-05-052-0/+253
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3a2b60f7a0109cdb84e8727a2625318a746e84dc': (151 commits) Fixed Karma spec Reject EE reserved namespace paths in CE as well Updated webpack config Include the bundler:audit job into the static-analysis job Document serializers Add artifact file page that uses the blob viewer Pipeline table mini graph dropdown remains open when table is refreshed Adds off for event hub Compile gitlab-shell go executables Allow to create new branch and empty WIP merge request from issue page Moved to a view spec Improving copy of CONTRIBUTING.md, PROCESS.md, and code_review.md Convert seconds to minutes and hours on chat notifations Disable navigation to Pages config if Pages is disabled Sort the network graph both by commit date and topographically. Add tooltips to note action buttons Add breadcrumb, build header and pipelines submenu to artifacts browser Update todos screenshots removes the possibility of commit messages having carriage returns Handle incoming emails from aliases correctly ...
| * \ Merge branch 'master' into ↵Grzegorz Bizon2017-05-034-2/+28
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | feature/gb/manual-actions-protected-branches-permissions * master: (103 commits) Include missing project attributes to Import/Export Create the rest of the wiki docs Fill in information about creating the wiki Home page Move wiki doc to its own index page Create initial file for Wiki documentation Default to null user when asignee is unselected Re-enable ref operations with gitaly after not-found fix #31560 Add repo parameter to gitaly:install and workhorse:install Remove N+1 queries when checking nodes visible to user Don't validate reserved words if the format doesn't match Revert "Shorten and improve some job names" Remove unused initializer DRY the `<<: *except-docs` a bit in `.gitlab-ci.yml` Make the static-analysis job be run for docs branches too Add download_snippet_path helper Refresh the markdown cache if it was `nil` Add some documentation for the new migration helpers Update comments Display comments for personal snippets Update docs on creating a project ...
| * \ \ Merge branch 'master' into ↵Grzegorz Bizon2017-05-0281-244/+272
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | feature/gb/manual-actions-protected-branches-permissions * master: (314 commits) Better Explore Groups view Update Carrierwave and fog-core Add specs for Gitlab::RequestProfiler Add scripts/static-analysis to run all the static analysers in one go Shorten and improve some job names Group static-analysis jobs into a single job Don't blow up when email has no References header Update CHANGELOG.md for 9.1.2 Add changelog Add changelog Show Raw button as Download for binary files Use blob viewers for snippets Fix typo Fixed transient failure related to dropdown animations Revert "Merge branch 'tc-no-todo-service-select' into 'master'" fix link to MR 10416 Another change from .click -> .trigger('click') to make spec pass Change from .click -> .trigger('click') to make spec pass Disable AddColumnWithDefaultToLargeTable cop for pre-existing migrations Add AddColumnWithDefaultToLargeTable cop ... Conflicts: spec/requests/api/jobs_spec.rb
| * | | | Improve specs for jobs API regarding manual actionsGrzegorz Bizon2017-05-021-17/+50
| | | | |
* | | | | Merge branch ↵Sean McGivern2017-05-052-34/+75
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '29925-gitlab-shell-hooks-can-no-longer-send-absolute-paths-to-gitlab-ce' into 'master' Generate and handle a gl_repository param to pass around components Closes #29925 See merge request !10992
| * | | | | Generate and handle a gl_repository param to pass around componentsAlejandro Rodríguez2017-05-032-34/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new param allows us to share project information between components that don't share or don't have access to the same filesystem mountpoints, for example between Gitaly and Rails or between Rails and Gitlab-Shell hooks. The previous parameters are still supported, but if found, gl_repository is prefered. The old parameters should be deprecated once all components support the new format.
* | | | | | Multiple issue assignee: CE restriction for multiple assigneesValery Sizov2017-05-051-0/+22
| | | | | |
* | | | | | [Multiple issue assignee] Fix a number of specsValery Sizov2017-05-051-32/+0
| | | | | |
* | | | | | [Multiple issue assignee]: reslving some conflictsValery Sizov2017-05-042-20/+1
| | | | | |
* | | | | | Backport of multiple_assignees_feature [ci skip]Valery Sizov2017-05-042-12/+136
| |_|_|_|/ |/| | | |
* | | | | Merge branch '31544-size-of-project-from-api' into 'master' Rémy Coutable2017-05-041-0/+14
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | Resolve "Size of project from API" Closes #31544 See merge request !11013
| * | | | Expose project statistics on single requests via the APIMark Fletcher2017-05-031-0/+14
| | |/ / | |/| | | | | | | | | | | | | | | | | | + The statistics parameter was already accepted * This commit ensure that it is respected for GET /projects/:id endpoint + Add documentation of the parameter and update the example response for stats
* | | | Merge branch ↵Robert Speicher2017-05-031-0/+239
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | '28408-feature-proposal-include-search-options-to-pipelines-api' into 'master' Resolve "Feature Proposal: Include search options to pipelines API" Closes #28408 See merge request !9367
| * | | Correct typo in pipelines_spec.rbShinya Maeda2017-05-031-5/+5
| | | |
| * | | Use HasStatus::AVAILABLE_STATUSES instead of hard codingShinya Maeda2017-05-031-2/+2
| | | |
| * | | Improve api/pipelines_spec.rbShinya Maeda2017-05-031-92/+105
| | | |
| * | | Remove unnecessary hashShinya Maeda2017-05-031-19/+19
| | | |