summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fixed sticky MR tabs positioning when sidebar is pinnedsticky-mr-tabs-pinned-navPhil Hughes2016-10-292-0/+13
| | | | Closes #23926
* Merge branch '23849-pipeline-graph-bug' into 'master' Fatih Acet2016-10-281-2/+1
|\ | | | | | | | | | | | | | | Only remove right connector of first build of last stage Only remove right connector of first build of last stage. Closes #23849 See merge request !7179
| * Only remove right connector of first build of last stage23849-pipeline-graph-bugAnnabel Dunstone Gray2016-10-281-2/+1
| |
* | Merge branch 'dz-internal-api-fullpath' into 'master' Dmitriy Zaporozhets2016-10-283-4/+33
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make internal api work with full repo path and name ## What does this MR do? Make internal api work with full repo path and name ## Why was this MR needed? So we can pass full repository path on filesystem from gitlab-shell instead of extracted one. We need this for nested groups support where project is can be nested under several groups. ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/2772 See merge request !7148
| * | Refactor storage path extraction from full repo pathdz-internal-api-fullpathDmitriy Zaporozhets2016-10-283-6/+25
| | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | Make internal api work with full repo path instead of nameDmitriy Zaporozhets2016-10-271-4/+14
| | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | Merge branch 'cycle-analytics-bundle' into 'master' Fatih Acet2016-10-284-0/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create cycle analytics bundle ## What does this MR do? Currently the cycle analytics file is being included in our application.js file & therefore including VueJS in application.js. This MR creates a cycle analytics bundle and only includes it on the cycle analytics page. See merge request !7176
| * | | CHANGELOG itemcycle-analytics-bundlePhil Hughes2016-10-281-0/+1
| | | |
| * | | Create cycle analytics bundlePhil Hughes2016-10-283-0/+5
| | | | | | | | | | | | | | | | This prevents VueJS being included in application.js & therefore included on everypage
* | | | Merge branch '22392-add-x-of-y-tasks-completed-on-issuable' into 'master' Sean McGivern2016-10-2811-8/+42
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add "x of y tasks completed" on issuable Closes #22392 See merge request !6527
| * | | | add "x of y tasks completed" on issuableGuilherme Salazar2016-10-2811-8/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix issues pointed out in !6527 add task completion status feature to CHANGELOG
* | | | | Merge branch 'fix-8-13-changelog-gh-import' into 'master' Rémy Coutable2016-10-281-3/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix CHANGELOG for GH import fixes See merge request !7173
| * | | | | Fix CHANGELOG for GH import fixesfix-8-13-changelog-gh-importSean McGivern2016-10-281-3/+3
| |/ / / / | | | | | | | | | | | | | | | These changes are targeted for 8.13.2, not 8.14.
* | | | | Merge branch ↵Stan Hu2016-10-282-11/+73
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'ee-1159-allow-permission-check-bypass-in-approve-access-request-service' into 'master' Allow Members::ApproveAccessRequestService to accept a new `:force` option ## What does this MR do? See the commit message. This is a backport of the EE fix for https://gitlab.com/gitlab-org/gitlab-ee/issues/1159: gitlab-org/gitlab-ee!830 See merge request !7168
| * | | | | Allow Members::ApproveAccessRequestService to accept a new :force paramee-1159-allow-permission-check-bypass-in-approve-access-request-serviceRémy Coutable2016-10-282-11/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This param allows to bypass permission check. It is useful for LDAP-sync where even owners don't have the :admin_group_member permission. See https://gitlab.com/gitlab-org/gitlab-ee/blob/6081c37123abae4570f78831b33c2f45f92c2765/app/policies/group_policy.rb#L38 and https://gitlab.com/gitlab-org/gitlab-ee/issues/1159 Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | Merge branch ↵Rémy Coutable2016-10-282-8/+195
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '23872-members-of-group-that-has-project-access-getting-404-on-accessing-a-project-issue' into 'master' Fix project member access for group links Closes #23872. See merge request !7144
| * | | | | Add specs for a user from a group link23872-members-of-group-that-has-project-access-getting-404-on-accessing-a-project-issueSean McGivern2016-10-281-0/+30
| | | | | |
| * | | | | Fix project member access for group linksSean McGivern2016-10-282-8/+165
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ProjectTeam#find_member` doesn't take group links into account. It was used in two places: 1. An admin view - it can stay here. 2. `ProjectTeam#member?`, which is often used to decide if a user has access to view something. This second part broke confidential issues viewing. `IssuesFinder` ends up delegating to `Project#authorized_for_user?`, which does consider group links, so users with access to the project via a group link could see confidential issues on the index page. However, `IssuesPolicy` used `ProjectTeam#member?`, so the same user couldn't view the issue when going to it directly.
* | | | | Merge branch 'adam-fix-labels-find-or-create' into 'master' Douwe Maan2016-10-2810-46/+70
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass user instance to Labels::FindOrCreateService or skip_authorization: true ## What does this MR do? It fixes a bug described in #23694 when `project.owner` was passed to `Labels::FindOrCreateService`. `Labels::FindOrCreateService` expected a user instance and `project.owner` may return a group as well. This MR makes sure that we either pass a user instance or `skip_authorization: true`. ## Are there points in the code the reviewer needs to double check? - places where we pass `skip_authorization: true` ## Does this MR meet the acceptance criteria? - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [ ] 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? Fixes #23694 See merge request !7093
| * | | | Pass user instance to Labels::FindOrCreateService or skip_authorization: trueadam-fix-labels-find-or-createAdam Niedzielski2016-10-2810-46/+70
| |/ / / | | | | | | | | | | | | | | | | | | | | Do not pass project.owner because it may return a group and Labels::FindOrCreateService throws an error in this case. Fixes #23694.
* | | | Merge branch 'use-optimistic-locking' into 'master' Stan Hu2016-10-2814-49/+122
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | Make retry_lock to not be infiniteuse-optimistic-lockingKamil Trzcinski2016-10-273-5/+20
| | | | |
| * | | | Fix Rubocop unused variables warningStan Hu2016-10-261-2/+2
| | | | |
| * | | | Remove puts to solve Rubocop errorsStan Hu2016-10-261-2/+0
| | | | |
| * | | | Fix duration specsKamil Trzcinski2016-10-261-14/+7
| | | | |
| * | | | Fix optimistic lockingKamil Trzcinski2016-10-267-16/+27
| | | | |
| * | | | Add tests for optimistic lockingKamil Trzcinski2016-10-265-7/+38
| | | | |
| * | | | Use optimistic lockingKamil Trzcinski2016-10-266-25/+50
| | | | |
* | | | | Merge branch 'issue-board-welcome-cookie-monster' into 'master' Robert Speicher2016-10-284-2/+9
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete issue board welcome cookie ## What does this MR do? This was seen in the idea to production demo, because the project had already existed on the exact same URL the cookie already existed which meant the blank state wasn't shown. This MR deletes the cookie on project create. See merge request !6899
| * | | | | Fixed boards store specissue-board-welcome-cookie-monsterPhil Hughes2016-10-282-3/+5
| | | | | |
| * | | | | Delete issue board welcome cookie when project is newPhil Hughes2016-10-283-2/+7
| | |_|/ / | |/| | |
* | | | | Merge branch 'clean-up-issue_spec.js' into 'master' Rémy Coutable2016-10-2810-95/+244
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace static fixture by generated one in issue_spec.js ## What does this MR do? - clean up `issue_spec.js` - introduce an alternative approach to #19445 - rename `rake teaspoon` to `rake teaspoon:tests` - introduce `rake teaspoon:fixtures` which generates fixtures using RSpec - introduce `rake teaspoon` which runs `rake teaspoon:fixtures` and `rake teaspoon:tests` ## Why was this MR needed? - many duplications - missing existence checks - missing conditions - static fixtures don't match real views ## Reasoning I want to explain some of my decisions here, so that they stay visible for future discussions. ### Why not HAML? - same number of HAML templates as number of fixtures (many input files) - embedded logic less readable - can not be rendered by JavaScript (because of inline Ruby) ### Why RSpec? - real controllers for fixtures - spys available for mocking - easily report failed fixture generations ### Why not magic_lamp? (#19445) - introduces another dependency/tool - needs to run a server concurrently to teaspoon - makes it harder to use a JavaScript test runner - static HTML files serve faster See merge request !6059
| * | | | Document how to run frontend testsWinnie2016-10-281-0/+14
| | | | |
| * | | | Replace static issue fixtures by script (!6059)winniehell2016-10-289-42/+134
| | | | |
| * | | | Clean up issue_spec.jswinniehell2016-10-281-59/+102
| | | | |
* | | | | Merge branch 'fix/make-github-import-retryable' into 'master' Sean McGivern2016-10-2812-27/+120
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify GitHub importer to be retryable Closes #23533 See merge request !7003
| * | | | | Fix typosfix/make-github-import-retryableAhmad Sherif2016-10-282-2/+2
| | | | | |
| * | | | | Abstract the use of imported[!?] and {current,increment}_page in GitHub importerAhmad Sherif2016-10-281-50/+34
| | | | | |
| * | | | | Use public_send instead of sendAhmad Sherif2016-10-281-1/+1
| | | | | |
| * | | | | Modify GitHub importer to be retryableAhmad Sherif2016-10-289-27/+136
| | | | | |
| * | | | | Check if repository already exists before trying to re-import itAhmad Sherif2016-10-282-2/+2
| | | | | |
* | | | | | Merge branch '5905-duplicate-email-errors' into 'master' Rémy Coutable2016-10-283-1/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only show one error message for an invalid email Changes it to only validate the notification_email format if it's different from email. Closes #5905 See merge request !7158
| * \ \ \ \ \ Merge branch 'master' into 5905-duplicate-email-errorsSteve Halasz2016-10-271-1/+1
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Get fix for teaspoon tests
| * \ \ \ \ \ \ Merge branch 'master' into 5905-duplicate-email-errorsSteve Halasz2016-10-27401-873/+3487
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Getting latest CHANGELOG so I can resolve merge conflict
| * | | | | | | | Add changelog entrySteve Halasz2016-10-271-0/+1
| | | | | | | | |
| * | | | | | | | Only show one error message for an invalid emailSteve Halasz2016-10-272-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If notification_email is blank, it's set from email. If an admin attempted to create a user with an invalid email, an error would be displayed for both fields. Only validate the notification_email if it's different from email.
* | | | | | | | | Merge branch 'bugfix/dragging_milestones' into 'master' Sean McGivern2016-10-284-2/+90
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop unauthorized users dragging on milestone page Closes #13670 See merge request !7113
| * | | | | | | | Merge branch 'bugfix/dragging_milestones' of gitlab.com:blackst0ne/gitlab-ce ↵blackst0ne2016-10-280-0/+0
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into bugfix/dragging_milestones
| | * | | | | | | | Stop unauthorized users dragging on milestone pageblackst0ne2016-10-284-2/+90
| | | | | | | | | |
| * | | | | | | | | Stop unauthorized users dragging on milestone pageblackst0ne2016-10-284-2/+90
| | |_|_|_|/ / / / | |/| | | | | | |