Commit Graph
3459 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets ee8884c68e Merge branch 'fix-preventing-migration-from-crashing-in-specific-cases' into 'master'
Fix preventing migration from crashing in very specific cases

Closes #12606. Closes #12501.

/cc @yorickpeterse @dbalexandre 

See merge request !2600
2016-01-28 15:20:14 +00:00
Dmitriy Zaporozhets dfb8803c1c Improve consistency and duplication for Merge Request API
* Follow REST for merge request API route
* Remove repeating comments API for MR

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-28 14:26:12 +01:00
Rémy Coutable 55ab92c00b Use ActiveRecord::Base.connection.active? and rescue any exception in connect_to_db?
This ensures that rake tasks that don't need a DB connection can be run
without one.
2016-01-28 12:23:37 +01:00
Rémy Coutable 869b4d7c6a Only create the defaults ApplicationSetting when DB is fully migrated
Return a fake application settings OpenStruct when this is not the case.
Also, use ActiveRecord::Base.connection_pool.active_connection? instead
of ActiveRecord::Base.connection.active? to avoid driver exception.
2016-01-28 11:26:28 +01:00
Robert Speicher 40403c78ef Merge branch 'fix-ci-runners-version-update' into 'master'
Fix CI runner version not being properly updated when asked for a build

Due to broken implementation of attribute_for_keys the runner information was not updated correctly.

This MR adds test to check that such scenario will never happen again.

See merge request !2618
2016-01-27 20:50:24 +00:00
Douwe Maan 1226d16675 Merge branch 'hot-reloading' into 'master'
Fix hot reloading for CI API



See merge request !2617
2016-01-27 15:26:59 +00:00
Kamil Trzcinski 95d2f0fb51 Fix CI runner version not being properly updated when asking for a build
Due to broken implementation of attribute_for_keys the runner information was not updated correctly.

This MR adds test to check that such scenario will never happen again.
2016-01-27 12:04:54 +01:00
Kamil Trzcinski 5ea32ba498 Fix hot reloading for CI API 2016-01-26 19:05:04 +01:00
Rémy Coutable e6f3fe5d3b Ensure rake tasks that don't need a DB connection can be run without one
When using ActiveRecord::Base.connection.active? without a DB
connection, we get a "PG::ConnectionBad: could not connect to server"
error because ActiveRecord::Base.connection doesn't exist. By using
ActiveRecord::Base.connected? we ensure we don't get this error if
the connection is missing, which is the all point of the
Gitlab::CurrentSettings#connect_to_db? method!
2016-01-26 15:11:15 +01:00
Douglas Barbosa Alexandre b58a2e30b2 Wrap errors on GitHub importer to raise Projects::ImportService::Error 2016-01-26 10:56:22 -02:00
Douglas Barbosa Alexandre c040323419 Move Gitlab::BitbucketImport::KeyDeleter to it's own importer 2016-01-26 10:56:22 -02:00
Yorick Peterse b74308c0a7 Correct arity for instrumented methods w/o args
This ensures that an instrumented method that doesn't take arguments
reports an arity of 0, instead of -1.

If Ruby had a proper method for finding out the required arguments of a
method (e.g. Method#required_arguments) this would not have been an
issue. Sadly the only two methods we have are Method#parameters and
Method#arity, and both are equally painful to use.

Fixes gitlab-org/gitlab-ce#12450
2016-01-25 21:28:59 +01:00
Rémy Coutable cd22da3ebd Fix preventing migration from crashing in very specific cases
See https://gitlab.com/gitlab-org/gitlab-ce/issues/12606 for details
2016-01-25 20:00:59 +01:00
Benedict Etzel 6435f78a8c Whitelist raw "abbr" elements when parsing Markdown
Closes #12517
2016-01-23 20:38:06 +01:00
Valery Sizov be7bc9d9b0 Backport some changes from EE 2016-01-22 11:24:44 +02:00
Robert Speicher 2fed8bf390 Merge branch 'fix-diff-comments' into 'master'
More highlighted diff fixes

See merge request !2545
2016-01-22 07:37:47 +00:00
Robert Speicher 9a5f83a30a Merge branch 'unescaped-diffs' into 'master'
Make sure non-highlighted diffs are still escaped

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

See merge request !2544
2016-01-22 01:35:39 +00:00
Douwe Maan 3db24ec9e8 Properly highlight right side of parallel diff 2016-01-22 02:12:43 +01:00
Douwe Maan 16d17b78ca Restore diff comments 2016-01-22 02:10:58 +01:00
Douwe Maan 82d0fa8e45 Fix 2016-01-22 01:53:01 +01:00
Douwe Maan 150b4f66e6 Make sure non-highlighted diffs are still escaped 2016-01-22 01:47:17 +01:00
Robert Speicher 3f5e6c6cf6 Merge branch 'ci/recursive-artifacts-entries' into 'master'
Add method to calculate total size of artifacts in subpath

See merge request !2500
2016-01-21 23:23:02 +00:00
Robert Speicher 0bf68c0cd5 Merge branch 'workhorse-path' into 'master'
Init script changes for gitlab-workhorse in 8.4

Goes with https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/31

Also bumps gitlab-workhorse to 0.6.1.

[ci skip]

See merge request !2529
2016-01-21 16:07:21 +00:00
Douglas Barbosa Alexandre 4861b1bbfb Fix import of GitHub's wiki when the repository has not been created 2016-01-21 13:11:38 -02:00
Jacob Vosmaer 693fa7a458 Init script changes for gitlab-workhorse in 8.4 2016-01-21 13:36:55 +01:00
Douwe Maan 54729d2c28 Merge branch 'ci/cache-key' into 'master'
Added cache:key to .gitlab-ci.yml allowing to fine tune the caching

The `cache:key` allows you to define the affinity mask of caching, allowing to have single cache for all jobs, or cache per-job, or per-branch, or any other way you would need:

1. Cache per-build for all branches:

```
cache:
    key: "$CI_BUILD_NAME"
    untracked: true
```

2. Cache per-branch for all jobs:

```
cache:
    key: "$CI_BUILD_REF"
    untracked: true
```



/cc @DouweM @grzesiek @axil


See merge request !2436
2016-01-21 11:15:28 +00:00
Kamil Trzcinski c45a6bf3ba Added cache:key to .gitlab-ci.yml allowing to fine tune the caching 2016-01-20 23:12:48 +01:00
Robert Speicher 3e7092a83a Merge branch 'fix-github-pull-requests-import' into 'master'
Fix cross projects detection when importing GitHub pull requests

Fixes #12456

See merge request !2523
2016-01-20 22:11:20 +00:00
Douglas Barbosa Alexandre f4bdbecfd5 Fix cross projects detection when importing GitHub pull requests 2016-01-20 19:36:35 -02:00
Kamil Trzcinski 9b0f57781e Add method that calculates total size for artifacts subfolder 2016-01-20 21:55:13 +01:00
Rubén Dávila 985297d82a Merge branch 'master' into issue_3945 2016-01-20 15:07:00 -05:00
Robert Speicher 1553c560e0 Merge branch 'feature/check-against-rbl-only' into 'master'
Split from !2455

References #9092

See merge request !2515
2016-01-20 14:24:20 -05:00
Douwe Maan 7d347ae564 Merge branch 'master' into issue_3945 2016-01-20 20:04:15 +01:00
Douwe Maan 6000f8545f Validate bounds just to be sure 2016-01-20 19:33:34 +01:00
Douwe Maan 0e992a3b4e Properly highlight lines around '\ No newline at end of file' 2016-01-20 19:20:13 +01:00
Douwe Maan 577f2fb47a Save and use actual diff base commit for MR diff highlighting 2016-01-20 18:44:27 +01:00
Stan Hu a10ab94b06 Gracefully handle invalid UTF-8 sequences in Markdown links
Closes #6077
2016-01-20 07:07:53 -08:00
Tomasz Maczukin 8536e083f7 Add IP blocking against DNSBL at sign-up 2016-01-20 15:28:19 +01:00
Douwe Maan a010db5db2 Properly handle HTML entities with inline diffs 2016-01-20 15:26:44 +01:00
Douwe Maan c23ca0b0b5 Merge branch 'master' into issue_3945 2016-01-20 14:53:41 +01:00
Douwe Maan 701513dcc7 Move parallel diff logic to separate class 2016-01-20 14:53:20 +01:00
Robert Speicher 1f9c360d7b Merge branch 'add_email_headers' into 'master'
Added X-GitLab-... headers to emails from CI and Email On Push services

Fixes #2098

This adds the 'X-GitLab-Project', 'X-GitLab-Project-Id' and
'X-GitLab-Project-Path' headers to emails from CI and Email On Push in a way
that it is done currently for merge requests and issues emails.

Additionally, CI emails will have 'X-GitLab-Build-Status' header with either
'fail' or 'success'.

Emails from Email On Push will include 'X-Gitlab-Author' header containing the
username of user who did the push.

See merge request !2159
2016-01-19 21:23:54 +00:00
Robert Speicher b9fca47854 Merge branch 'user-ldap-email' into 'master'
Allow LDAP users to change their email if it was not set by the LDAP
server

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

See merge request !2502
2016-01-19 19:15:23 +00:00
Anton Baklanov 84124380e8 Added X-GitLab-... headers to emails from CI and Email On Push services
Fixes #2098
2016-01-19 20:18:39 +02:00
Douwe Maan 98e1a5b634 Allow LDAP users to change their email if it was not set by the LDAP server 2016-01-19 16:25:38 +01:00
Josh Frye 11797df1af Change 'public' flag to more robust 'visibility' query. 2016-01-19 09:57:00 -05:00
Josh Frye 10669097fa Add public params to GET /projects api. Closes #3788 2016-01-19 09:57:00 -05:00
Douwe Maan 5c7259c7c3 Don't crash when file can't be highlighted 2016-01-19 15:13:37 +01:00
Douwe Maan 512bebe21d Refactor Gitlab::Highlight and fix tests 2016-01-19 14:52:41 +01:00
Douwe Maan 0a8039eb77 Remove useless assignments 2016-01-19 13:56:36 +01:00