Commit Graph

5752 Commits

Author SHA1 Message Date
Nick Thomas 0276b8682e Merge branch 'restore-hipchat' into 'master'
Revert "Remove HipChat integration from GitLab"

Closes #60042

See merge request gitlab-org/gitlab-ce!27172
2019-04-11 12:32:56 +00:00
Rémy Coutable 51119395e6 Merge branch 'revert-24704-download-repository-path' into 'master'
Revert "Merge branch '24704-download-repository-path' into 'master'"

See merge request gitlab-org/gitlab-ce!27249
2019-04-11 10:01:52 +00:00
Patrick Bajao 171818df0a Revert "Merge branch '24704-download-repository-path' into 'master'"
This reverts commit 6c75bd015c, reversing
changes made to 1be7f5aaa3.
2019-04-11 15:49:53 +08:00
Sean McGivern dd019c2e0b Merge branch 'jc-guard-against-empty-dereferenced_target' into 'master'
Guard against nil dereferenced_target

Closes #60076

See merge request gitlab-org/gitlab-ce!27192
2019-04-11 07:45:48 +00:00
Thong Kuah d119d3d1b2 Align UrlValidator to validate_url gem implementation.
Renamed UrlValidator to AddressableUrlValidator to avoid 'url:' naming collision with ActiveModel::Validations::UrlValidator in 'validates' statement.
Make use of the options attribute of the parent class ActiveModel::EachValidator.
Add more options: allow_nil, allow_blank, message.
Renamed 'protocols' option to 'schemes' to match the option naming from UrlValidator.
2019-04-11 06:29:07 +00:00
Tim Zallmann c57529556c Revert "Merge branch 'tz-reorganise-digests-json' into 'master'"
Reverts the loading of emojis and its images to move forward with RC
2019-04-10 11:49:06 -07:00
John Cai 674b926ef4 Guard against nil dereferenced_target 2019-04-10 11:39:36 -07:00
Sean McGivern cd9ae6bb82 Revert "Remove HipChat integration from GitLab"
This reverts commit a5378665a1.
2019-04-10 12:58:18 +01:00
Douwe Maan e861af409d Merge branch '47327-fix-github-project-import-visibility' into 'master'
Fix GitHub project import visibility

See merge request gitlab-org/gitlab-ce!27133
2019-04-10 09:10:37 +00:00
Dylan Griffith c239bfcb17 Add more info logging to cluster apps
Log events so that it's easy to see
when different requests are starting.
2019-04-10 06:38:27 +00:00
Daniel Wyatt 15e2b5ad0b Address style review comment 2019-04-09 11:51:16 -04:00
Imre Farkas 9bc5ed14fe Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-09 15:38:58 +00:00
Nick Thomas a6218f1bcd Merge branch 'osw-multi-assignees-merge-requests' into 'master'
[Backport] Support multiple assignees for merge requests

See merge request gitlab-org/gitlab-ce!27089
2019-04-09 15:19:36 +00:00
Nick Thomas d95889b8a4 Merge branch '43263-git-push-option-to-create-mr' into 'master'
Git push options to create a merge request, set target_branch and set merge when pipeline succeeds

Closes #53198 and #43263

See merge request gitlab-org/gitlab-ce!26752
2019-04-09 12:53:07 +00:00
Daniel Wyatt cf804218c9 Add test for github project import to user namespace. 2019-04-09 07:08:59 -04:00
Yorick Peterse 7e22054a36 Merge branch 'osw-schedule-multiple-mr-assignees-ff-auto-enabling' into 'master'
Add methods to check dead and retrying jobs

See merge request gitlab-org/gitlab-ce!27149
2019-04-09 10:17:40 +00:00
Sanad Liaquat 0991dc8c82 Reduce number of rspec retries
In both e2e QA tests and unit tests, reduce the number of retires
to 2 (i.e., 1 initial and one retry)
2019-04-09 10:04:03 +00:00
Wolphin 0a4f44de83 Add environment url validation 2019-04-09 09:28:55 +00:00
Jason Goodman 5b7003282b Set release name when adding release notes to an existing tag
Also set the release sha and author
2019-04-09 06:52:15 +00:00
Oswaldo Ferreira 285fcb4744 Add methods to check dead and retrying jobs
It adds two methods for checking if a background job
(for a given class) has dead or retrying jobs.
2019-04-08 19:47:36 -03:00
Luke Duncalfe 1883e320ea Use Gitlab::PushOptions for `ci.skip` push option
Previously the raw push option Array was sent to Pipeline::Chain::Skip.

This commit updates this class (and the chain of classes that pass the
push option parameters from the API internal `post_receive` endpoint to
that class) to treat push options as a Hash of options parsed by
GitLab::PushOptions.

The GitLab::PushOptions class takes options like this:

    -o ci.skip -o merge_request.create -o merge_request.target=branch

and turns them into a Hash like this:

    {
      ci: {
        skip: true
      },
      merge_request: {
        create: true,
        target: 'branch'
      }
    }

This now how Pipeline::Chain::Skip is determining if the `ci.skip` push
option was used.
2019-04-09 10:03:26 +12:00
Oswaldo Ferreira ca884980ee [CE] Support multiple assignees for merge requests
Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161
(code out of ee/ folder).
2019-04-08 18:40:00 -03:00
Luke Duncalfe aa352a95df Support merge request create with push options
To create a new merge request:

  git push -u origin -o merge_request.create

To create a new merge request setting target branch:

  git push -u origin -o merge_request.create \
    -o merge_request.target=123

To update an existing merge request with a new target branch:

  git push -u origin -o merge_request.target=123

A new Gitlab::PushOptions class handles parsing and validating the push
options array. This can be the start of the standard of GitLab accepting
push options that follow namespacing rules. Rules are discussed in issue
https://gitlab.com/gitlab-org/gitlab-ce/issues/43263.

E.g. these push options:

  -o merge_request.create -o merge_request.target=123

Become parsed as:

  {
    merge_request: {
      create: true,
      target: '123',
    }
  }

And are fetched with the class via:

  push_options.get(:merge_request)
  push_options.get(:merge_request, :create)
  push_options.get(:merge_request, :target)

A new MergeRequests::PushOptionsHandlerService takes the `merge_request`
namespaced push options and handles creating and updating
merge requests.

Any errors encountered are passed to the existing `output` Hash in
Api::Internal's `post_receive` endpoint, and passed to gitlab-shell
where they're output to the user.

Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/43263
2019-04-09 09:36:42 +12:00
Michael Kozono b22a725a0c Merge branch 'sh-fix-issue-59985' into 'master'
Fix stage index migration failing in PostgreSQL 10

Closes #59985

See merge request gitlab-org/gitlab-ce!26972
2019-04-08 20:11:46 +00:00
Daniel Wyatt 26fdcf7b61 Fix GitHub project import visibility 2019-04-08 11:39:57 -04:00
Kamil Trzciński f3ad51f8a5 Improve performance of PR import
This removes unneeded `.reload` call which
makes AR to load ALL objects, and create its
in-memory representation.
2019-04-08 15:45:06 +02:00
Stan Hu d7c1bed80d GitHub import: Run housekeeping after initial import
After an initial fetch, the repository will have many loose objects
and refs. Running a `git gc` will compact refs into `packed-refs` and
objects into `.pack` files, which should make importing pull
requests faster.

Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/59477
2019-04-07 06:56:49 -07:00
Chris Baumbauer b77fe7db3e Add Knative metrics to Prometheus 2019-04-06 02:02:39 +00:00
Douglas Barbosa Alexandre fcc771ba81 Merge branch 'sh-fix-realtime-changes-with-reserved-words' into 'master'
Fix real-time updates for projects that contain a reserved word

Closes #60113

See merge request gitlab-org/gitlab-ce!27060
2019-04-05 21:25:58 +00:00
Douglas Barbosa Alexandre d642cb18b4 Merge branch 'ce-10546-fix-epic-depth-validation' into 'master'
[CE-port] Fix Epic depth validation

See merge request gitlab-org/gitlab-ce!26390
2019-04-05 21:11:47 +00:00
Mayra Cabrera 135b78bb25 Revert "Merge branch 'bump_kubernetes_1_11_9' into 'master'"
This reverts merge request !26991
2019-04-05 20:22:50 +00:00
Stan Hu da0c9b0056
Fix real-time updates for projects that contain a reserved word
Projects that included reserved words (e.g. test-create) would fail to
generate a proper ETag key because of the name. To fix this, we add
forward slashes to match the exact name so that /test-create doesn't get
matched, but /create does.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/60113
2019-04-05 11:59:20 -07:00
Andreas Brandl 0cf23a7f50 Merge branch 'revert-3962b00b' into 'master'
Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"

See merge request gitlab-org/gitlab-ce!27051
2019-04-05 14:28:34 +00:00
Sean McGivern e32c82ed1e Revert "Merge branch 'require-all-templates-to-include-default-stages' into 'master'"
This reverts merge request !26954
2019-04-05 13:18:35 +00:00
Andreas Brandl 46b1b9c1d6 Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"
This reverts merge request !26823
2019-04-05 13:02:56 +00:00
Imre Farkas d9d7237d2e Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-05 11:45:47 +00:00
Bob Van Landuyt 2fdda74458 Fall back to project repository type by default
This makes sure that we always have a repository type when trying to
parse a repository from a path.

This is needed because sometimes we want to perform access checks as
if the project already existed, for example when creating a project on
push.

Before this we were only doing that when accessing git over http, this
makes sure it also works correctly when accessing git over SSH
2019-04-05 10:51:42 +00:00
Sean McGivern 39eb16aab2 Merge branch 'require-all-templates-to-include-default-stages' into 'master'
Require all templates to use default stages

Closes #59992

See merge request gitlab-org/gitlab-ce!26954
2019-04-05 10:18:10 +00:00
Douwe Maan a827092b65 Merge branch 'bump_kubernetes_1_11_9' into 'master'
Bump Helm to 2.13.1 and kubectl to 1.11.9

See merge request gitlab-org/gitlab-ce!26991
2019-04-05 09:43:46 +00:00
Thong Kuah 4ec16912b8 Autocorrect with RSpec/ExampleWording cop
- rewords examples starting with 'should'
- rewords examples starting with 'it'

Note: I had to manually fixup "onlies" to "only"
2019-04-05 08:43:27 +00:00
Kamil Trzciński e0df05cfbc Require all templates to use default stages
Our templates are free to override the 'stages:'.
However, they should follow the convention to always include
'build', 'test', 'deploy' which are defaults when not defined.
2019-04-05 10:13:49 +02:00
Reuben Pereira 7f529353e7 Add a proxy method to PrometheusClient
- Also refactor the get and json_api_get methods so that the get method
can be reused by the new proxy method.
- The new proxy method makes no changes to the request to the prometheus
server and response from the prometheus server. This allows it to be
used as a proxy to the Prometheus server, hence the name.
2019-04-05 08:05:54 +00:00
Grzegorz Bizon ff64887964 Merge branch '54506-show-error-when-namespace-svc-missing' into 'master'
Show error when namespace/svc account missing

Closes #54506

See merge request gitlab-org/gitlab-ce!26362
2019-04-05 07:05:32 +00:00
Paul 🐻 9f36097db2 fix(gitlab-ci-config): allow strings in the 'include' keyword
This fix is a followup to !24098 which introduced a validation of the
`include:` keyword of a gitlab-ci configuration file when triggered
from /ci/lint API calls.

However, there was a test case missing: the case of a single string as
value. I have added a test case for that which shows that the code was
not validating it correctly.

This commit fixes that to allow all `include:` valid inputs.
2019-04-05 06:44:33 +00:00
Heinrich Lee Yu b752b579e9 Adds max_descendants_depth to ObjectHierarchy
CE-port of 10546-fix-epic-depth-validation
2019-04-05 07:56:21 +08:00
Francisco Javier López 8a134f4c65 Renamed terminal_specification to channel_specification
We're moving from using terminology related to terminals when
we refer to Websockets connections in Workhorse.
It's more appropiate a concept like channel.
2019-04-04 18:32:02 +00:00
Nick Thomas a2d044bf97 Merge branch '57831-allow-graphql-scalar-fields-to-be-authorized' into 'master'
Allow GraphQL Scalar-fields to be authorized

Closes #57831

See merge request gitlab-org/gitlab-ce!26338
2019-04-04 17:12:43 +00:00
Peter Leitzen 552d38861a Automatically set Prometheus step interval
By computing the step interval passed to the query_range Prometheus API
call we improve the performance on the Prometheus server and GitLab by
reducing the amount of data points sent back and prevent Prometheus
from sending errors when requesting longer intervals.
2019-04-04 15:38:37 +00:00
Kamil Trzciński 8a833c720e Allow to use untrusted Regexp via feature flag
This brings support for untrusted regexp for 'only:refs:' when
enabled via feature flag: alllow_unsafe_ruby_regexp.

This is by default disabled, and should not be used in production
2019-04-04 15:00:56 +00:00
Brett Walker 6643b92b88 Use parent object when authorizing scalar types 2019-04-04 09:03:21 -05:00