Commit 56201db1 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent ce2a803d
---
title: Omit error details from previous attempt in Sidekiq JSON logs
merge_request: 25161
author:
type: changed
const path = require('path'); const path = require('path');
const webpack = require('webpack'); const webpack = require('webpack');
const vendorDllHash = require('./helpers/vendor_dll_hash'); const vendorDllHash = require('./helpers/vendor_dll_hash');
const { YarnCheck } = require('yarn-check-webpack-plugin');
const ROOT_PATH = path.resolve(__dirname, '..'); const ROOT_PATH = path.resolve(__dirname, '..');
...@@ -60,6 +61,11 @@ module.exports = { ...@@ -60,6 +61,11 @@ module.exports = {
path: path.join(dllCachePath, '[name].dll.manifest.json'), path: path.join(dllCachePath, '[name].dll.manifest.json'),
name: '[name]_[hash]', name: '[name]_[hash]',
}), }),
new YarnCheck({
rootDirectory: ROOT_PATH,
exclude: /ts-jest/,
forceKill: true,
}),
], ],
node: { node: {
......
...@@ -109,6 +109,7 @@ To make full use of Auto DevOps, you will need: ...@@ -109,6 +109,7 @@ To make full use of Auto DevOps, you will need:
1. A [Kubernetes 1.12+ cluster](../../user/project/clusters/index.md) for the project. The easiest 1. A [Kubernetes 1.12+ cluster](../../user/project/clusters/index.md) for the project. The easiest
way is to add a [new cluster using the GitLab UI](../../user/project/clusters/add_remove_clusters.md#add-new-cluster). way is to add a [new cluster using the GitLab UI](../../user/project/clusters/add_remove_clusters.md#add-new-cluster).
For Kubernetes 1.16+ clusters, there is some additional configuration for [Auto Deploy for Kubernetes 1.16+](#kubernetes-116).
1. NGINX Ingress. You can deploy it to your Kubernetes cluster by installing 1. NGINX Ingress. You can deploy it to your Kubernetes cluster by installing
the [GitLab-managed app for Ingress](../../user/clusters/applications.md#ingress), the [GitLab-managed app for Ingress](../../user/clusters/applications.md#ingress),
once you have configured GitLab's Kubernetes integration in the previous step. once you have configured GitLab's Kubernetes integration in the previous step.
...@@ -635,6 +636,30 @@ be pulled again, e.g. after pod eviction, Kubernetes will fail to do so ...@@ -635,6 +636,30 @@ be pulled again, e.g. after pod eviction, Kubernetes will fail to do so
as it will be attempting to fetch the image using as it will be attempting to fetch the image using
`CI_REGISTRY_PASSWORD`. `CI_REGISTRY_PASSWORD`.
#### Kubernetes 1.16+
> [Introduced](https://gitlab.com/gitlab-org/charts/auto-deploy-app/-/merge_requests/51) in GitLab 12.8.
CAUTION: **Deprecation**
The default value of `extensions/v1beta1` for the `deploymentApiVersion` setting is
deprecated, and is scheduled to be changed to a new default of `apps/v1` in
[GitLab 13.0](https://gitlab.com/gitlab-org/charts/auto-deploy-app/issues/47).
In Kubernetes 1.16 onwards, a number of [APIs were removed](https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/),
including support for `Deployment` in the `extensions/v1beta1` version.
To use Auto Deploy on a Kubernetes 1.16+ cluster, you must:
1. Set the following in the [`.gitlab/auto-deploy-values.yaml` file](#customize-values-for-helm-chart):
```yml
deploymentApiVersion: apps/v1
```
1. Set the `POSTGRES_ENABLED` variable to `false`. This will disable Auto Deploy's deployment of PostgreSQL.
Support for enabling Auto Deploy's deployment of PostgreSQL in a Kubernetes 1.16+ cluster
is [planned](https://gitlab.com/gitlab-org/charts/auto-deploy-app/issues/28).
#### Migrations #### Migrations
> [Introduced][ce-21955] in GitLab 11.4 > [Introduced][ce-21955] in GitLab 11.4
......
...@@ -77,7 +77,9 @@ module Gitlab ...@@ -77,7 +77,9 @@ module Gitlab
end end
def parse_job(job) def parse_job(job)
job = job.dup # Error information from the previous try is in the payload for
# displaying in the Sidekiq UI, but is very confusing in logs!
job = job.except('error_backtrace', 'error_class', 'error_message')
# Add process id params # Add process id params
job['pid'] = ::Process.pid job['pid'] = ::Process.pid
......
...@@ -8,7 +8,6 @@ namespace :gitlab do ...@@ -8,7 +8,6 @@ namespace :gitlab do
yarn:check yarn:check
gettext:po_to_json gettext:po_to_json
rake:assets:precompile rake:assets:precompile
gitlab:assets:vendor
webpack:compile webpack:compile
gitlab:assets:fix_urls gitlab:assets:fix_urls
].each(&Gitlab::TaskHelpers.method(:invoke_and_time_task)) ].each(&Gitlab::TaskHelpers.method(:invoke_and_time_task))
......
...@@ -198,6 +198,7 @@ ...@@ -198,6 +198,7 @@
"timezone-mock": "^1.0.8", "timezone-mock": "^1.0.8",
"vue-jest": "^4.0.0-beta.2", "vue-jest": "^4.0.0-beta.2",
"webpack-dev-server": "^3.8.1", "webpack-dev-server": "^3.8.1",
"yarn-check-webpack-plugin": "^1.2.0",
"yarn-deduplicate": "^1.1.1" "yarn-deduplicate": "^1.1.1"
}, },
"resolutions": { "resolutions": {
......
...@@ -22,8 +22,9 @@ describe Profiles::NotificationsController do ...@@ -22,8 +22,9 @@ describe Profiles::NotificationsController do
end end
context 'with groups that do not have notification preferences' do context 'with groups that do not have notification preferences' do
set(:group) { create(:group) } let_it_be(:group) { create(:group) }
set(:subgroup) { create(:group, parent: group) } let_it_be(:subgroup) { create(:group, parent: group) }
before do before do
group.add_developer(user) group.add_developer(user)
end end
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
require 'spec_helper' require 'spec_helper'
describe AwardEmojisFinder do describe AwardEmojisFinder do
set(:issue_1) { create(:issue) } let_it_be(:issue_1) { create(:issue) }
set(:issue_1_thumbsup) { create(:award_emoji, name: 'thumbsup', awardable: issue_1) } let_it_be(:issue_1_thumbsup) { create(:award_emoji, name: 'thumbsup', awardable: issue_1) }
set(:issue_1_thumbsdown) { create(:award_emoji, name: 'thumbsdown', awardable: issue_1) } let_it_be(:issue_1_thumbsdown) { create(:award_emoji, name: 'thumbsdown', awardable: issue_1) }
# Create a matching set of emoji for a second issue. # Create a matching set of emoji for a second issue.
# These should never appear in our finder results # These should never appear in our finder results
set(:issue_2) { create(:issue) } let_it_be(:issue_2) { create(:issue) }
set(:issue_2_thumbsup) { create(:award_emoji, name: 'thumbsup', awardable: issue_2) } let_it_be(:issue_2_thumbsup) { create(:award_emoji, name: 'thumbsup', awardable: issue_2) }
set(:issue_2_thumbsdown) { create(:award_emoji, name: 'thumbsdown', awardable: issue_2) } let_it_be(:issue_2_thumbsdown) { create(:award_emoji, name: 'thumbsdown', awardable: issue_2) }
describe 'param validation' do describe 'param validation' do
it 'raises an error if `name` is invalid' do it 'raises an error if `name` is invalid' do
......
...@@ -5,7 +5,7 @@ require 'spec_helper' ...@@ -5,7 +5,7 @@ require 'spec_helper'
describe ClustersFinder do describe ClustersFinder do
let(:project) { create(:project) } let(:project) { create(:project) }
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
describe '#execute' do describe '#execute' do
let(:enabled_cluster) { create(:cluster, :provided_by_gcp, projects: [project]) } let(:enabled_cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }
......
...@@ -29,7 +29,7 @@ describe IssuesFinder do ...@@ -29,7 +29,7 @@ describe IssuesFinder do
end end
context 'filter by username' do context 'filter by username' do
set(:user3) { create(:user) } let_it_be(:user3) { create(:user) }
before do before do
project2.add_developer(user3) project2.add_developer(user3)
...@@ -53,7 +53,7 @@ describe IssuesFinder do ...@@ -53,7 +53,7 @@ describe IssuesFinder do
end end
it_behaves_like 'no assignee filter' do it_behaves_like 'no assignee filter' do
set(:user3) { create(:user) } let_it_be(:user3) { create(:user) }
let(:expected_issuables) { [issue4] } let(:expected_issuables) { [issue4] }
end end
...@@ -679,7 +679,7 @@ describe IssuesFinder do ...@@ -679,7 +679,7 @@ describe IssuesFinder do
end end
context 'filtering by confidential' do context 'filtering by confidential' do
set(:confidential_issue) { create(:issue, project: project1, confidential: true) } let_it_be(:confidential_issue) { create(:issue, project: project1, confidential: true) }
context 'no filtering' do context 'no filtering' do
it 'returns all issues' do it 'returns all issues' do
...@@ -777,7 +777,7 @@ describe IssuesFinder do ...@@ -777,7 +777,7 @@ describe IssuesFinder do
it 'returns the number of rows for the default state' do it 'returns the number of rows for the default state' do
finder = described_class.new(user) finder = described_class.new(user)
expect(finder.row_count).to eq(5) expect(finder.row_count).to eq(4)
end end
it 'returns the number of rows for a given state' do it 'returns the number of rows for a given state' do
...@@ -790,10 +790,10 @@ describe IssuesFinder do ...@@ -790,10 +790,10 @@ describe IssuesFinder do
describe '#with_confidentiality_access_check' do describe '#with_confidentiality_access_check' do
let(:guest) { create(:user) } let(:guest) { create(:user) }
set(:authorized_user) { create(:user) } let_it_be(:authorized_user) { create(:user) }
set(:project) { create(:project, namespace: authorized_user.namespace) } let_it_be(:project) { create(:project, namespace: authorized_user.namespace) }
set(:public_issue) { create(:issue, project: project) } let_it_be(:public_issue) { create(:issue, project: project) }
set(:confidential_issue) { create(:issue, project: project, confidential: true) } let_it_be(:confidential_issue) { create(:issue, project: project, confidential: true) }
context 'when no project filter is given' do context 'when no project filter is given' do
let(:params) { {} } let(:params) { {} }
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
require 'spec_helper' require 'spec_helper'
describe JobsFinder, '#execute' do describe JobsFinder, '#execute' do
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
set(:admin) { create(:user, :admin) } let_it_be(:admin) { create(:user, :admin) }
set(:project) { create(:project, :private, public_builds: false) } let_it_be(:project) { create(:project, :private, public_builds: false) }
set(:pipeline) { create(:ci_pipeline, project: project) } let_it_be(:pipeline) { create(:ci_pipeline, project: project) }
set(:job_1) { create(:ci_build) } let_it_be(:job_1) { create(:ci_build) }
set(:job_2) { create(:ci_build, :running) } let_it_be(:job_2) { create(:ci_build, :running) }
set(:job_3) { create(:ci_build, :success, pipeline: pipeline) } let_it_be(:job_3) { create(:ci_build, :success, pipeline: pipeline) }
let(:params) { {} } let(:params) { {} }
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
require 'spec_helper' require 'spec_helper'
describe MembersFinder, '#execute' do describe MembersFinder, '#execute' do
set(:group) { create(:group) } let_it_be(:group) { create(:group) }
set(:nested_group) { create(:group, parent: group) } let_it_be(:nested_group) { create(:group, parent: group) }
set(:project) { create(:project, namespace: nested_group) } let_it_be(:project, reload: true) { create(:project, namespace: nested_group) }
set(:user1) { create(:user) } let_it_be(:user1) { create(:user) }
set(:user2) { create(:user) } let_it_be(:user2) { create(:user) }
set(:user3) { create(:user) } let_it_be(:user3) { create(:user) }
set(:user4) { create(:user) } let_it_be(:user4) { create(:user) }
it 'returns members for project and parent groups' do it 'returns members for project and parent groups' do
nested_group.request_access(user1) nested_group.request_access(user1)
...@@ -128,10 +128,10 @@ describe MembersFinder, '#execute' do ...@@ -128,10 +128,10 @@ describe MembersFinder, '#execute' do
context 'when include_invited_groups_members == true' do context 'when include_invited_groups_members == true' do
subject { described_class.new(project, user2).execute(include_relations: [:inherited, :direct, :invited_groups_members]) } subject { described_class.new(project, user2).execute(include_relations: [:inherited, :direct, :invited_groups_members]) }
set(:linked_group) { create(:group, :public) } let_it_be(:linked_group) { create(:group, :public) }
set(:nested_linked_group) { create(:group, parent: linked_group) } let_it_be(:nested_linked_group) { create(:group, parent: linked_group) }
set(:linked_group_member) { linked_group.add_guest(user1) } let_it_be(:linked_group_member) { linked_group.add_guest(user1) }
set(:nested_linked_group_member) { nested_linked_group.add_guest(user2) } let_it_be(:nested_linked_group_member) { nested_linked_group.add_guest(user2) }
it 'includes all the invited_groups members including members inherited from ancestor groups' do it 'includes all the invited_groups members including members inherited from ancestor groups' do
create(:project_group_link, project: project, group: nested_linked_group) create(:project_group_link, project: project, group: nested_linked_group)
......
...@@ -214,13 +214,13 @@ describe MergeRequestsFinder do ...@@ -214,13 +214,13 @@ describe MergeRequestsFinder do
merge_request3.assignees = [user2, user3] merge_request3.assignees = [user2, user3]
end end
set(:user3) { create(:user) } let_it_be(:user3) { create(:user) }
let(:params) { { assignee_username: [user2.username, user3.username] } } let(:params) { { assignee_username: [user2.username, user3.username] } }
let(:expected_issuables) { [merge_request3] } let(:expected_issuables) { [merge_request3] }
end end
it_behaves_like 'no assignee filter' do it_behaves_like 'no assignee filter' do
set(:user3) { create(:user) } let_it_be(:user3) { create(:user) }
let(:expected_issuables) { [merge_request4, merge_request5] } let(:expected_issuables) { [merge_request4, merge_request5] }
end end
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
require 'spec_helper' require 'spec_helper'
describe ResourceLabelEventFinder do describe ResourceLabelEventFinder do
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
set(:issue_project) { create(:project) } let_it_be(:issue_project) { create(:project) }
set(:issue) { create(:issue, project: issue_project) } let_it_be(:issue) { create(:issue, project: issue_project) }
describe '#execute' do describe '#execute' do
subject { described_class.new(user, issue).execute } subject { described_class.new(user, issue).execute }
......
...@@ -18,7 +18,10 @@ describe Gitlab::SidekiqLogging::StructuredLogger do ...@@ -18,7 +18,10 @@ describe Gitlab::SidekiqLogging::StructuredLogger do
"jid" => "da883554ee4fe414012f5f42", "jid" => "da883554ee4fe414012f5f42",
"created_at" => created_at.to_f, "created_at" => created_at.to_f,
"enqueued_at" => created_at.to_f, "enqueued_at" => created_at.to_f,
"correlation_id" => 'cid' "correlation_id" => 'cid',
"error_message" => "wrong number of arguments (2 for 3)",
"error_class" => "ArgumentError",
"error_backtrace" => []
} }
end end
...@@ -26,7 +29,7 @@ describe Gitlab::SidekiqLogging::StructuredLogger do ...@@ -26,7 +29,7 @@ describe Gitlab::SidekiqLogging::StructuredLogger do
let(:clock_thread_cputime_start) { 0.222222299 } let(:clock_thread_cputime_start) { 0.222222299 }
let(:clock_thread_cputime_end) { 1.333333799 } let(:clock_thread_cputime_end) { 1.333333799 }
let(:start_payload) do let(:start_payload) do
job.merge( job.except('error_backtrace', 'error_class', 'error_message').merge(
'message' => 'TestWorker JID-da883554ee4fe414012f5f42: start', 'message' => 'TestWorker JID-da883554ee4fe414012f5f42: start',
'job_status' => 'start', 'job_status' => 'start',
'pid' => Process.pid, 'pid' => Process.pid,
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
require 'spec_helper' require 'spec_helper'
describe Ci::BridgePresenter do describe Ci::BridgePresenter do
set(:project) { create(:project) } let_it_be(:project) { create(:project) }
set(:pipeline) { create(:ci_pipeline, project: project) } let_it_be(:pipeline) { create(:ci_pipeline, project: project) }
set(:bridge) { create(:ci_bridge, pipeline: pipeline, status: :failed) } let_it_be(:bridge) { create(:ci_bridge, pipeline: pipeline, status: :failed) }
subject(:presenter) do subject(:presenter) do
described_class.new(bridge) described_class.new(bridge)
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
require 'spec_helper' require 'spec_helper'
describe Ci::TriggerPresenter do describe Ci::TriggerPresenter do
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
set(:project) { create(:project) } let_it_be(:project) { create(:project) }
set(:trigger) do let_it_be(:trigger) do
create(:ci_trigger, token: '123456789abcd', project: project) create(:ci_trigger, token: '123456789abcd', project: project)
end end
......
...@@ -5,11 +5,11 @@ require 'spec_helper' ...@@ -5,11 +5,11 @@ require 'spec_helper'
describe EventPresenter do describe EventPresenter do
include Gitlab::Routing.url_helpers include Gitlab::Routing.url_helpers
set(:group) { create(:group) } let_it_be(:group) { create(:group) }
set(:project) { create(:project, group: group) } let_it_be(:project) { create(:project, group: group) }
set(:target) { create(:milestone, project: project) } let_it_be(:target) { create(:milestone, project: project) }
set(:group_event) { create(:event, :created, project: nil, group: group, target: target) } let_it_be(:group_event) { create(:event, :created, project: nil, group: group, target: target) }
set(:project_event) { create(:event, :created, project: project, target: target) } let_it_be(:project_event) { create(:event, :created, project: project, target: target) }
describe '#resource_parent_name' do describe '#resource_parent_name' do
context 'with group event' do context 'with group event' do
......
...@@ -5,8 +5,8 @@ require 'spec_helper' ...@@ -5,8 +5,8 @@ require 'spec_helper'
describe LabelPresenter do describe LabelPresenter do
include Gitlab::Routing.url_helpers include Gitlab::Routing.url_helpers
set(:group) { create(:group) } let_it_be(:group) { create(:group) }
set(:project) { create(:project, group: group) } let_it_be(:project) { create(:project, group: group) }
let(:label) { build_stubbed(:label, project: project).present(issuable_subject: project) } let(:label) { build_stubbed(:label, project: project).present(issuable_subject: project) }
let(:group_label) { build_stubbed(:group_label, group: group).present(issuable_subject: project) } let(:group_label) { build_stubbed(:group_label, group: group).present(issuable_subject: project) }
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
require 'spec_helper' require 'spec_helper'
describe Ci::CreatePipelineService, '#execute' do describe Ci::CreatePipelineService, '#execute' do
set(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:ref_name) { 'master' } let(:ref_name) { 'master' }
let(:service) do let(:service) do
......
...@@ -5,12 +5,12 @@ require 'spec_helper' ...@@ -5,12 +5,12 @@ require 'spec_helper'
describe Ci::PipelineProcessing::AtomicProcessingService::StatusCollection do describe Ci::PipelineProcessing::AtomicProcessingService::StatusCollection do
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
set(:pipeline) { create(:ci_pipeline) } let_it_be(:pipeline) { create(:ci_pipeline) }
set(:build_a) { create(:ci_build, :success, name: 'build-a', stage: 'build', stage_idx: 0, pipeline: pipeline) } let_it_be(:build_a) { create(:ci_build, :success, name: 'build-a', stage: 'build', stage_idx: 0, pipeline: pipeline) }
set(:build_b) { create(:ci_build, :failed, name: 'build-b', stage: 'build', stage_idx: 0, pipeline: pipeline) } let_it_be(:build_b) { create(:ci_build, :failed, name: 'build-b', stage: 'build', stage_idx: 0, pipeline: pipeline) }
set(:test_a) { create(:ci_build, :running, name: 'test-a', stage: 'test', stage_idx: 1, pipeline: pipeline) } let_it_be(:test_a) { create(:ci_build, :running, name: 'test-a', stage: 'test', stage_idx: 1, pipeline: pipeline) }
set(:test_b) { create(:ci_build, :pending, name: 'test-b', stage: 'test', stage_idx: 1, pipeline: pipeline) } let_it_be(:test_b) { create(:ci_build, :pending, name: 'test-b', stage: 'test', stage_idx: 1, pipeline: pipeline) }
set(:deploy) { create(:ci_build, :created, name: 'deploy', stage: 'deploy', stage_idx: 2, pipeline: pipeline) } let_it_be(:deploy) { create(:ci_build, :created, name: 'deploy', stage: 'deploy', stage_idx: 2, pipeline: pipeline) }
let(:collection) { described_class.new(pipeline) } let(:collection) { described_class.new(pipeline) }
......
...@@ -7,9 +7,9 @@ describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_stor ...@@ -7,9 +7,9 @@ describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_stor
STAGES = ::Gitlab::Metrics::Dashboard::Stages STAGES = ::Gitlab::Metrics::Dashboard::Stages
set(:user) { create(:user) } let_it_be(:user) { create(:user) }
set(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
set(:environment) { create(:environment, project: project) } let_it_be(:environment) { create(:environment, project: project) }
describe '#execute' do describe '#execute' do
subject(:service_call) { described_class.new(project, user, params).execute } subject(:service_call) { described_class.new(project, user, params).execute }
......
...@@ -12369,6 +12369,13 @@ yargs@^7.0.0: ...@@ -12369,6 +12369,13 @@ yargs@^7.0.0:
y18n "^3.2.1" y18n "^3.2.1"
yargs-parser "^5.0.0" yargs-parser "^5.0.0"
yarn-check-webpack-plugin@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/yarn-check-webpack-plugin/-/yarn-check-webpack-plugin-1.2.0.tgz#0eb00cdcdb430f0494222a3eab1d2832737840cc"
integrity sha512-BKjFMmI2rsSxIVY6kXaYSpC/9rpfj/9Lm2armdJ+mYvCYuONfiK2+b9q6r8fYFEYJaB2Uv0hPuLvUvAwTVZ8Sg==
dependencies:
chalk "^2.4.2"
yarn-deduplicate@^1.1.1: yarn-deduplicate@^1.1.1:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/yarn-deduplicate/-/yarn-deduplicate-1.1.1.tgz#19b4a87654b66f55bf3a4bd6b153b4e4ab1b6e6d" resolved "https://registry.yarnpkg.com/yarn-deduplicate/-/yarn-deduplicate-1.1.1.tgz#19b4a87654b66f55bf3a4bd6b153b4e4ab1b6e6d"
......
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