Commit Graph

10024 Commits

Author SHA1 Message Date
Adam Hegyi ff7c992ebd Setup counter for Productivity Analytics
This change sets up a usage counter for productivity analytics feature.
2019-09-12 11:12:29 +00:00
Jan Provaznik 4200a9176b Merge branch 'bw-asset-proxy-markdown-bump' into 'master'
Bump the CACHE_COMMONMARK_VERSION

See merge request gitlab-org/gitlab-ce!32935
2019-09-12 07:49:56 +00:00
Thong Kuah eef1a7fe2c Merge branch 'static-objects-external-storage' into 'master'
Enable serving static objects from an external storage

See merge request gitlab-org/gitlab-ce!31025
2019-09-11 22:35:10 +00:00
Brett Walker ae862960b1 Bump the CACHE_COMMONMARK_VERSION
to ensure any markdown generated before the asset
proxy default was corrected is re-generated
2019-09-11 14:35:37 -05:00
Bian Jiaping 9c0e2d5b47 Add source and merge_request fields to pipeline event webhook 2019-09-11 19:33:45 +00:00
Aleksei Lipniagov 50cb6eca57 Use 'gitlab_chronic_duration' gem
Replace 'chronic_duration' to 'gitlab_chronic_duration', to make
relevant method calls thread-safe.
2019-09-11 18:32:24 +00:00
Peter Leitzen 50c647af51 Add rake task `db:obsolete_ignored_columns`
Show a list of obsolete `ignored_columns`
2019-09-11 16:23:42 +00:00
Alexandru Croitor b012174d6f Change discussion_ids on promoted epics notes
Notes on epics promoted from an issue used to get same discussion_id
as the notes from the issue the epic was promoted from, which would
cause problems when trying to reply to the epic discussion.
2019-09-11 12:17:51 +00:00
Thong Kuah 28292d516a Merge branch '65988-optimize-snippet-listings' into 'master'
Optimize queries for snippet listings

See merge request gitlab-org/gitlab-ce!32576
2019-09-11 04:48:21 +00:00
Stan Hu 4bcde77f66 Merge branch '64251-redis-set-cache-mark-2' into 'master'
Re-introduce the Redis set cache for branch and tag names - but don't enable it yet

See merge request gitlab-org/gitlab-ce!32412
2019-09-10 17:38:42 +00:00
Kamil Trzciński 0078ea44c2 Merge branch 'sidekiq-monitor-namespace-change' into 'master'
Sidekiq monitor namespace change

See merge request gitlab-org/gitlab-ce!32878
2019-09-10 16:16:11 +00:00
Qingyu Zhao eeeaebe608 Change Sidekiq monitor namespace
Move Gitlab::SidekiqMonitor to namespace Gitlab::SidekiqDaemon::Monitor
 - Class name and file name change
 - File path change to lib/gitlab/sidekiq_daemon/monitor.rb
 - Update class usage/reference in other files, including documentation
2019-09-11 00:11:54 +10:00
Markus Koller 60755fbc40
Optimize queries for snippet listings
- Avoid N+1 queries for authors and comment counts
- Avoid an additional snippet existence query
2019-09-10 15:24:28 +02:00
Nick Thomas 4cd6c91d5f
Redis set cache docs and minor cleanup 2019-09-10 14:09:55 +01:00
Nick Thomas 07323f44b7
Revert "Revert "Cache branch and tag names as Redis sets""
This reverts commit c6ccc07f48.
2019-09-10 13:45:21 +01:00
Nick Thomas 6ce21a9c17
Add a predicate to check for strong memoization 2019-09-10 13:45:21 +01:00
Ahmad Sherif 3c2b4a1ced Enable serving static objects from an external storage
It consists of two parts:

1. Redirecting users to the configured external storage
1. Allowing the external storage to request the static object(s)
   on behalf of the user by means of specific tokens

Part of https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/6829
2019-09-10 13:43:11 +02:00
Małgorzata Ksionek 18a4afc50e Add code review remarks 2019-09-10 13:22:21 +02:00
Bob Van Landuyt 8472fa0807 Build correct variables for testing translations
This makes sure we build the correct variables for testing
translations.

When translating, we could be specifying the variables in different
forms for each id:

- In the singular we could be using a `%{hash}` interpolation
- In the plural we could be using a `%d` interpolation

This changes the tests to accommodate for that: We now use the
variables used in the relevant translation id as the source for the
variables we mix in in specs.
2019-09-10 13:22:21 +02:00
Kamil Trzciński 0e56c1e7cb Improve performance and memory usage of project export
ActiveModel::Serialization is simple in that it recursively calls
`as_json` on each object to serialize everything. However, for a model
like a Project, this can generate a query for every single association,
which can add up to tens of thousands of queries and lead to memory
bloat.

To improve this, we can do several things:

1. We use `tree:` and `preload:` to automatically generate
   a list of all preloads that could be used to serialize
   objects in bulk.

2. We observe that a single project has many issues, merge requests,
   etc. Instead of serializing everything at once, which could lead to
   database timeouts and high memory usage, we take each top-level
   association and serialize the data in batches.

For example, we serialize the first 100 issues and preload all of
their associated events, notes, etc. before moving onto the next
batch. When we're done, we serialize merge requests in the same way.
We repeat this pattern for the remaining associations specified in
import_export.yml.
2019-09-09 15:40:49 +00:00
Francisco Javier López 107ebb8251 Lower searches count limit
Lowering the limit when performing search from 1001 to 101.
This will allow us to speed this process.
2019-09-09 13:46:24 +00:00
Kamil Trzciński cbb35ea882 Merge branch '61927-skeleton-pages-internal-api' into 'master'
Add skeleton Pages internal API

See merge request gitlab-org/gitlab-ce!32732
2019-09-09 13:27:11 +00:00
drew 9458192f2b Passing job:rules downstream and E2E specs for job:rules configuration 2019-09-09 13:21:26 +00:00
Ash McKenzie 154f474bca Merge branch 'reduce-parse-options-complexity' into 'master'
Refactor parse_options() in push_options.rb

Closes #67091

See merge request gitlab-org/gitlab-ce!32756
2019-09-09 04:07:46 +00:00
Stan Hu ae8ad17ff9 Merge branch 'kamil-refactor-import-structure' into 'master'
Normalize import_export structure

See merge request gitlab-org/gitlab-ce!32704
2019-09-08 03:45:56 +00:00
Christian Couder 4aa4449ef5 Refactor parse_options() in push_options.rb
This improves code quality by reducing Cognitive Complexity.

This fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/67091
2019-09-07 17:31:23 +02:00
Lee Tickett 6639aa3f48 Only show `/copy_metadata` when usable 2019-09-06 16:16:39 +00:00
Alessio Caiazza e32069ef6c Process workhorse accelerated wiki uploads
Wiki attachments can be workhorse accelerated.
This commit is backward compatible with older workhorse
2019-09-06 15:53:13 +02:00
Kamil Trzciński 0eeadb2dd2 Normalize import_export structure
This brings a significant refactor to how
we handle `import_export.yml`, merge it with EE
and how we handle that for reader and saver.

This is meant to simplify the code, and remove
a ton of conditions to handle different models
of the structure.

This is also meant to prepare the structure
to extend it much easier, like adding `preload:`
or additional object types when needed.

This does not change the behavior of import/export,
rather unifies and simplifies the current implementation.
2019-09-06 14:21:17 +02:00
Ash McKenzie 9fc9ab2ba2 Add new GitlabDanger class
This class encapsulates our use of the Danger gem.
2019-09-06 11:21:53 +00:00
Kamil Trzciński 0e0a4d7881 Merge branch 'ce-detect-github-pull-requests' into 'master'
Port CreateGithubPullRequestEvents migration from EE

See merge request gitlab-org/gitlab-ce!31802
2019-09-06 10:10:47 +00:00
Will Chandler 525449d7ce Stop empty external auth classification labels overriding default labels
Most of the project templates bundled with GitLab have an empty string
set for `external_authorization_classification_label` in their
`project.json`. When imported this overrides the default label set on
the instance, causing the label to appear empty.

This change sets empty labels to nil during import, allowing the
default label to override it and be applied to the project.
2019-09-06 08:33:18 +00:00
Lin Jen-Shin 6def5bd66b Merge branch 'revert-351d72cb' into 'master'
Revert "Merge branch '66596-allow-danger-to-be-run-locally' into 'master'"

See merge request gitlab-org/gitlab-ce!32741
2019-09-06 08:23:24 +00:00
Jan Provaznik 913c87c612 Merge branch '59729-estimate-quick-action-does-not-produce-correct-time-for-1mo' into 'master'
Resolve "estimate quick action does not produce correct time for 1mo"

See merge request gitlab-org/gitlab-ce!32165
2019-09-06 07:47:41 +00:00
Ash McKenzie f34e4545ec Revert "Merge branch '66596-allow-danger-to-be-run-locally' into 'master'"
This reverts merge request !32196
2019-09-06 07:14:30 +00:00
Lin Jen-Shin 351d72cbed Merge branch '66596-allow-danger-to-be-run-locally' into 'master'
Break up Danger rules into local or CI only

See merge request gitlab-org/gitlab-ce!32196
2019-09-06 06:22:02 +00:00
Krasimir Angelov 477ba2b346 Add skeleton Pages internal API
Basic `/internal/pages` endpoint that will be used for Pages virtual
domains internal API. The endpoint is currently behind feature flag and
provides authetication similar to how Workhorse is authenticating with
the GitLab.
2019-09-06 16:06:25 +12:00
Ash McKenzie 4285001869 Merge branch 'add-label-push-opts' into 'master'
Support adding and removing labels w/ push opts

Closes #5942

See merge request gitlab-org/gitlab-ce!31831
2019-09-06 02:58:00 +00:00
Ash McKenzie 2cb6393595
Allow Danger to detect if running local 2019-09-06 10:56:47 +10:00
Rémy Coutable 181a9698f4 Merge branch 'danger-review-pipeline' into 'master'
Add Danger Roulette rules for pipeline files

See merge request gitlab-org/gitlab-ce!32616
2019-09-05 16:50:05 +00:00
Fabio Pitino ca6a1f33f9 CE port for pipelines for external pull requests
Detect if pipeline runs for a GitHub pull request

When using a mirror for CI/CD only we register a pull_request
webhook. When a pull_request webhook is received, if the
source branch SHA matches the actual head of the branch in the
repository we create immediately a new pipeline for the
external pull request. Otherwise we store the
pull request info for when the push webhook is received.

When using "only/except: external_pull_requests" we can detect
if the pipeline has a open pull request on GitHub and create or
not the job based on that.
2019-09-05 15:53:48 +01:00
Cédric Tabin e195e48638 New interruptible attribute supported in YAML parsing.
Since it is not possible to dynamically detect if a job is automatically
cancellable or not, a this new attribute is necessary. Moreover, it let
the maintainer of the repo to adjust the behaviour of the auto cancellation
feature to match exactly what he needs.
2019-09-05 14:50:39 +00:00
Kyle Wiebers 79ec54c39e Add Danger Roulette rules for pipeline files 2019-09-05 09:02:47 -05:00
Heinrich Lee Yu 7a8d216480 Fix time tracking parsing of months
Patches ChronicDuration to use our custom conversions
when parsing months
2019-09-05 20:24:33 +08:00
Reuben Pereira 43d33ef824 Refactor new undo_* methods
- Move code for creating a new column from old into a function so that
it can be reused.
- Also add comments above the methods.
2019-09-05 12:15:16 +00:00
Peter Leitzen 1c6aa98c37 Merge branch '66150-remove-dynamically-constructed-feature-flags-starting-with-prometheus_transaction_' into 'master'
Resolve "Remove dynamically constructed feature flags starting with `prometheus_transaction_`"

Closes #66150

See merge request gitlab-org/gitlab-ce!32395
2019-09-05 11:38:08 +00:00
Winnie Hellmann abbf081672 Add .gitlab/ci/frontend.gitlab-ci.yml to frontend review roulette 2019-09-05 10:02:20 +00:00
Jacopo f599862e6c
Remove feature flags starting with `prometheus_transaction_`
Those feature flags were always enabled so we can remove them safely.
2019-09-05 11:01:02 +02:00
Jan Provaznik 8d1d7b2fd9 Merge branch 'remove-unnecessary-freeze-in-lib-gitlab' into 'master'
Avoid calling freeze on already frozen strings in lib/gitlab

See merge request gitlab-org/gitlab-ce!32637
2019-09-05 08:16:24 +00:00
Marcel Amirault f6efae6b6e Add spaces to devops ci template to reduce warnings 2019-09-05 07:58:17 +00:00