Commit Graph
28962 Commits
Author SHA1 Message Date
Stan Hu e5bb417cde Reduce number of fog gem dependencies
Closes #15352
2016-06-01 11:51:26 -07:00
Stan Hu e9bb895b5a Merge branch 'fix-note-validation-failure' into 'master'
Fix note validation spec failure

Fix failing build due to project of note not matching issue project.

See merge request !4415
2016-06-01 18:43:44 +00:00
Jacob Schatz 5a377d20d5 Merge branch 'add-edge-support' into 'master'
Add Edge to supported browsers list.

Add Microsoft's Edge browser to the list of supported browsers. We support the latest stable version.

See merge request !4416
2016-06-01 17:58:21 +00:00
Connor Shea 22e7aab8fb Add Edge to supported browsers list. [ci skip] 2016-06-01 11:56:54 -06:00
Robert Speicher 93e2761c89 Merge branch 'dont-advertise-ci-skip' into 'master'
Don't advertise the use of "ci skip" in the CONTRIBUTING guide

[ci skip]

See merge request !4406
2016-06-01 17:56:49 +00:00
Robert Speicher 3d3c9c75aa Merge branch 'style/enable-semicolon-rubocop-cop' into 'master'
Enable Style/Semicolon rubocop style cop

Don't use semicolons to terminate expressions.

See #17478.

See merge request !4351
2016-06-01 17:41:19 +00:00
Robert Speicher 164fc34eb2 Merge branch 'rubocop/enable-style-for-cop' into 'master'
Enable Style/For rubocop cop

> Do not use `for`, unless you know exactly why. Most of the time iterators should be used instead. `for` is implemented in terms of `each` (so you're adding a level of indirection), but with a twist - `for` doesn't introduce a new scope (unlike `each`) and variables defined in its block will be visible outside it.

See #17478

See merge request !4397
2016-06-01 17:36:42 +00:00
Stan Hu 30aa64202b Fix note validation spec failures 2016-06-01 10:31:46 -07:00
Dmitriy Zaporozhets 4621531a40 Merge branch 'dz-one-ci-cd-tab' into 'master'
Merge Builds and Pipelines tab into one

Based on https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4053#note_12064642. Main idea is to keep all CI-related pages under one tab. So we can keep top navigation clean. 

First I tried `CI/CD` naming but it looked weird so I just used Pipelines as tab name. I did not change project settings naming. 

cc @ayufan @markpundsack @jschatz1 

See merge request !4340
2016-06-01 16:53:21 +00:00
Douwe Maan 2d084dd848 Merge branch 'separate-banzai-references' into 'master'
Separate reference gathering from rendering

This is a required step to allow batch processing when gathering references. This in turn would allow grabbing (for example) all mentioned users of an issue/merge request using a single query.

cc @rspeicher @DouweM 

See merge request !3969
2016-06-01 15:51:59 +00:00
Yorick Peterse 580d250166 Refactor Participable
There are several changes to this module:

1. The use of an explicit stack in Participable#participants
2. Proc behaviour has been changed
3. Batch permissions checking

== Explicit Stack

Participable#participants no longer uses recursion to process "self" and
all child objects, instead it uses an Array and processes objects in
breadth-first order. This allows us to for example create a single
Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using
a ReferenceExtractor removes the need for running potentially many SQL
queries every time a Proc is called on a new object.

== Proc Behaviour Changed

Previously a Proc in Participable was expected to return an Array of
User instances. This has been changed and instead it's now expected that
a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return
value of the Proc is ignored.

== Permissions Checking

The method Participable#participants uses
Ability.users_that_can_read_project to check if the returned users have
access to the project of "self" _without_ running multiple SQL queries
for every user.
2016-06-01 16:22:35 +02:00
Douwe Maan ef6fe42ec0 Merge branch 'fix-cancelable-retryable' into 'master'
Fix cancelability and retriablity of pipeline with generic statuses

Currently it's not possible to cancel or retry generic status since this is external thing to GitLab.

This fixes shown actions of pipelines containing only these actions.


See merge request !4380
2016-06-01 14:21:03 +00:00
Rémy Coutable 4581e71c44 Merge branch 'fix/error-500-in-pipeline-when-fork' into 'master'
Use project that belongs to pipeline in view

## What does this MR do?

This MR makes project in pipelines view match the one that pipeline has been created for.

Closes #17943 

See merge request !4376
2016-06-01 12:37:51 +00:00
Rémy Coutable ea80259b48 Don't advertise the use of "ci skip" in the CONTRIBUTING guide
Now that we autoscale runner, we don't need to optimize for their usage
anymore. Abusing of "ci skip", for instance for view changes can lead to
broken specs, so let's just not use it!

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-01 14:18:37 +02:00
Douwe Maan d1c537ad32 Merge branch 'long.polyglot/gitlab-ce-issue_17479_todos_not_remove_when_leave_project' 2016-06-01 13:39:56 +02:00
Kamil Trzcinski 57992f3d03 Fix rubocop offenses 2016-06-01 13:10:00 +02:00
Douwe Maan 9d88a3a1dd Merge branch 'emails-on-push-use-sidekiq-mailers' into 'master'
Make EmailsOnPushWorker use Sidekiq mailers queue

A customer was having issues with EmailsOnPushWorker clogging the Sidekiq queues and merge requests not being handled quickly. While researching whether it would possible to spin up a separate Sidekiq task just to handle merge requests and other key functions, I found that this worker was using the default Sidekiq queue. Moving to the `mailers` queue makes it possible to de-prioritize this worker and give more weight to the others.

See merge request !4390
2016-06-01 11:07:25 +00:00
Douwe Maan 173d83cae9 Merge branch 'prefer-to_reference' into 'master'
Use `Snippet#to_reference` directly

## What does this MR do?

Instead of hard coding snippet reference, we could just use the existing method for that.

## Why was this MR needed?

To address https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4338#note_12166325 from @DouweM

/cc @jschatz1 

See merge request !4379
2016-06-01 10:57:26 +00:00
Douwe Maan 3416bc53fb Merge branch 'rs-remember-me-2fa' into 'master'
Pass the "Remember me" value to the 2FA token form

Prior, if a user had 2FA enabled and checked the "Remember me" field,
the setting was ignored because the OTP input was on a new form and the
value was never passed.

Closes #18000

See merge request !4369
2016-06-01 10:57:05 +00:00
Douwe Maan 4a50e1f051 Merge branch 'current-settings-use-request-store-during-request' 2016-06-01 12:55:00 +02:00
Douwe Maan c0f19cc94e Merge branch 'fix-404-labels-in-todos' into 'master'
Fix 404 page when viewing TODOs that contain milestones or labels in different projects

A user viewing the TODOs page will see a 404 if there are mentioned milestones or labels in multiple different projects. This is likely a caching bug and only occurs
when Markdown rendering occurs across multiple projects, which is why it's so tricky to reproduce. This is what I think is happening:
    
1. LabelReferenceFilter#references_in encounters label ~X for ProjectA and finds the label in the DB as id = 1.
2. LabelReferenceFilter.references_in yields [1, 'X', nil, ...]
3. Since project_ref is nil, AbstractReferenceFilter#project_from_ref_cache caches nil => ProjectA.
4. LabelReferenceFilter#references_in encounters label ~Y for ProjectB and finds the label in the DB as id = 2.
5. LabelReferenceFilter.references_in yields [2, 'Y', nil, ...]
6. AbstractReferenceFilter#project_from_ref_cache lookups nil and returns ProjectA. It was supposed to be ProjectB.
7. A is the wrong project, so the label lookup fails.
   
This MR expands the `project_ref` to the right value as soon as we have it to avoid this caching bug.
    
Closes #17898


See merge request !4312
2016-06-01 10:50:03 +00:00
Grzegorz Bizon 888e6fad3e Add Changelog entry for links fix on pipeline page 2016-06-01 12:01:53 +02:00
Grzegorz Bizon d133175b39 User internal pipeline to access project in views 2016-06-01 12:01:49 +02:00
Grzegorz Bizon 02cddaea6f Add feature specs for pipeline in MR from fork 2016-06-01 11:57:22 +02:00
Grzegorz Bizon 24c0f0d671 Add feature test for accessing MR created from fork 2016-06-01 11:57:22 +02:00
Grzegorz Bizon 0319d5b632 Enable Style/For rubocop cop
Do not use for, unless you know exactly why.

See #17478
2016-06-01 11:18:11 +02:00
Rémy Coutable adcbd00135 Merge branch 'doc_api_services_jira_amend' into 'master'
Amend jira service api docs [ci skip]

## What does this MR do?

Amends the API documentation for jira service integration

## Are there points in the code the reviewer needs to double check?

No

## Why was this MR needed?

The current documentation omits the username and password parameters

## What are the relevant issue numbers?

## Screenshots (if relevant)

See merge request !4382
2016-06-01 09:09:37 +00:00
Rémy Coutable 46ac3107a4 Merge branch 'issue_15557' into 'master'
Fix error 500 when sorting issues by milestone due date and filtering by labels

fixes #15557 

See merge request !4327
2016-06-01 08:42:36 +00:00
Dmitriy Zaporozhets cb261abee1 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2016-06-01 11:34:45 +03:00
Dmitriy Zaporozhets 8959de25d7 Merge branch 'rs-event-common-has-tooltip' into 'master'
Add tooltips for common Event feed entries

This adds tooltips to the event target for events like "opened merge
request !XYZ"

After https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4090#note_11712839, several references in the event feed had titles but were still missing tooltips.

See merge request !4371
2016-06-01 08:34:29 +00:00
Grzegorz Bizon face87b7bb Enable Style/Semicolon rubocop style cop
See #17478
2016-06-01 08:45:14 +02:00
Stan Hu f8a3344d12 Fix 404 page when viewing TODOs that contain milestones or labels in different projects
A user viewing the TODOs page will see a 404 if there are mentioned labels
in multiple different projects. This is likely a caching bug and only occurs
when Markdown rendering occurs across multiple projects, which is why it's so
tricky to reproduce. This is what I think is happening:

1. LabelReferenceFilter#references_in encounters label ~X for ProjectA and finds the label in the DB as id = 1.
2. LabelReferenceFilter.references_in yields [1, 'X', nil, ...]
3. Since project_ref is nil, AbstractReferenceFilter#project_from_ref_cache caches nil => ProjectA.
4. LabelReferenceFilter#references_in encounters label ~Y for ProjectB and finds the label in the DB as id = 2.
5. LabelReferenceFilter.references_in yields [2, 'Y', nil, ...]
6. AbstractReferenceFilter#project_from_ref_cache lookups nil and returns ProjectA. It was supposed to be ProjectB.
7. A is the wrong project, so the label lookup fails.

This MR caches Markdown references if the key is present.

Closes #17898
2016-05-31 20:37:53 -07:00
Jacob Schatz 473ea1e974 Merge branch '17756-close-btn' into 'master'
New style for close buttons

## What does this MR do?
Adds new style for all `Close` buttons

## What are the relevant issue numbers?
Closes #17756 
## Screenshots (if relevant)   
<img src="/uploads/a1d4cb8c22facb4c170e9cf3b4ae439a/Screen_Shot_2016-05-31_at_2.26.42_PM.png" width="800px">   
<img src="/uploads/d567694d79ec6bd5da0ff2faf8b262b0/Screen_Shot_2016-05-31_at_2.26.09_PM.png" width="800px">   
<img src="/uploads/f5e23d8031427079a334d4e03da466b0/Screen_Shot_2016-05-31_at_2.29.01_PM.png" width="800px">   


cc @dzaporozhets 


See merge request !4388
2016-05-31 22:51:33 +00:00
Felipe Artur 56f3b243ce Add leading comment space cop 2016-05-31 19:33:46 -03:00
Stan Hu 47b60b6cfe Make EmailsOnPushWorker use Sidekiq mailers queue
EmailsOnPushWorker was using the default queue, which made it impossible
to prioritize MergeWorker and other key workers with a separate Sidekiq
process.
2016-05-31 15:06:08 -07:00
Robert Speicher 09a80feede Merge branch 'upgrade-kaminari' into 'master'
Upgrade Kaminari from 0.16.3 to 0.17.0.

Changelog: https://github.com/amatsuda/kaminari/blob/master/CHANGELOG.rdoc#0170

Deprecates `num_pages` in favor of `total_pages` and includes Rails 5 support.

Working towards #14286.

See merge request !4387
2016-05-31 21:07:57 +00:00
Stan Hu 873718aa7f Merge branch 'rs-create-remote-backup-folder' into 'master'
Create the specified remote directory during backup

This is idempotent, so there's no harm calling it if the directory
already exists.

Closes #12710

See merge request !4383
2016-05-31 20:56:21 +00:00
Annabel Dunstone 1648316eff New style for close buttons 2016-05-31 14:23:27 -06:00
Connor Shea 7f4f959e9b Upgrade Kaminari from 0.16.3 to 0.17.0.
Changelog: https://github.com/amatsuda/kaminari/blob/master/CHANGELOG.rdoc#0170

Deprecates num_pages in favor of total_pages and includes Rails 5 support.
2016-05-31 14:14:16 -06:00
Robert Speicher 613bcdc626 Merge branch 'data_leak' into 'master'
Confidential notes data leak

Fixes part of https://gitlab.com/gitlab-org/gitlab-ee/issues/575

See merge request !1967
2016-05-31 19:35:13 +00:00
Robert Speicher 4ec1b65bea Merge branch 'refactoring/improve-build-specs' into 'master'
Remove redundant factory namespace in build specs

Extracted from !4351.

See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4351#note_12154604

See merge request !4373
2016-05-31 18:48:27 +00:00
Valery Sizov 9154586ce5 Confidential notes data leak 2016-05-31 21:32:53 +03:00
Rémy Coutable c12c77eb25 Merge branch 'feature/improve_wiki_page_events' into 'master'
Include Wiki attributes in Wiki page events webhook

The hook data we are sending is not 100% correct (we send details of the project, but should also send details of the "ProjectWiki" attributes like URLs and repositories relative to the wiki itself).

This is a follow up to #17506

Fixes #17507

See merge request !4138
2016-05-31 18:10:23 +00:00
Robert Speicher b826c9ff17 Create the specified remote directory during backup
This is idempotent, so there's no harm calling it if the directory
already exists.

Closes #12710
2016-05-31 13:29:37 -04:00
Stan Hu e87149a12b Merge branch 'remove-dangling-notification-settings' into 'master'
Remove project notification settings associated with deleted projects

On GitLab.com, there are 1560 project notification settings with no valid project all created on 2016-04-15 10:38:53 for some reason. This migration should purge
those entries.
    
b8f38437 should prevent this issue from occurring in the first place.
    
Closes gitlab-com/support-forum#678


See merge request !4311
2016-05-31 16:51:04 +00:00
Richard Grainger 024227bdbf Amend jira service api docs [ci skip] 2016-05-31 17:28:20 +01:00
Stan Hu 4da0778157 Remove project notification settings associated with deleted projects
On GitLab.com, there are 1560 project notification settings with no valid project
all created on 2016-04-15 10:38:53 for some reason. This migration should purge
those entries.

b8f38437 should prevent this issue from occurring in the first place.

Closes gitlab-com/support-forum#678
2016-05-31 08:50:18 -07:00
Douwe Maan 5011eeb16e Merge branch 'container-registry-token-ttl' into 'master'
Add Application Setting to configure Container Registry token expire delay (default 5min)

This adds an option to configure Container Registry token expire delay. The default is set to 5mins (something that is also used by Docker Hub).

What is left:
* [x] Write test to check the expire_delay

Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/17890

@stanhu I think that this should land in patch release of 8.8.

See merge request !4364
2016-05-31 15:23:54 +00:00
Gabriel Mazetto 6d16feef05 Add wiki page events fix to the Changelog 2016-05-31 12:07:01 -03:00
Gabriel Mazetto 04084996e5 Codestyle changes 2016-05-31 11:24:58 -03:00