Commit Graph
4319 Commits
Author SHA1 Message Date
James Lopez ba1fcf3619 added commits and merge request diffs to export 2016-03-14 12:29:46 +01:00
James Lopez 5fbcfab63f Merge branches 'feature/project-export' and 'master' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export 2016-03-14 11:26:34 +01:00
Stan Hu 74d7de8196 Revert "Revert "Merge branch 'support-go-subpackages' into 'master' ""
This reverts commit 5a586f364c
2016-03-12 21:05:23 +00:00
Stan Hu 3315fb820b Remove unnecessary go-get test (superseded by middleware) 2016-03-12 11:14:56 -08:00
Douwe Maan 5a586f364c Revert "Merge branch 'support-go-subpackages' into 'master' "
This reverts merge request !3191
2016-03-12 17:42:51 +00:00
Douwe Maan 826bc72c12 Merge branch 'support-go-subpackages' into 'master'
Support Golang subpackage fetching

Closes #13805

See merge request !3191
2016-03-12 17:38:08 +00:00
Stan Hu b23a05d09b Add spec for go-import middleware 2016-03-12 08:10:38 -08:00
Douwe Maan ff62e20607 Merge branch 'fix-gh-pr-import' into 'master'
Fix importing PR's from GitHub when the source repo was removed

Closes #13847 
Closes gitlab-com/support-forum#584

See merge request !3172
2016-03-12 14:07:45 +00:00
Douwe Maan 8ee1c0ffe5 Merge branch 'rs-disallow-blank-line-code' into 'master'
Disallow blank (non-null) values for a Note's `line_code` attribute

It's unclear how these blank values got added, but GitLab.com had a few:

```
irb(main):002:0> Note.where("line_code IS NOT NULL AND line_code = ''").count
=> 439
```

We've added a migration to convert any existing records to use a NULL
value when blank, and updated Note to set blank values to nil before
validation.

See merge request !3118
2016-03-12 14:01:06 +00:00
Robert Speicher 01f6db4f64 Disallow blank (non-null) values for a Note's line_code attribute
It's unclear how these blank values got added, but GitLab.com had a few:

```
irb(main):002:0> Note.where("line_code IS NOT NULL AND line_code = ''").count
=> 439
```

We've added a migration to convert any existing records to use a NULL
value when blank, and updated Note to set blank values to nil before
validation.
2016-03-11 17:46:50 -05:00
Douwe Maan cb81c8a5ef Merge branch 'rs-issue-12944' into 'master'
Use a custom Devise failure app to handle unauthenticated .zip requests

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/12944

See merge request !2828
2016-03-11 22:34:33 +00:00
Yorick PeterseandRobert Speicher 4f3fa519c6 Use a UNION in MergeRequest.in_projects
The OR condition for source_project_id/target_project_id leads to a
query plan that performs rather poorly on PostgreSQL due to the use of
sub-queries. Because Rails offers no easy alternative for this
particular problem we're forced to using a UNION for both conditions.
The resulting query performs much faster than just using an OR.
2016-03-11 15:26:32 -05:00
Yorick PeterseandRobert Speicher 78244ffcbf Corrected spec title for Namespace.search 2016-03-11 15:25:24 -05:00
Yorick PeterseandRobert Speicher ee75c49313 Make Namespace.search case-insensitive
This ensures searching namespaces works exactly the same as searching
for any other resource.
2016-03-11 15:25:24 -05:00
Yorick PeterseandRobert Speicher 0ab9571ad7 Fixed a few spec typos 2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher 300332bbf6 Fixed ProjectSearchResults spec to use a Project
This spec was still passing an ID to the #initialize method instead of
a Project instance.
2016-03-11 15:25:23 -05:00
Yorick PeterseandRobert Speicher 42fde69d39 Refactor Gitlab::SnippetSearchResults
This removes the need for plucking snippet IDs into memory.
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 013542965c Refactor Gitlab::SearchResults
Instead of plucking IDs this class now uses ActiveRecord::Relation
objects. Plucking IDs is problematic as searching for projects can lead
to a huge amount of IDs being loaded into memory only to be used as an
argument for another query (instead of just using a sub-query).
2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 2cf7f3f410 Use ILIKE/LIKE for searching milestones 2016-03-11 15:25:22 -05:00
Yorick PeterseandRobert Speicher 87e7c3e132 Use ILIKE/LIKE for Issuable.search and full_search 2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher 2076bdb62e Use ILIKE/LIKE for searching CI runners 2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher ce5e831bcf Use ILIKE/LIKE for searching groups 2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher 800aa29695 Use ILIKE/LIKE for searching users 2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher 508b6b46fe Use ILIKE/LIKE for searching notes 2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher 1f5284e5dd Use ILIKE/LIKE for searching snippets
Previously this used a regular LIKE which is case-sensitive on
PostgreSQL. This ensures that for both PostgreSQL and MySQL the
searching is case-insensitive similar to searching for projects.
2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher db615d0a79 Use ILIKE in Project.search_by_title
Similar to the changes made to Project.search the method
Project.search_by_title now also uses Arel so it can automatically use
ILIKE/LIKE instead of the lower() function.
2016-03-11 15:25:21 -05:00
Yorick PeterseandRobert Speicher 135659a751 Use ILIKE/LIKE + UNION in Project.search
This chance is broken up in two steps:

1. Use ILIKE on PostgreSQL and LIKE on MySQL, instead of using
   "WHERE lower(x) LIKE lower(y)" as ILIKE is significantly faster than
   using lower(). In many cases the use of lower() will force a slow
   sequence scan.

2. Instead of using 1 query that searches both projects and namespaces
   using a JOIN we're using 2 separate queries that are UNION'd
   together. Using a JOIN would force a slow sequence scan, using a
   UNION avoids this.

This method now uses Arel as Arel automatically uses ILIKE on PostgreSQL
and LIKE on MySQL, removing the need to handle this manually.
2016-03-11 15:25:21 -05:00
Douwe Maan 5a84e8381a Merge branch 'remove-benchmark-suite' into 'master'
Removed benchmark suite and its documentation

Related issue: gitlab-org/gitlab-ce#13718

See merge request !3137
2016-03-11 15:06:37 +00:00
Jacob Schatz d343c7a159 Merge branch 'comment-discard-button' into 'master'
Added discard button to comment form

Also changed the labels on the buttons to better match the action they are completing.

Closes #8057

See merge request !3085
2016-03-11 13:07:43 +00:00
Kamil Trzciński 1cdc355a0f Merge branch 'gitlab-ci-yaml-alias' into 'master'
Support YAML alias/anchor usage in .gitlab-ci.yml

This allows to reuse one job as a template for another one:

```
job1: &JOBTMPL
  script: execute-script-for-job

job2: *JOBTMPL

```

This also helps to solve some of the issues in gitlab-org/gitlab-ci#342

See merge request !2958
2016-03-11 12:04:32 +00:00
Douglas Barbosa Alexandre 37b00b16a5 Fix importing PR's from GitHub when the source repo was removed 2016-03-10 19:29:54 -03:00
ashleys 4cd9a5208c web hooks to webhooks 2016-03-10 14:48:29 -05:00
James Lopez cc8aafeded typo 2016-03-10 18:41:57 +01:00
Jacob Vosmaer 6bfff2fab2 Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into expiring-lock 2016-03-10 18:40:58 +01:00
Jacob Vosmaer f4d478a6a8 Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into expiring-lock 2016-03-10 17:07:27 +01:00
James Lopez a7acfa6614 add project members to export 2016-03-10 16:29:38 +01:00
Phil Hughes ee9a6d7fb3 Fixed failing milestone filter tests 2016-03-10 13:54:54 +00:00
Phil Hughes 8d7e0f0ba9 Fixed failing tests 2016-03-10 13:54:54 +00:00
Jacob Vosmaer a28c84b4ca Improve test descriptions 2016-03-10 12:55:06 +01:00
Jacob Vosmaer 662c4df748 Add tests for ExclusiveLease 2016-03-10 12:52:19 +01:00
Yorick Peterse d69dff5b4b Removed benchmark suite and its documentation
The rationale for this can be found in
https://gitlab.com/gitlab-org/gitlab-ce/issues/13718 but in short the
benchmark suite no longer serves a good purpose now that we have proper
production monitoring in place.

Fixes gitlab-org/gitlab-ce#13718
2016-03-10 11:15:43 +01:00
Yorick PeterseandRobert Speicher e32726c636 Added specs for Issue#referenced_merge_requests 2016-03-09 22:30:55 -05:00
Robert Speicher 8e3485d878 Merge branch 'fix-git-push-service-specs' into 'master'
Fixed the GitPushService specs

See merge request !3139
2016-03-09 20:42:14 +00:00
Douglas Barbosa Alexandre 00a19f323b Merge branch 'fix-todos' into 'master'
Fix error 500 in Todos

Closes #14095 

Closes #14075 

Closes #14109

Closes #14151

See merge request !3141
2016-03-09 19:22:43 +00:00
Yorick Peterse 53719ecb80 Handle permissions for ExternalIssue instances
This fixes the remainder of the GitPushService specs.
2016-03-09 17:10:43 +01:00
Yorick Peterse 96d35c5975 Fixed part of the GitPushService specs
These were broken by commit 21a05328ff.
Two JIRA tests remain broken but I can't quite figure out how to fix
them.
2016-03-09 17:10:43 +01:00
Douglas Barbosa Alexandre 9e342fb00a Destroy all related todos when removing a project 2016-03-09 11:06:58 -03:00
Kamil Trzcinski 640bf8ab72 Retry failed tests 2016-03-09 14:21:19 +01:00
Rémy Coutable 500337c4b2 Merge branch 'iurisilvio/gitlab-ce-bitbucket_closed' into 'master'
Fix bug where Bitbucket 'closed' issues were imported as 'opened'

_Originally opened at !2930 by @iurisilvio._

- - -

Bitbucket has an undocumented status `closed`.

https://confluence.atlassian.com/bitbucket/issues-resource-296095191.html

Related to https://gitlab.com/gitlab-com/support-forum/issues/559

See merge request !2973
2016-03-09 12:54:52 +00:00
James Lopez 4b88b4ffd5 fix wiki path issues and spec 2016-03-09 10:35:38 +01:00