Commit cb1b0fc6 authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-09-05

# Conflicts:
#	app/views/groups/labels/index.html.haml
#	doc/ci/yaml/README.md
#	lib/gitlab/ci/config.rb

[ci skip]
parents dd8fc55a 9dd34eac
- page_title 'Labels' - page_title 'Labels'
- can_admin_label = can?(current_user, :admin_label, @group) - can_admin_label = can?(current_user, :admin_label, @group)
<<<<<<< HEAD
- issuables = ['issues', 'merge requests'] + (@group&.feature_available?(:epics) ? ['epics'] : []) - issuables = ['issues', 'merge requests'] + (@group&.feature_available?(:epics) ? ['epics'] : [])
=======
- issuables = ['issues', 'merge requests']
>>>>>>> upstream/master
- search = params[:search] - search = params[:search]
- if can_admin_label - if can_admin_label
......
---
title: Add route information to lograge structured logging for API logs
merge_request: 21487
author:
type: other
...@@ -7,7 +7,7 @@ projects. ...@@ -7,7 +7,7 @@ projects.
GitLab offers a [continuous integration][ci] service. If you GitLab offers a [continuous integration][ci] service. If you
[add a `.gitlab-ci.yml` file][yaml] to the root directory of your repository, [add a `.gitlab-ci.yml` file][yaml] to the root directory of your repository,
and configure your GitLab project to use a [Runner], then each commit or and configure your GitLab project to use a [Runner], then each commit or
push, triggers your CI [pipeline]. push triggers your CI [pipeline].
The `.gitlab-ci.yml` file tells the GitLab runner what to do. By default it runs The `.gitlab-ci.yml` file tells the GitLab runner what to do. By default it runs
a pipeline with three [stages]: `build`, `test`, and `deploy`. You don't need to a pipeline with three [stages]: `build`, `test`, and `deploy`. You don't need to
......
...@@ -149,8 +149,11 @@ spinach: ...@@ -149,8 +149,11 @@ spinach:
script: rake spinach script: rake spinach
``` ```
<<<<<<< HEAD
`extends` works across configuration files combined with [`include`](#include). `extends` works across configuration files combined with [`include`](#include).
=======
>>>>>>> upstream/master
### `pages` ### `pages`
`pages` is a special job that is used to upload static content to GitLab that `pages` is a special job that is used to upload static content to GitLab that
......
...@@ -133,6 +133,7 @@ Once your GitLab Chart is installed, configuration changes and chart updates ...@@ -133,6 +133,7 @@ Once your GitLab Chart is installed, configuration changes and chart updates
should be done using `helm upgrade`: should be done using `helm upgrade`:
```sh ```sh
helm repo update
helm upgrade --reuse-values gitlab gitlab/gitlab helm upgrade --reuse-values gitlab gitlab/gitlab
``` ```
......
...@@ -15,6 +15,7 @@ module API ...@@ -15,6 +15,7 @@ module API
include: [ include: [
GrapeLogging::Loggers::FilterParameters.new, GrapeLogging::Loggers::FilterParameters.new,
GrapeLogging::Loggers::ClientEnv.new, GrapeLogging::Loggers::ClientEnv.new,
Gitlab::GrapeLogging::Loggers::RouteLogger.new,
Gitlab::GrapeLogging::Loggers::UserLogger.new, Gitlab::GrapeLogging::Loggers::UserLogger.new,
Gitlab::GrapeLogging::Loggers::QueueDurationLogger.new, Gitlab::GrapeLogging::Loggers::QueueDurationLogger.new,
Gitlab::GrapeLogging::Loggers::PerfLogger.new Gitlab::GrapeLogging::Loggers::PerfLogger.new
......
...@@ -4,8 +4,11 @@ module Gitlab ...@@ -4,8 +4,11 @@ module Gitlab
# Base GitLab CI Configuration facade # Base GitLab CI Configuration facade
# #
class Config class Config
<<<<<<< HEAD
prepend EE::Gitlab::Ci::Config prepend EE::Gitlab::Ci::Config
=======
>>>>>>> upstream/master
ConfigError = Class.new(StandardError) ConfigError = Class.new(StandardError)
def initialize(config, opts = {}) def initialize(config, opts = {})
...@@ -66,8 +69,11 @@ module Gitlab ...@@ -66,8 +69,11 @@ module Gitlab
@global.jobs_value @global.jobs_value
end end
<<<<<<< HEAD
private private
=======
>>>>>>> upstream/master
# 'opts' argument is used in EE see /ee/lib/ee/gitlab/ci/config.rb # 'opts' argument is used in EE see /ee/lib/ee/gitlab/ci/config.rb
def build_config(config, opts = {}) def build_config(config, opts = {})
Loader.new(config).load! Loader.new(config).load!
......
# frozen_string_literal: true
# This grape_logging module (https://github.com/aserafin/grape_logging) makes it
# possible to log the details of the action
module Gitlab
module GrapeLogging
module Loggers
class RouteLogger < ::GrapeLogging::Loggers::Base
def parameters(request, _)
endpoint = request.env[Grape::Env::API_ENDPOINT]
route = endpoint&.route&.pattern&.origin
return {} unless route
{ route: route }
rescue
# endpoint.route calls env[Grape::Env::GRAPE_ROUTING_ARGS][:route_info]
# but env[Grape::Env::GRAPE_ROUTING_ARGS] is nil in the case of a 405 response
# so we're rescuing exceptions and bailing out
{}
end
end
end
end
end
...@@ -83,7 +83,7 @@ module Gitlab ...@@ -83,7 +83,7 @@ module Gitlab
def open_file(params, key) def open_file(params, key)
allowed_paths = [ allowed_paths = [
FileUploader.root, ::FileUploader.root,
Gitlab.config.uploads.storage_path, Gitlab.config.uploads.storage_path,
File.join(Rails.root, 'public/uploads/tmp') File.join(Rails.root, 'public/uploads/tmp')
] ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment