Commit Graph

16644 Commits

Author SHA1 Message Date
Patrick Bajao c08191e0d5 Remove the fallback path from gitlab-ce 2019-08-29 16:33:04 +08:00
Grzegorz Bizon 42484f55c1 Merge branch 'mk/simplify-internal-post-receive-messages' into 'master'
Simplify internal post receive messages

Closes #59808

See merge request gitlab-org/gitlab-ce!31640
2019-08-29 07:02:22 +00:00
Stan Hu fc52421b55 Standardize use of `content` parameter in snippets API
There was some confusion over whether `code` or `content` is the right
parameter for snippets. Internally, the database stores
`content`. However:

1. Project snippets use `code`. `code` gets remapped in `content` in
`lib/api/project_snippets.rb`.

2. Personal snippets use `content`.

To unify these APIs, allow an alias of `content` to work for project
snippets.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66673
2019-08-28 22:54:07 -07:00
Stan Hu b31b6764ac Merge branch 'performance-bar-warnings' into 'master'
Add warnings to performance bar response

See merge request gitlab-org/gitlab-ce!31054
2019-08-29 03:54:15 +00:00
Michael Kozono 50342028aa
Simplify internal post receive messages
Instead of sending varied data to Gitaly, and making Gitaly construct
various messages, build the messages first and have Gitaly print
either basic messages or alert messages, in the order they come.

Depends on https://gitlab.com/gitlab-org/gitaly/merge_requests/1410
2019-08-28 15:18:58 -07:00
Jacob Vosmaer 85d88d67cc Support Gitaly feature flags in workhorse 2019-08-28 16:51:17 +00:00
Andrew Newdigate e369dee8a5 Rename Labkit::Tracing::GRPCInterceptor to GRPC::ClientInterceptor
The original name has been deprecated
2019-08-28 16:29:17 +00:00
Sean McGivern f9c456bd0c Make performance bar enabled checks consistent
Previously, we called the `peek_enabled?` method like so:

    prepend_before_action :set_peek_request_id, if: :peek_enabled?

Now we don't have a `set_peek_request_id` method, so we don't need that
line. However, the `peek_enabled?` part had a side-effect: it would also
populate the request store cache for whether the performance bar was
enabled for the current request or not.

This commit makes that side-effect explicit, and replaces all uses of
`peek_enabled?` with the more explicit
`Gitlab::PerformanceBar.enabled_for_request?`. There is one spec that
still sets `SafeRequestStore[:peek_enabled]` directly, because it is
contrasting behaviour with and without a request store enabled.

The upshot is:

1. We still set the value in one place. We make it more explicit that
   that's what we're doing.
2. Reading that value uses a consistent method so it's easier to find in
   future.
2019-08-28 17:25:02 +01:00
Sean McGivern 9bfb012a56 Add top-level warnings key to performance bar response
This key is useful to reduce the amount of logic needed on the frontend:
if `has_warnings` is true, then the frontend knows that the request in
question has warnings for some metric.
2019-08-28 16:39:33 +01:00
Sean McGivern 23c1cfcc11 Return warnings for performance bar from backend
For each DetailedView subclass, we add a `warnings` array to:

1. The top-level response.
2. Each individual call under the `details` key.

We use the `.thresholds` hash on the DetailedView to determine what's a
warning. If that hash is empty (the default), then the warnings array
will always be empty.
2019-08-28 16:39:33 +01:00
Victor Zagorodny e4fbd94cf5 Update CE files for GSD projects filter
A new param with_security_reports was added to
GET /groups/:id/projects API and the code to
support this logic in GroupProjectsFinder and
Project model. Also, a DB index was added to
ci_job_artifacts table to speed up the search
of security reports artifacts for projects
2019-08-28 14:26:42 +00:00
Patrick Derichs c9b4dc677a Filter out old system notes for epics 2019-08-28 15:04:23 +02:00
Jeremy Jackson 1509768335 Changes snowplow to use cookies for sessions
This also restructures how and where the configuration for
Snowplow lives.
2019-08-28 06:52:14 +00:00
Tiger 9e8daeb8a6 Move generic k8s services out of GCP namespace
These services aren't specific to GCP, and will be used for AWS
as part of https://gitlab.com/gitlab-org/gitlab-ce/issues/46686
2019-08-28 13:54:32 +10:00
Doug Stull fa674fa5e6 Rename dev, org, com helper 2019-08-28 01:29:52 +00:00
Rémy Coutable e17ba8d9e3
Fix a nil error in Gitlab::Danger::Teammate
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-08-27 19:15:19 +02:00
Winnie Hellmann 75353242e2 Replace prepend_entity with prepend_if_ee
(cherry picked from commit 897a9d308db46b620b738b98f2b0e5630ac7d2dd)
2019-08-27 15:11:15 +00:00
Sean McGivern 7f102819a5 Fix Peek on Puma
Peek's `Peek.request_id` method doesn't work well with a multi-threaded
server and concurrent requests, because requests can 'steal' another
request's ID, or unset it before it was due.

The upstream change resolves this; the commit here is just to ensure
that GitLab works with that upstream change, mostly by not using
`Peek.request_id` any more (as the method doesn't exist).
2019-08-27 14:15:25 +01:00
Lin Jen-Shin 7671c592f8 Merge branch '65312-use-group-labels-instead-of-legacy-team-labels-for-danger-picking-test-reviewers' into 'master'
Detect the new stage labels in `Gitlab::Danger::Teammate`

Closes #65312

See merge request gitlab-org/gitlab-ce!32261
2019-08-27 12:57:30 +00:00
Lin Jen-Shin f6d3a47bde Merge branch '13806-fix' into 'master'
Add nil check for Gitlab.config.prometheus

Closes #13806

See merge request gitlab-org/gitlab-ce!32201
2019-08-27 10:45:27 +00:00
Rémy Coutable cfef583e94
Detect the new stage labels in Gitlab::Danger::Teammate
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-08-27 12:16:44 +02:00
Sean McGivern a390f5ff05 Merge branch '57657-promote-label-to-group-label-via-api-endpoint' into 'master'
Promote Label to Group Label via API endpoint

Closes #57657

See merge request gitlab-org/gitlab-ce!25218
2019-08-27 08:53:09 +00:00
Stan Hu 8b47dfae2e Merge branch '63502-encrypt-deploy-token' into 'master'
Resolve "Store deploy tokens encrypted"

Closes #63502

See merge request gitlab-org/gitlab-ce!30679
2019-08-27 04:24:36 +00:00
dodocat 6e2032f24e Update docs and comments about saml with allow_bypass_two_factor
allow_bypass_two_factor configration dose not work with saml provider
2019-08-27 03:46:32 +00:00
Etienne Baqué bc4efd18a0 Removed rubocop disable flags, updated changelog 2019-08-26 19:39:49 -07:00
Etienne Baqué 84d6dcbe50 Updated call to find deploy token 2019-08-26 19:39:48 -07:00
Jeremy Jackson 92b723db95 Revert "Merge branch 'user-tracking-settings' into 'master'"
This reverts merge request !31826
2019-08-26 22:16:23 +00:00
Reuben Pereira 7c9eb11149 Remove unnecessary include 2019-08-26 20:39:59 +00:00
Jeremy Jackson 6c82462df6 Changes snowplow to use cookies for sessions
This also restructures how and where the configuration for
Snowplow lives.
2019-08-26 18:14:48 +00:00
Mayra Cabrera bbd39021c3 Merge branch 'sh-fix-nplusone-issues' into 'master'
Fix N+1 Gitaly calls in /api/v4/projects/:id/issues

See merge request gitlab-org/gitlab-ce!32171
2019-08-26 17:51:59 +00:00
Brett Walker bdd5b5b695 Replace echo function with a resolver
The `GraphQL::Function` has been deprecated in
favor of resolvers.
2019-08-26 17:43:38 +00:00
Andrew Newdigate 0234795825 Remove all references to Gitlab::CorrelationId
This class has been replaced with Labkit::Correlation::CorrelationId
2019-08-26 18:49:58 +02:00
George Koltsov 679e9cd1a5 Change default visibility level for FogBugz imported projects to Private 2019-08-26 16:19:47 +00:00
Igor a8040a61d8 Add usage pings for merge request creating
Code Review Usage Ping for Create SMAU
2019-08-26 14:30:45 +00:00
Peter Leitzen fa5f0c5c0d Danger: Map .rubocop{,_todo}.yml to ~backend 2019-08-26 11:00:09 +00:00
Robert Schilling e2a7dd3f0a Update docs targeting 12.3 2019-08-26 12:48:55 +02:00
Robert Schilling efafc98bd8 Move promote to put and add more specs 2019-08-26 10:45:37 +02:00
Robert Schilling 41412f7360 Add docs and first specs 2019-08-26 10:45:37 +02:00
Robert Schilling 2e83665ed3 API: Promote project labels to group labels 2019-08-26 10:45:37 +02:00
Kamil Trzciński e74bf9a8a3 Merge branch 'db_load_balancing_service_discovery_srv' into 'master'
DB Load Balancing: Support SRV lookups

See merge request gitlab-org/gitlab-ce!32135
2019-08-26 08:32:16 +00:00
rpereira2 b99cf2024d Add nil check for Gitlab.config.prometheus 2019-08-26 13:00:10 +05:30
Reuben Pereira f855f9b815 Add helper to exactly undo cleanup_concurrent_column_rename
- Also add helper to undo rename_column_concurrently.
2019-08-25 20:14:52 +00:00
Brett Walker ad05e48863 Add support for using a Camo proxy server
User images and videos will get proxied through
the Camo server in order to keep malicious
sites from collecting the IP address of users.
2019-08-23 23:44:53 -05:00
Stan Hu 440635015f Fix N+1 Gitaly calls in /api/v4/projects/:id/issues
This is a follow-up from
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31938.

In GitLab 9.0,
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9661 removed the
`subscribed` flag from the API when the user requested a list of issues
or merge requests since calculating this value triggers extensive
Markdown processing.

In GitLab 12.0 via a4fbf39e, we accidentally reintroduced this
performance regression by changing `IssueBasic` to `Issue` in
`entities.rb`. This showed up as a Gitaly N+1 issue since the Markdown
processing would attempt to extract a commit if it detected a regex that
matched a commit.

We restore the prior behavior by once again removing the `subscribed`
flag for the bulk list of issues and merge requests and add a test to
ensure they aren't reintroduced.

Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/66202
2019-08-23 21:26:50 -07:00
Reuben Pereira 599cc49973 Drop existing trigger before creating new one
- When renaming a column concurrently, drop any existing trigger before
attempting to create a new one.

When running migration specs multiple times (as it happens during
local development), the down method of previous migrations are called.
If any of the called methods contains a call to
rename_column_concurrently, a trigger will be created and not removed.
So, the next time a migration spec is run, if the same down method is
executed again, it will cause an error when attempting to create the
trigger (since it already exists). Dropping the trigger if it already
exists will prevent this problem.
2019-08-24 04:20:29 +00:00
Reuben Pereira 2515c0cd44 Add a link to docs in project description
Add to the service and migration both.
2019-08-23 22:27:41 +00:00
Mike Greiling 1d462d23a9 Merge branch '66402-use-visual-review-tools-npm-package' into 'master'
Resolve "Use Visual Review Tools NPM package"

See merge request gitlab-org/gitlab-ce!32159
2019-08-23 21:03:23 +00:00
Marius Bobin 811252536d Read pipelines from public projects though API
Allow users to read pipelines for public projects
with public builds enabled without providing an access token.
2019-08-23 20:54:32 +00:00
Adam Hegyi 60e3388526 Implement validation logic to ProjectStage
- Introducting StageEvents to define the available events
- Define the event pairing rules, since some events are not compatible
- Express default Cycle Analytics stages with the event structure
2019-08-23 20:28:11 +00:00
shampton c96adfcd6c Move visual review toolbar to NPM
Remove the visual review toolbar code
in favor of using the NPM package.
2019-08-23 12:57:21 -07:00
Stan Hu 0a94aac8a2 Merge branch 'jc-add-ff-for-all-lfs-pointers-go' into 'master'
Adding gitaly feature flag for go implementation of get all lfs pointers

See merge request gitlab-org/gitlab-ce!31696
2019-08-23 19:52:48 +00:00
John Cai 15227e633f Adding gitaly feature flag for go implementation of get all lfs pointers 2019-08-23 11:22:29 -07:00
Patrick Derichs f1e24d4d31 Add label_id parameter to label API for PUT and DELETE
Add specs for new parameter and updated documentation as well.
2019-08-23 17:45:42 +00:00
Lin Jen-Shin e84922906e Merge branch 'jc-fix-auto-rugged-detection' into 'master'
Handle when server info doesn't have the storage in question

See merge request gitlab-org/gitlab-ce!32023
2019-08-23 17:42:40 +00:00
Kamil Trzciński 99e8b77e5e Merge branch 'sh-eliminate-gitaly-nplus-one-notes' into 'master'
Eliminate Gitaly N+1 queries with notes API

See merge request gitlab-org/gitlab-ce!32089
2019-08-23 17:21:19 +00:00
John Cai ebbd2aeb5f Handle when server info doesn't have the storage in question 2019-08-23 08:42:00 -07:00
Jan Provaznik 2abeb0c358 Merge branch '57402-upate-issues-list-sort-options-ce' into 'master'
CE: Update sort options for issues list

See merge request gitlab-org/gitlab-ce!31849
2019-08-23 14:06:40 +00:00
Nick Thomas fd577b864f Merge branch 'frozen_string_lib_2' into 'master'
Add frozen_string_literal to lib part 2

See merge request gitlab-org/gitlab-ce!32094
2019-08-23 10:26:12 +00:00
Jan Provaznik 41d52bbfe9 Add direct upload support for personal snippets 2019-08-23 11:19:14 +02:00
Jan Provaznik a98b89e9bc Re-escape whole HTML content instead of only match
When we un-escape HTML text to find references in it, we should then
re-escape the whole text again, not only found matches.

Because we replace matches with milestone/label links (which contain
HTML tags we don't want to escape again), we re-escape HTML text
with placeholders instead of these links and then replace placeholders
in the escaped text.
2019-08-23 10:36:51 +02:00
Alexandru Croitor f5b855546e Update sort options for issues list
Increase sort options for issues list from updated_at and create_at,
to include more options close to what is required in actual issue list
UI.

This helps us to use REST API for issues list with sorting capabilities

https://gitlab.com/gitlab-org/gitlab-ce/issues/57402
2019-08-23 11:32:15 +03:00
Marius Bobin d51365efe7 Exempt `jwt/auth` for user `gitlab-ci-token` from rate limiting 2019-08-23 08:05:48 +00:00
Stan Hu e24b9c2502 Eliminate Gitaly N+1 queries with notes API
Similar to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31834,
we see that in https://gitlab.com/gitlab-org/gitlab-ce/issues/65957
there can be hundreds, even thousands, of Gitaly requests in the
`/api/:version/projects/:id/merge_requests/:noteable_id/notes` endpoint.

Previously, the API to retrieve notes generated hundreds of Gitaly calls
to determine whether a system note should be shown to the user. It did
this by:

1. Rendering the Markdown
2. Extracting cross-references from the Markdown
3. Issuing a Gitaly `FindCommit` RPC for every reference to validate
that the commit exists.

The last step is unnecessary because we don't need to display a commit
if the user doesn't have access to the project in the first place.
`RendersNotes#prepare_notes_for_rendering` is already used in
`MergeRequestsController`, which is why we don't see N+1 Gitaly calls
there. We use it here to optimize the note redaction process.
2019-08-22 22:28:47 -07:00
Tiger 08fcb2379e CE port: allow SRV records in DB service discovery 2019-08-23 14:19:51 +10:00
Thong Kuah a50703f1e6 Fix frozen string error 2019-08-23 12:52:35 +12:00
Alessio Caiazza 606a1d2d31 Expose namespace storage statistics with GraphQL
Root namespaces have storage statistics.
This commit allows namespace owners to get those stats via GraphQL
queries like the following one

{
  namespace(fullPath: "a_namespace_path") {
    rootStorageStatistics {
      storageSize
      repositorySize
      lfsObjectsSize
      buildArtifactsSize
      packagesSize
      wikiSize
    }
  }
}
2019-08-22 22:08:28 +00:00
Balakumar a47db86e90 Log time spent on CPU to sidekiq.log 2019-08-22 14:31:57 +00:00
Thong Kuah c5acf26e06 Fix frozen string errors 2019-08-23 00:17:11 +12:00
Sean McGivern 842b4d4ab5 Merge branch 'feat/smime-signed-notification-emails' into 'master'
feat: smime signed notification emails

See merge request gitlab-org/gitlab-ce!30644
2019-08-22 12:16:00 +00:00
Kushal Pandya 7b5708d1d9 Merge branch 'ee-2502-refactor-ee-app-assets-javascripts-approvals-components-approvers_select-vue-to-remove-approverusers' into 'master'
Add a new method to `Api.js`: `projectUsers`

See merge request gitlab-org/gitlab-ce!31801
2019-08-22 07:59:22 +00:00
Alexandru Croitor 5af535d919 Limit the size of issuable description and comments
Limiting the size of issuable description and comments to 1_000_000,
which is close to ~1MB of ASCII characters, which represents 99.9% of
all descriptions and comments we have in DB at the moment. This should
help prevent DoS attacks when comments contain refference strings.

Also this change updates regexp matching the namespaces paths by
limiting the namespaces paths to Namespace::NUMBER_OF_ANCESTORS_ALLOWED,
as we allow 20 levels deep groups.

see https://gitlab.com/gitlab-org/gitlab-ce/issues/61974#note_191274234
2019-08-22 10:43:13 +03:00
Paul Okstad d7ae3efb87 Add Gitaly info-ref cache feature flags 2019-08-22 06:53:14 +00:00
Stan Hu d57d8ddb72 Merge branch 'sidekiq-interrupt-running-jobs-deadset' into 'master'
Put cancelled job in DeadSet

See merge request gitlab-org/gitlab-ce!32070
2019-08-21 20:29:10 +00:00
Stan Hu 45b3f554aa Merge branch 'uncomment_commit_signatures_feature_flag' into 'master'
Upgrade to gitaly 1.60.0 and uncomment get_commit_signatures feature flag

Closes #65991

See merge request gitlab-org/gitlab-ce!31981
2019-08-21 20:18:00 +00:00
Kamil Trzciński dbd88c02d6 Put cancelled job in DeadSet
This replicates Sidekiq behavior
of pushing dead job into DeadSet.
2019-08-21 21:15:03 +02:00
Marius Bobin 65b20f35dc Ensure CI matching operator receives an object
Ensure the evaluation of right-hand side expression always
results in the returning of an object or an empty String
2019-08-21 18:48:16 +00:00
Stan Hu 9a0c1f64f5 Merge branch 'sidekiq-interrupt-running-jobs' into 'master'
Allow to interrupt running sidekiq jobs

See merge request gitlab-org/gitlab-ce!31818
2019-08-21 18:37:36 +00:00
Oswaldo Ferreira 4daf3dc0db Avoid exposing unaccessible repo data upon GFM processing
When post-processing relative links to absolute links
RelativeLinkFilter didn't take into consideration that
internal repository data could be exposed for users
that do not have repository access to the project.

This commit solves that by checking whether the user
can `download_code` at this repository, avoiding any
processing of this filter if the user can't.

Additionally, if we're processing for a group (
no project was given), we check if the user can
read it in order to expand the href as an extra.
That doesn't seem necessarily a breach now,
but an extra check doesn't hurt as after all
the user needs to be able to `read_group`.
2019-08-21 12:23:44 -03:00
Kamil Trzciński 8d17c4dae6 Properly handle `sidekiq` skip
Transform `CancelledError` into `JobRetry::Skip`
2019-08-21 13:21:55 +02:00
Kamil Trzciński cb193cd6b5 Improve resillency of monitor
- Retry connection when it fails
- Properly shutdown daemon
- Stop monitor if the Exception is raised
- Properly guard exception handling
2019-08-21 12:06:10 +02:00
Kamil Trzciński 3683d2d251 Perform cheap thread find
If we process message that is not designated to us
previously we would fire a separate Thread for that.
We don't need to do it. We can cheaply check if thread
is available, if it is, we can perform expensive operation
then.
2019-08-21 12:06:10 +02:00
Kamil Trzciński c2cbfc5c4a Rework `Sidekiq::JobsThreads` into `Monitor`
This makes:
- very shallow `Middleware::Monitor` to only request tracking
  of sidekiq jobs,
- `SidekiqStatus::Monitor` to be responsible to maintain persistent
  connection to receive messages,
- `SidekiqStatus::Monitor` to always use structured logging
  and instance variables
2019-08-21 12:05:30 +02:00
Kamil Trzciński 75e2302d01 Allow to interrupt running jobs
This adds a middleware to track all threads
for running jobs.

This makes sidekiq to watch for redis-delivered notifications.

This makes be able to send notification to interrupt
running sidekiq jobs.

This does not take into account any native code,
as `Thread.raise` generates exception once the control gets
back to Ruby.

The separate measure should be taken to interrupt gRPC, shellouts,
or anything else that escapes Ruby.
2019-08-21 18:50:46 +10:00
Fabio Pitino 45c5144e36 Add active_jobs_limit to plans table
This is a port from EE changes where
we introduce a new limit for Plan model.

https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/1182
2019-08-21 10:03:07 +02:00
Luke Duncalfe 37b17fa61a Add service classes for mutating AwardEmoji
Adding, destroying and toggling emoji previously lacked services and
instead were performed through methods called on Awardable models.

This led to inconsistencies where relevant todos would be marked as done
only when emoji were awarded through our controllers, but not through
the API. Todos could also be marked as done when an emoji was being
removed.

Behaviour changes

- Awarding emoji through the API will now mark a relevant Todo as done
- Toggling an emoji off (destroying it) through our controllers will no
  longer mark a relevant Todo as done

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63372
2019-08-21 11:39:41 +12:00
drew ac77bb9376 Introducing new Syntax for Ci::Build inclusion rules
- Added Gitlab::Ci::Config::Entry::Rules and Gitlab::Ci::Config::Entry::Rules:Rule
  to handle lists of Rule objects to be evalauted for job inclusion
- Added `if:` and `changes:` as available Rules::Rule::Clause classes
- Added Rules handling logic to Seed::Build#included? with extra specs
- Use DisallowedKeysValidator to mutually exclude rules: from only:/except: on job config
2019-08-20 20:03:43 +00:00
Stan Hu e632ae8084 Standardize remote_ip and path keys for auth.log and api_json.log
Current `auth.log` uses `fullpath` and `ip`, while `api_json.log` uses
`remote_ip` and `path` for the same fields. Let's standardize these
namings to make it easier for people working with the data.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66167
2019-08-20 18:12:28 +00:00
Douwe Maan 011c5cebfc Merge branch 'bvl-mr-commit-note-counter' into 'master'
Count notes for commits and merge requests

See merge request gitlab-org/gitlab-ce!31912
2019-08-20 16:05:58 +00:00
Diego Louzán 0dcb9d21ef feat: SMIME signed notification emails
- Add mail interceptor the signs outgoing email with SMIME
- Add lib and helpers to work with SMIME data
- New configuration params for setting up SMIME key and cert files
2019-08-20 16:13:32 +02:00
Andrew Newdigate 790f64561a Allow measurement for Sidekiq jobs taking > 2.5s
Fix for https://gitlab.com/gitlab-org/gitlab-ce/issues/66319.
2019-08-20 13:52:25 +00:00
Sean McGivern 57ec78d530 Merge branch 'sh-fix-issues-api-gitaly-nplusone' into 'master'
Fix Gitaly N+1 calls with listing issues/MRs via API

Closes #66202

See merge request gitlab-org/gitlab-ce!31938
2019-08-20 12:58:03 +00:00
Peter Leitzen 6767326267 Use ActiveModel's type instead of virtus
The virtus project has been discontinued:

https://github.com/solnic/virtus/commit/a6f896984
2019-08-20 10:52:21 +00:00
Cameron Swords dfabed5def Add missing SAST environment variables 2019-08-20 07:55:03 +00:00
Alex Kalderimis 2cbcab4679 Add support for sentry_extra_data in exceptions
This allows exceptions to advertise their support for sentry
and provide structured data.
2019-08-19 23:06:21 +00:00
Robert Speicher 9295cc6f2a Merge branch '64251-branch-name-set-cache' into 'master'
Cache branch and tag names as Redis sets

See merge request gitlab-org/gitlab-ce!30476
2019-08-19 20:26:02 +00:00
Felipe Artur 2aac2e828b Uncomment get_commit_signatures feature flag 2019-08-19 15:40:58 -03:00
Nick Thomas 3028cd687a Merge branch '39-count-unique-users-for-more-accurate-smau-reporting' into 'master'
Allow UsageData.count to use count_by:

See merge request gitlab-org/gitlab-ce!30770
2019-08-19 14:45:24 +00:00
Aleksei Lipniagov dcfaf49550 Clean Sidekiq metrics from multiproc dir on start
After moving the multiproc dir cleanup into `config.ru`:`warmup`, we
stopped cleaning Sidekiq metrics dir which is not correct.
This MR intended to fix that. More details:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31668
2019-08-19 12:52:07 +00:00
Nick Thomas f7f91e84f7 Add a skip_users filter to the project users API
This functionality is available in the /autocomplete users pseudo-API.
We're attempting to replace that with the canonical API, so it needs
support for this parameter too.
2019-08-19 14:21:56 +05:30
Stan Hu ba7c501fef Fix Gitaly N+1 calls with listing issues/MRs via API
In GitLab 9.0,
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9661 removed the
`subscribed` flag from the API when the user requested a list of issues
or merge requests since calculating this value triggers extensive
Markdown processing.

In GitLab 12.0 via a4fbf39e, we accidentally reintroduced this
performance regression by changing `IssueBasic` to `Issue` in
`entities.rb`. This showed up as a Gitaly N+1 issue since the Markdown
processing would attempt to extract a commit if it detected a regex that
matched a commit.

We restore the prior behavior by once again removing the `subscribed`
flag for the bulk list of issues and merge requests and add a test to
ensure they aren't reintroduced.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66202
2019-08-17 20:35:37 -07:00