summaryrefslogtreecommitdiff
path: root/spec/services
Commit message (Collapse)AuthorAgeFilesLines
* Update occurrences of MWBS to MWPSfix/mwbs-to-mwpsJames Lopez2017-03-016-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename column in the database Rename fields related to import/export feature Rename API endpoints Rename documentation links Rename the rest of occurrences in the code Replace the images that contain the words "build succeeds" and docs referencing to them Make sure pipeline is green and nothing is missing. updated doc images renamed only_allow_merge_if_build_succeeds in projects and fixed references more updates fix some spec failures fix rubocop offences fix v3 api spec fix MR specs fixed issues with partials fix MR spec fix alignment add missing v3 to v4 doc wip - refactor v3 endpoints fix specs fix a few typos fix project specs copy entities fully to V3 fix entity error more fixes fix failing specs fixed missing entities in V3 API remove comment updated code based on feedback typo fix spec
* Fix concurrent access on builds/registerKamil Trzcinski2017-03-011-0/+45
|
* Fix access to projects shared with a nested groupdm-nested-group-shared-projectsDouwe Maan2017-02-281-0/+74
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'only-create-unmergeable-todo-once' into 'master' Kamil Trzciński2017-02-281-0/+25
|\ | | | | | | | | | | | | Only create unmergeable todos once Closes #28555 See merge request !9513
| * Only create unmergeable todos onceonly-create-unmergeable-todo-onceSean McGivern2017-02-241-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we created an unmergeable todo when a merge request: 1. Had merge when pipeline succeeds set. 2. Became unmergeable. However, when merge when pipeline succeeds fails due to unmergeability, the flag isn't actually removed. And a merge request can become unmergeable multiple times, as every time the target branch is updated we need to re-check the mergeable status. This means that if the todo was marked done, and the MR was checked again, a new todo would be created for the same event. Instead of checking this, we should create the todo from the service responsible for merging when the pipeline succeeds. That way the todo is guaranteed to only be created when we care about it.
* | Include nested group into destroy_service_specsh-async-delete-childrenDmitriy Zaporozhets2017-02-271-0/+2
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Merge branch 'dm-fix-web-edit-new-lines' into 'master' Robert Speicher2017-02-241-3/+2
|\ \ | | | | | | | | | | | | Consistently create, update, and delete files, taking CRLF settings into account See merge request !9207
| * | Rename commit_file, commit_dir and remove_file and update specsDouwe Maan2017-02-241-3/+2
| |/
* | Implement final review comments from @DouweM and @rymaiTimothy Andrew2017-02-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Have `Uniquify` take a block instead of a Proc/function. This is more idiomatic than passing around a function in Ruby. - Block a user before moving their issues to the ghost user. This avoids a data race where an issue is created after the issues are migrated to the ghost user, and before the destroy takes place. - No need to migrate issues (to the ghost user) in a transaction, because we're using `update_all` - Other minor changes
* | Deleting a user shouldn't delete associated issues.Timothy Andrew2017-02-241-0/+44
|/ | | | | | | | | | | | | | | | - "Associated" issues are issues the user has created + issues that the user is assigned to. - Issues that a user owns are transferred to a "Ghost User" (just a regular user with `state = 'ghost'` that is created when `User.ghost` is called). - Issues that a user is assigned to are moved to the "Unassigned" state. - Fix a spec failure in `profile_spec` — a spec was asserting that when a user is deleted, `User.count` decreases by 1. After this change, deleting a user creates (potentially) a ghost user, causing `User.count` not to change. The spec has been updated to look for the relevant user in the assertion.
* Merge branch 'dm-meer-blauw-op-straat' into 'master' Robert Speicher2017-02-237-17/+18
|\ | | | | | | | | Enable (and disable) more RuboCops See merge request !9432
| * Revert "Enable Style/DotPosition"Douwe Maan2017-02-2311-75/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e00fb2bdc2090e9cabeb1eb35a2672a882cc96e9. # Conflicts: # .rubocop.yml # .rubocop_todo.yml # lib/gitlab/ci/config/entry/global.rb # lib/gitlab/ci/config/entry/jobs.rb # spec/lib/gitlab/ci/config/entry/factory_spec.rb # spec/lib/gitlab/ci/config/entry/global_spec.rb # spec/lib/gitlab/ci/config/entry/job_spec.rb # spec/lib/gitlab/ci/status/build/factory_spec.rb # spec/lib/gitlab/incoming_email_spec.rb
| * Revert "Prefer leading style for Style/DotPosition"Douwe Maan2017-02-2329-218/+218
| | | | | | | | This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
| * Fix new offensesDouwe Maan2017-02-231-3/+3
| |
| * Enable Rails/DelegateDouwe Maan2017-02-231-3/+1
| |
| * Enable Style/WordArrayDouwe Maan2017-02-233-6/+6
| |
| * Enable Style/MultilineHashBraceLayoutDouwe Maan2017-02-231-4/+7
| |
| * Prefer leading style for Style/DotPositionDouwe Maan2017-02-2329-218/+218
| |
| * Enable Performance/RedundantMergeDouwe Maan2017-02-231-2/+2
| |
| * Enable Style/SpaceInsideBracketsDouwe Maan2017-02-231-2/+2
| |
| * Enable Style/DotPositionDouwe Maan2017-02-2310-72/+72
| |
* | Merge branch 'fix/gb/pipeline-retry-skipped-jobs' into 'master' Kamil Trzciński2017-02-231-2/+23
|\ \ | |/ |/| | | | | Fix reprocessing skipped jobs when retrying pipeline See merge request !9436
| * Fix reprocessing skipped jobs when retrying pipelineGrzegorz Bizon2017-02-221-2/+23
| |
* | Merge branch 'fix-test-for-build-attributes' into 'master' Kamil Trzciński2017-02-231-2/+2
|\ \ | | | | | | | | | | | | Fix build attributes test See merge request !9409
| * | Fix build attributes test, see:Lin Jen-Shin2017-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9021#note_23782188 This is discovered by https://gitlab.com/gitlab-org/gitlab-ce/builds/10815456 I removed `gl_project_id` and this is failing. I took some look, realizing that: * `trace` is duplicated in `attributes` * `tag_list` is not included in `build.attributes` * `artifacts_expire_at` is missing in `attributes` So we need to: * Remove duplicated `trace` in `attributes` (40 -> 39) * Remove `tag_list` in `attributes` (39 -> 38) * Add `artifacts_expire_at` to `attributes` (38 -> 39) * Add `gl_project_id` to `attributes` (39 -> 40)
* | | updated ci skip regex to accept underscores and hyphensupdate-ci-skip-regex-to-accept-underscores-and-hyphensLuke "Jared" Bennett2017-02-221-42/+29
| | |
* | | Merge branch 'issue_28051_2' into 'master'Sean McGivern2017-02-221-7/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Create compare object with default branch when target branch is missing Closes #28051 See merge request !9263
| * | | Create compare object with default branch when target branch is missingissue_28051_2Felipe Artur2017-02-211-7/+6
| |/ /
* | | Merge branch '28093-snippet-and-issue-spam-check-on-edit' into 'master'Sean McGivern2017-02-222-38/+43
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Spam check and reCAPTCHA improvements Closes #28093 See merge request !9248
| * | Spam check and reCAPTCHA improvements28093-snippet-and-issue-spam-check-on-editOswaldo Ferreira2017-02-212-38/+43
| |/
* | Add user deletion permission check in `Users::DestroyService`sh-delete-user-permission-checkStan Hu2017-02-201-5/+26
|/ | | | | | | | | We saw from a recent incident that the `Users::DestroyService` would attempt to delete a user over and over. Revoking the permissions from the current user did not help. We should ensure that the current user does, in fact, have permissions to delete the user. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Prevent project team from being truncated too early during project destructionsh-fix-project-team-truncation-in-destroyStan Hu2017-02-191-0/+19
| | | | | | | | | | There are two issues with truncating the project team early: 1. `Projects::UnlinkForkService` may not close merge requests properly since permissions may be revoked early. 2. If an error is encountered during flushing of caches, then the user will lose all privileges, possibly causing an issue on deletion on retry.
* Merge branch '25465-todo-done-clicking-is-kind-of-unsafe' into 'master' Clement Ho2017-02-181-12/+24
|\ | | | | | | | | | | | | Todo done clicking is kind of unusable. Closes #25465 See merge request !8691
| * Todo done clicking is kind of unusable.Jacopo2017-02-171-12/+24
| | | | | | | | | | | | The Done button will change to an Undo button and the line item will be greyed out. Bold links will be unbolded. The user can undo the task by clicking the Undo button.
* | Merge branch 'master' into fix/gb/pipeline-retry-builds-startedGrzegorz Bizon2017-02-1713-25/+480
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (313 commits) Allow slashes in slash command arguments Add API endpoint to get all milestone merge requests remove trailing comma Restore pagination to admin abuse reports replace deprecated NoErrorsPlugin with NoEmitOnErrorsPlugin only compress assets in production Reduce number of pipelines created to test pagination add CHANGELOG.md entry for !8761 prevent diff unfolding link from appearing for deleted files fix build failures only show diff unfolding link if there are more lines to show fix typo in node section Only yield valid references in ReferenceFilter.references_in Cache js selectors; fix css move "Install node modules" step before "Migrate DB" within update process Renders pagination again for pipelines table update migration docs for 8.17 to include minimum node version Add CHANGELOG file Fix positioning of top scroll button Remove comments in migration ...
| * \ Merge branch 'use-update-runner-service' into 'master' Kamil Trzciński2017-02-171-0/+41
| |\ \ | | |/ | |/| | | | | | | | | | | | | Prefer service object over after_save hook Closes #26921 See merge request !8664
| | * Merge remote-tracking branch 'upstream/master' into use-update-runner-serviceLin Jen-Shin2017-02-1517-48/+662
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (488 commits) Remove duplicate CHANGELOG.md entries for 8.16.5 Update CHANGELOG.md for 8.14.9 Update CHANGELOG.md for 8.15.6 #27631: Add missing top-area div to activity header page Update CHANGELOG.md for 8.16.5 Update CHANGELOG.md for 8.16.5 Update CHANGELOG.md for 8.16.5 Fix yarn lock and package.json mismatch caused by MR 9133 sync yarn.lock with recent changes to package.json Add changelog Fix z index bugs Add Links to Branches in Calendar Activity SidekiqStatus need to be qualified in some cases Replace static fixture for behaviors/requires_input_spec.js (!9162) API: Consolidate /projects endpoint Add MySQL info in install requirements Fix timezone on issue boards due date Use Gitlab::Database.with_connection_pool from !9192 Disconnect the pool after done Use threads directly, introduce pool later: ...
| | * | Only tick queue if anything is updatedLin Jen-Shin2017-02-071-4/+27
| | | | | | | | | | | | | | | | | | | | Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8664#note_22853522
| | * | Just pass :services, feedback:Lin Jen-Shin2017-02-071-1/+1
| | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8664#note_22853463
| | * | Merge remote-tracking branch 'upstream/master' into use-update-runner-serviceLin Jen-Shin2017-02-0714-86/+198
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (379 commits) Fixed failing tests because list doens't exist Add changelog file Update system_note_service_spec.rb Remove noteable object in time tracking system notes [ci-skip] Make all system notes lowercase Fixed eslint Don't render snippet actions for logged-out users Remove deprecated MR and Issue endpoints and preserve V3 namespace Removed additional dropdown list animations Improve docs on CI/CD code coverage regexp setting Improve Changelog entry for CI config compatibility fix Refine docs on code coverage regexp on job level Introduce maximum session time for terminal websocket connection Add Changelog entry for CI config compatibility fix Map configuration to directory locations and add defaults to NFS HA doc. Update docs on setting up a CI/CD coverage regexp Fix Rubocop offense in legacy CI/CD config specs add CHANGELOG entry for !8988 transpile all javascript files with babel add npm run webpack command ...
| | * \ \ Merge remote-tracking branch 'upstream/master' into use-update-runner-serviceLin Jen-Shin2017-02-0416-309/+566
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (589 commits) Backport changes from EE squash Fix broken tests Rename Build to Job Adds changelog entry Change "Build" to "Job" in builds show page header and sidebar replace `find_with_namespace` with `find_by_full_path` PlantUML support for Markdown remove dateFormat global exception fix relative paths to xterm.js within fit.js use setFixtures instead of fixture.set prevent u2f tests from triggering a form submission while testing simplify test for focus state preload projects.json fixture preload projects.json fixture rework tests which rely on teaspoon-specific behavior Only render hr when user can't archive project. use setFixtures instead of fixture.set ensure helper classes and constants are exposed globally preload projects.json fixture fix fixture references in environments_spec allow console.xxx in tests, reorder eslint rules alphabetically ...
| | * | | | Prefer service object over after_save hookLin Jen-Shin2017-01-211-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Closes #26921
| * | | | | Merge branch 'sh-namespace-cleanup-deleted-projects' into 'master' Douwe Maan2017-02-161-3/+16
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a number of race conditions that can occur during namespace deletion See merge request !9294
| | * | | | | Fix a number of race conditions that can occur during namespace deletionsh-namespace-cleanup-deleted-projectsStan Hu2017-02-151-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two problems in the current implementation: 1. If a project is marked for deletion via the `pending_delete` flag and then the namespace was quickly deleted, it's possible that the namespace skips over that project and leaves that project in an orphaned state. 2. Before namespace deletion, the namespace attempts to clean up all the relevant storage paths. However, if all projects have been removed synchronously, then the namespace will not be able to clean anything. To prevent this, we should load the paths to be deleted before actually destroying projects. The specs were missing this second case due to a permission issue that caused project removal never to happen.
| * | | | | | Merge branch '28124-mrs-don-t-show-all-merge-errors' into 'master' Rémy Coutable2017-02-161-9/+20
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show merge errors in merge request widget Closes #28124 and gitlab-ee#1652 See merge request !9229
| | * | | | | Show merge errors in merge request widgetSean McGivern2017-02-161-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two problems here: 1. On the JS side, the reference to $widgetBody didn't refer to the right DOM element any more. This might be because it was replaced by the `getMergeStatus` method. Even if it wasn't, ensuring we have the right element means that the content gets updated. 2. On the Ruby side, the `log_merge_error` method didn't update the `merge_error` column of the merge request. Change that to update if requested, and update in the most common cases by default. Additionally, this would sometimes return an error hash, but it doesn't look like this was ever used (the return value of `MergeService#execute` appears to be unused everywhere).
| * | | | | | Merge branch 'move_tags_service_to_namespace' into 'master'Rémy Coutable2017-02-152-2/+2
| |\ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | Move tag services to `Tags` namespace See merge request !9231
| | * | | | | Move tag services to `Tags` namespacedixpac2017-02-142-2/+2
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CreateTagService and DeleteTagService where in root namespace, by following service code organization I moved them in Tags::CreateService and Tags::DestroyService
| * | | | | Execute web hooks for WikiPage delete operationMark Fletcher2017-02-141-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a new DestroyService for Wiki Pages * Alter WikiPagesController to use the new service
| * | | | | Add tests for WikiPages servicesMark Fletcher2017-02-142-0/+73
| |/ / / / | | | | | | | | | | | | | | | * Alter wiki_pages factory with custom creation operation