Commit Graph

15302 Commits

Author SHA1 Message Date
Robert Speicher e036cb04a2 Merge branch 'remaining-lib-differences' into 'master'
Resolve remaining CE to EE differences in lib/

See merge request gitlab-org/gitlab-ce!26608
2019-04-03 12:27:55 +00:00
Francisco Javier López 6ee1d8cf77 Add port section to CI Image object
In order to implement https://gitlab.com/gitlab-org/gitlab-ee/issues/10179
we need several modifications on the CI config file. We are
adding a new ports section in the default Image object.

Each of these ports will accept: number, protocol and name.

By default this new configuration will be only enabled in
the Web IDE config file.
2019-04-03 09:50:54 +00:00
Dmitriy Zaporozhets 478077747d Merge branch '47234-composable-auto-devops' into 'master'
Resolve "Composable Auto DevOps"

Closes #47234

See merge request gitlab-org/gitlab-ce!26520
2019-04-03 09:05:28 +00:00
Jan Provaznik 0c45e268a1 Revert "Merge branch 'jprovazn-graphql-prometheus' into 'master'"
This reverts merge request !26569
2019-04-02 20:05:56 +00:00
Jacob Vosmaer 35b9274f12 Stop calling UnlinkRepositoryFromObjectPool RPC
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/59777.

In earlier iterations of our implementation of Git object deduplication
we thought we would be making extensive use of Git remotes in pool
repositories in the future, and that we should manage these remotes
carefully from the start. We now expect we only care about one remote,
namely the source project. The other remotes are there only for forensic
purposes.

Before this MR we tried to also remove pool remotes when member projects
got deleted, with the UnlinkRepositoryFromObjectPool RPC. This is
fragile when there are race conditions (see
https://gitlab.com/gitlab-org/gitaly/issues/1568#note_153955926). We
have spent some time making this RPC less fragile in
https://gitlab.com/gitlab-org/gitaly/merge_requests/1151 but looking at
this problem again, I think we should just stop calling it.
2019-04-02 13:20:26 +00:00
Yorick Peterse 1f4bc814ab
Backport EE changes to gitlab:env:info
This backports EE specific changes for the Rake task `gitlab:env:info`,
wrapping them in a conditional. There is no way to inject code in the
middle of a Rake task in EE, so unfortunately this is the best we can
do.
2019-04-02 14:57:44 +02:00
Robert Speicher 4b9dbec33c Merge branch 'jarv/dev-to-gitlab-2019-04-02' into 'master'
Jarv/dev to gitlab 2019 04 02

Closes #2810

See merge request gitlab-org/gitlab-ce!26846
2019-04-02 12:56:40 +00:00
Jan Provaznik 0e66357a3e Monitor GraphQL with Prometheus
Extends graphql's platform tracing class to observe duration
of graphql methods.

In graphql 1.8.11 is added prometheus class but it's not very useful
for us because it uses prometheus_exporter to export results.
2019-04-02 10:26:53 +00:00
Sean McGivern d7583addf2 Merge branch 'sh-fix-rugged-tree-entries' into 'master'
Avoid excessive recursive calls with Rugged TreeEntries

Closes #59759

See merge request gitlab-org/gitlab-ce!26813
2019-04-02 09:27:17 +00:00
Sean McGivern f87b7fe3b3 Merge branch 'issue_51789_part_1' into 'master'
Migrate issuable states to integer patch 1 of 2

Closes #51789

See merge request gitlab-org/gitlab-ce!25107
2019-04-02 08:39:53 +00:00
John Jarvis 69b65a6b74 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into jarv/dev-to-gitlab-2019-04-02 2019-04-02 10:12:32 +02:00
Jan Provaznik a466d97e62 Rake task for removing exif from uploads
Adds a rake task which can be used for removing EXIF
data from existing uploads.
2019-04-02 07:48:35 +00:00
GitLab Release Tools Bot b122be5ed5 Merge branch 'security-id-potential-denial-languages' into 'master'
Return cached languages if they've been detected before

See merge request gitlab/gitlabhq!2998
2019-04-02 07:48:28 +00:00
GitLab Release Tools Bot 3098259e90 Merge branch 'security-use-untrusted-regexp' into 'master'
Use UntrustedRegexp for CI refs matching

See merge request gitlab/gitlabhq!3005
2019-04-02 07:48:24 +00:00
Kamil Trzciński 1b6fe3ae22 Merge branch 'kube_helm_auto_devops_213' into 'master'
Bump Kubectl and Helm in Auto-DevOps.gitlab-ci.yml

See merge request gitlab-org/gitlab-ce!26534
2019-04-02 07:21:26 +00:00
Tiger 343e834330 Add required variables to Jobs/Build.gitlab-ci.yml 2019-04-02 13:32:00 +11:00
Tiger 3be46bdf08 Split Security Auto DevOps jobs into templates
Container Scanning, Dependency Scanning, License Management
and SAST parts of Auto DevOps now use the preexisting templates.

Auto DevOps and the DAST job template will now use a
shared job template instead of maintaining two copies
of the job. This also allows Auto DevOps to use custom
authentication with DAST.
2019-04-02 13:31:26 +11:00
Tiger ec5e032a12 Split non-security Auto-DevOps jobs into templates
This allows these templates to be used outside of Auto DevOps,
or easily excluded from Auto DevOps.

The security jobs in Auto DevOps differ slightly from the ones
that are already available as templates, they will be moved
next.
2019-04-02 13:29:43 +11:00
Wei-Meng Lee cfc6d2528c Fix attempting to drop views in PostgreSQL 2019-04-02 00:19:22 +00:00
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
Felipe Artur f2b7da4bf5 Remove additional logging 2019-04-01 15:05:52 -03: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
Douglas Barbosa Alexandre a027205699 Merge branch 'fix-container-scanning-on-k8s' into 'master'
Fix Container Scanning for Kubernetes Runners

Closes gitlab-ee#5763 and gitlab-ee#6636

See merge request gitlab-org/gitlab-ce!26793
2019-04-01 17:09:15 +00:00
Mayra Cabrera b5e09a26de Include cluster domain into Project Cluster API
Domain was introduced on 11.8 and was not included on the
Project Cluster API. With this change user will be able to include
domain when adding and updating a cluster. Domain will also be included
on the GET calls.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59441
2019-04-01 16:29:05 +00:00
Lin Jen-Shin 700e8d1917 Merge branch 'enable-rubocop-application-record' into 'master'
Document ApplicationRecord / pluck_primary_key

Closes #59690

See merge request gitlab-org/gitlab-ce!26764
2019-04-01 15:55:46 +00:00
Thong Kuah 3bc946ade3 Bump Kubectl and Helm in Auto-DevOps.gitlab-ci.yml 2019-04-01 23:38:40 +13:00
Stan Hu 8686e01250 Avoid excessive recursive calls with Rugged TreeEntries
The Rugged implementation was recursively scanning the repository to
create `flat_path` because the post-process step was being called from
with a loop. For large repositories, this was significantly slowing
things down. Break the call to `rugged_populate_flat_path` out of this
loop to make this work efficiently.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59759
2019-03-31 22:14:19 -07: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
Stan Hu cedbb3366b Fix API /project/:id/branches not returning correct merge status
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24034 introduced
a regression where only the first 20 branches were used to determine
whether a branch has been merged because the pagination was applied
incorrectly. Requesting the second page of branches via the API would
always have the wrong merge status. We fix this by properly paginating
the branches before requesting their merge status.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56250
2019-03-30 05:20:29 -07:00
Nick Thomas 98a5976b78
Document ApplicationRecord / pluck_primary_key
We also enable the rubocop that makes it mandatory
2019-03-29 20:54:06 +00:00
Reuben Pereira c558d72b5b Handle missing keys in sentry api response
- Do not raise error when there are missing non-essential keys in sentry
api response.
- Add specs for to check for missing keys behavior.
2019-03-29 14:53:40 +00: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
Sean McGivern 7ae35d0a78 Merge branch '10735-geo-gitlab-revision-can-return-not-consistent-results' into 'master'
Use a fixed git abbrev parameter when we fetch a git revision

See merge request gitlab-org/gitlab-ce!26707
2019-03-29 09:44:35 +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
Felipe Artur b2fb3a9c62 Address review comments 2019-03-28 11:31:14 -03:00
Valery Sizov cc2e849afd Use a fixed git abbrev parameter when we fetch a git revision 2019-03-28 15:24:56 +02: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
Felipe Artur 16a3fea399 Merge master 2019-03-27 15:19:12 -03: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