Commit Graph

8964 Commits

Author SHA1 Message Date
Bob Van Landuyt 8c5b3d0302 Allow streaming io objects into Gitaly
This allows us to set the encoding of an IO passed without reading it
into memory.

This is useful if we want to stream files into Gitaly. Like we do when
uploading a new file to the repository.
2019-04-01 20:17:40 +02:00
Douglas Barbosa Alexandre 63cd518f66 Merge branch 'jc-remove-find-all-tags-ff' into 'master'
Remove find all tags feature flag

See merge request gitlab-org/gitlab-ce!26746
2019-04-01 18:00:23 +00:00
Philippe Lafoucrière 6a25f8bc79
Fix Container Scanning for Kubernetes Runners
closes https://gitlab.com/gitlab-org/gitlab-ee/issues/6636
closes https://gitlab.com/gitlab-org/gitlab-ee/issues/5763
2019-03-31 08:58:01 -04:00
Sean McGivern bf48b071f9 Merge branch '50199-quick-actions-refactor' into 'master'
Extend quick actions dsl

Closes #50199

See merge request gitlab-org/gitlab-ce!26095
2019-03-29 14:48:01 +00:00
Stan Hu a9d9907a8e Merge branch '59462-applicatonsettings-not-tolerant-of-missing-db-columns' into 'master'
Use a Gitlab::FakeApplicationSettings when migrations are pending

Closes #59462

See merge request gitlab-org/gitlab-ce!26601
2019-03-29 13:13:10 +00:00
Alexandru Croitor 4b9ff4d2fe Extend quick actions dsl
* Extend quick actions dsl to allow specifying model types
to which given quick action applies
* Rename issuable attribute to noteable in interpret_service.rb
* Refactor and reorder quick action specs
* Create a shared example spec for each quick action to be used for
issue, merge request and commit specs.

https://gitlab.com/gitlab-org/gitlab-ce/issues/50199
2019-03-29 12:53:28 +02:00
Kamil Trzciński 0d26c48332 Merge branch 'persist-fulll-ref-path-for-mr-pipelines' into 'master'
Use merge request HEAD ref for detached merge request pipelines

Closes #58454

See merge request gitlab-org/gitlab-ce!25504
2019-03-29 10:46:02 +00:00
Kamil Trzciński a7cf61355a Merge branch 'sh-fix-gitaly-find-commit-caching' into 'master'
Allow ref name caching CommitService#find_commit

Closes #57083

See merge request gitlab-org/gitlab-ce!26248
2019-03-29 10:31:57 +00:00
Shinya Maeda bf639fd504 Create detached merge request pipelines
By using `refs/merge-requests/:iid/head`

ok

ok

Improve naming nicely

Add nice tests

add nice tests

fix some more

revert
2019-03-29 13:58:45 +07:00
John Cai daa807d5e2 Remove find all tags feature flag 2019-03-28 12:45:35 -07:00
Igor db68003e8b Memoize old_blob and new_blob to improve performance 2019-03-28 12:11:37 +00:00
Dylan Griffith 3c25ec8827 Fix Auto DevOps missing domain error handling
For some reason this value can be an empty string and we want to ensure
that we correctly fail the job before a deploy. This is particularly
problematic at the moment when coupled with
https://gitlab.com/gitlab-org/gitlab-ce/issues/54760 as the user has no
easy way to recover without destroying the cluster and starting over.
2019-03-28 14:00:38 +11:00
Stan Hu 7a2325e43c Guard against nested allows with ref name caching
This avoids the case:

```
allow_ref_name_caching do
  allow_ref_name_caching do
    # using-feature
  end
end
```
2019-03-27 18:17:25 -05:00
Douglas Barbosa Alexandre 04431d5e61 Merge branch 'sh-add-gitaly-duration-logs' into 'master'
Log Gitaly RPC duration to api_json.log and production_json.log

See merge request gitlab-org/gitlab-ce!26652
2019-03-27 20:58:43 +00:00
Stan Hu db759c5d9c Allow ref name caching CommitService#find_commit
For a given merge request, it's quite common to see duplicate FindCommit
Gitaly requests because the Gitaly CommitService caches the request by
the commit SHA, not by the ref name. However, most of the duplicate
requests use the ref name, so the cache is never actually used in
practice. This leads to unnecessary requests that slow performance.

This commit allows certain callers to bypass the ref name to
OID conversion in the cache. We don't do this by default because it's
possible the tip of the branch changes during the commit, which
would cause the caller to get stale data.

This commit also forces the Ci::Pipeline to use the full ref name
so that caching can work for merge requests.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/57083
2019-03-27 14:46:39 -05:00
Andreas Brandl f5ba7ac357 Merge branch 'osw-multi-line-suggestions-creation-strategy' into 'master'
Prepares suggestion implementation for multi-line support

See merge request gitlab-org/gitlab-ce!26057
2019-03-27 16:57:25 +00:00
Oswaldo Ferreira 03e0604d5d Prepare suggestion implementation for multi-line
Adds the groundwork needed in order to persist multi-line suggestions,
while providing the parsing strategy which will be reused for the
**Preview** as well.
2019-03-27 12:26:53 -03:00
Stan Hu 74ff33a3fd Log Gitaly RPC duration to api_json.log and production_json.log
This makes it easier to debug Gitaly performance issues in the field.

This commit also makes the tracking of query time thread-safe via
RequestStore.
2019-03-27 06:01:21 -05:00
James Lopez 82da4b1fd4 Merge branch 'bvl-allow-more-repos-per-resource-ce' into 'master'
Allow multiple repositories per project

See merge request gitlab-org/gitlab-ce!26539
2019-03-27 07:37:06 +00:00
Dmitriy Zaporozhets 535bd5743f Merge branch '48132-display-output-from-pre-receive-scripts' into 'master'
Allow custom hooks errors to appear in GitLab UI

Closes #48132

See merge request gitlab-org/gitlab-ce!25625
2019-03-26 22:33:25 +00:00
Rémy Coutable 90718774e1
Use a Gitlab::FakeApplicationSettings when migrations are pending
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-03-26 23:02:57 +01:00
Douglas Barbosa Alexandre 1901094265 Merge branch 'osw-multi-assignees-merge-requests-migration' into 'master'
Add multiple MR assignees migration and background table population

See merge request gitlab-org/gitlab-ce!26496
2019-03-26 18:00:46 +00:00
Kamil Trzciński 7fbfb1998a Force to recreate all diffs on import
If for whatever reason we fail to import MR data,
subsequent run will fail as we try to insert duplicate data.
Instead of trying to recover, lets delete all and retry again.
2019-03-26 12:25:25 +00:00
Bob Van Landuyt d36415b754 Allow multiple repositories per project
This changes the repository type from a binary `wiki?` to a type. So
we can have more than 2 repository types.

Now everywhere we called `.wiki?` and expected a boolean, we check
that type.
2019-03-26 13:21:03 +01:00
Sean McGivern 2ce68fd3a5 Merge branch '58805-allow-incomplete-commit-data-to-be-fetched-from-collection' into 'master'
Enrich commits with full data in CommitCollection

Closes #58805

See merge request gitlab-org/gitlab-ce!26445
2019-03-26 09:22:14 +00:00
Luke Duncalfe f82380b9df Allow custom hooks errors to appear in GitLab UI
Error messages from custom pre-receive hooks now appear in the GitLab
UI.

This is re-enabling a feature that had been disabled in merge request
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18646

The feature had been disabled due to security concerns that information
which was not intended to be public (like stack traces) would leak into
public view.

PreReceiveErrors (from pre-receive, post-receive and update custom
hooks) are now filtered for messages that have been prefixed in a
particular way.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/48132
2019-03-26 13:05:40 +13:00
Oswaldo Ferreira 929ee4d18d Add multiple assignees migration and table population
This will be further required for supporting multi-assignees MRs
2019-03-25 19:50:40 -03:00
Mike Greiling cfe607632c Apply suggestion to lib/gitlab/danger/helper.rb 2019-03-25 21:16:43 +00:00
Mike Greiling 8edad869d6
Update frontend-specific files in reviewer roulette 2019-03-25 13:31:52 -05:00
Douwe Maan 13cd7cd76f Merge branch 'ce-1974-update-user-name-upon-ldap-sync' into 'master'
Backport 'Update user name upon LDAP sync' from EE

See merge request gitlab-org/gitlab-ce!26432
2019-03-25 16:02:05 +00:00
Mike Greiling 722ac2c9ae Merge branch 'winh-eslint-config-danger' into 'master'
Mark .eslintrc.yml as frontend change for Danger

See merge request gitlab-org/gitlab-ce!26549
2019-03-25 15:05:56 +00:00
Douglas Barbosa Alexandre 75e1682c40 Merge branch 'sh-fix-github-import-creator' into 'master'
GitHub importer: Use the project creator to create branches from forks

Closes #59396

See merge request gitlab-org/gitlab-ce!26510
2019-03-25 13:34:41 +00:00
Winnie Hellmann ec33bc71e9 Mark .eslintrc.yml as frontend change for Danger 2019-03-25 13:10:01 +00:00
Rémy Coutable 45da7dd306
Backport 'Update user name upon LDAP sync' from EE
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-03-25 11:16:01 +01:00
Logan King 0cd7ebf717 Add error tracking usage counts 2019-03-25 07:42:08 +00:00
Stan Hu d0336ae88f GitHub importer: Use the project creator to create branches from forks
The project owner may actually be a group, in which case the branch
creation would fail due to a lack of username.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59396
2019-03-23 07:29:35 -07:00
Kamil Trzciński 98194f1766 Set proper default-branch on GitHub Import 2019-03-22 18:40:50 +00:00
Thiago Presa 538741f230 Add highest_role method to User 2019-03-22 09:54:03 +00:00
Stan Hu 21a8079a01 Merge branch 'da-capitalize-db-apapter-name-on-rails-console' into 'master'
Display the database adapter name in a human-friendly way

See merge request gitlab-org/gitlab-ce!26437
2019-03-22 03:56:01 +00:00
Douglas Barbosa Alexandre a86f48c79b
Add helper method to return a human-friendly name for database adapter 2019-03-21 19:03:26 -03:00
Luke Duncalfe 38bf176c3c Enrich commits with full data in CommitCollection
Allow incomplete commit records to load their full data from gitaly.

Commits can be based on a Hash of data retrieved from PostgreSQL, and
this data can be intentionally incomplete in order to save space.

A new method #gitaly? has been added to Gitlab::Git::Commit, which
returns true if the underlying data source of the Commit is a
Gitaly::GitCommit.

CommitCollection now has a method #enrich which replaces non-gitaly
commits in place with commits from gitaly.

CommitCollection#without_merge_commits has been updated to call this
method, as in order to determine a merge commit we need to have parent
data.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/58805
2019-03-22 10:26:15 +13:00
Douwe Maan 7d3c5d882c Merge branch '59147-duplicate-match-line' into 'master'
Fix duplicated bottom match line

Closes #59147

See merge request gitlab-org/gitlab-ce!26402
2019-03-21 16:43:54 +00:00
Nick Thomas 1bc4ee3f9a Merge branch '10514-fix-non-existing-authorized-keys-file' into 'master'
Handle cases when authorized_keys doesn't exist

See merge request gitlab-org/gitlab-ce!26347
2019-03-21 16:34:32 +00:00
Mark Chao 8723f29255 Fix diff bottom expand button appears twice
This is a quick fix by only append match line once
when calling diff_lines_for_serializer multiple time.

Also enable feature by default
2019-03-21 23:08:29 +08:00
Douwe Maan b36fc6d51d Merge branch '59289-fix-push-to-create-protected-branches' into 'master'
Allow users to create protected branches via CLI

Closes #59289

See merge request gitlab-org/gitlab-ce!26413
2019-03-21 14:48:40 +00:00
Patrick Bajao 438485ef88 Allow users to create protected branches via CLI
This is for fixing a regression introduced by:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24969

This fix will allow users who are allowed to push to protected
branches to create protected branches via CLI as well, just
like before. The checks for protected branch creation won't
need to run.
2019-03-21 19:53:04 +08:00
Sean McGivern a97ec84f05 Revert "Merge branch '58805-allow-incomplete-commit-data-to-be-fetched-from-collection' into 'master'"
This reverts merge request !26144
2019-03-21 10:33:29 +00:00
Grzegorz Bizon a96c79e6b5 Merge branch 'osw-multi-line-suggestions-parsing' into 'master'
Prepare multi-line suggestions for rendering in Markdown

See merge request gitlab-org/gitlab-ce!26107
2019-03-21 10:18:08 +00:00
Douwe Maan d141b87496 Merge branch 'ce-1974-update-user-name-upon-ldap-sync' into 'master'
Handle nil name in Gitlab::Auth::LDAP::Person#name

See merge request gitlab-org/gitlab-ce!26364
2019-03-21 10:10:44 +00:00
Sean McGivern 1efa960444 Merge branch '58805-allow-incomplete-commit-data-to-be-fetched-from-collection' into 'master'
Enrich commits with full data in CommitCollection

Closes #58805

See merge request gitlab-org/gitlab-ce!26144
2019-03-21 08:42:33 +00:00