Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into es_client_mig…
Browse files Browse the repository at this point in the history
…ration/painless_lab
  • Loading branch information
alisonelizabeth committed Jan 20, 2021
2 parents 41b5f53 + ad8589e commit f8bb120
Show file tree
Hide file tree
Showing 8,705 changed files with 80,114 additions and 135,692 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
29 changes: 8 additions & 21 deletions .ci/Jenkinsfile_flaky
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ kibanaLibrary.load()

def CI_GROUP_PARAM = params.CI_GROUP

// Looks like 'oss:ciGroup:1', 'oss:firefoxSmoke', or 'all:serverMocha'
// Looks like 'oss:ciGroup:1', 'oss:firefoxSmoke'
def JOB_PARTS = CI_GROUP_PARAM.split(':')
def IS_XPACK = JOB_PARTS[0] == 'xpack'
def JOB = JOB_PARTS[1]
def NEED_BUILD = JOB != 'serverMocha'
def CI_GROUP = JOB_PARTS.size() > 2 ? JOB_PARTS[2] : ''
def EXECUTIONS = params.NUMBER_EXECUTIONS.toInteger()
def AGENT_COUNT = getAgentCount(EXECUTIONS)
Expand All @@ -31,15 +30,13 @@ kibanaPipeline(timeoutMinutes: 180) {
print "Agent ${agentNumberInside} - ${agentExecutions} executions"

workers.functional('flaky-test-runner', {
if (NEED_BUILD) {
if (!IS_XPACK) {
kibanaPipeline.buildOss()
if (CI_GROUP == '1') {
runbld("./test/scripts/jenkins_build_kbn_sample_panel_action.sh", "Build kbn tp sample panel action for ciGroup1")
}
} else {
kibanaPipeline.buildXpack()
if (!IS_XPACK) {
kibanaPipeline.buildOss()
if (CI_GROUP == '1') {
runbld("./test/scripts/jenkins_build_kbn_sample_panel_action.sh", "Build kbn tp sample panel action for ciGroup1")
}
} else {
kibanaPipeline.buildXpack()
}
}, getWorkerMap(agentNumberInside, agentExecutions, worker, workerFailures))()
}
Expand All @@ -60,17 +57,7 @@ kibanaPipeline(timeoutMinutes: 180) {

def getWorkerFromParams(isXpack, job, ciGroup) {
if (!isXpack) {
if (job == 'serverMocha') {
return kibanaPipeline.functionalTestProcess('serverMocha', {
kibanaPipeline.bash(
"""
source src/dev/ci_setup/setup_env.sh
node scripts/mocha
""",
"run `node scripts/mocha`"
)
})
} else if (job == 'accessibility') {
if (job == 'accessibility') {
return kibanaPipeline.functionalTestProcess('kibana-accessibility', './test/scripts/jenkins_accessibility.sh')
} else if (job == 'firefoxSmoke') {
return kibanaPipeline.functionalTestProcess('firefoxSmoke', './test/scripts/jenkins_firefox_smoke.sh')
Expand Down
2 changes: 2 additions & 0 deletions .ci/es-snapshots/Jenkinsfile_verify_es
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ kibanaPipeline(timeoutMinutes: 150) {
'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9),
'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
'xpack-ciGroup11': kibanaPipeline.xpackCiGroupProcess(11),
'xpack-ciGroup12': kibanaPipeline.xpackCiGroupProcess(12),
'xpack-ciGroup13': kibanaPipeline.xpackCiGroupProcess(13),
]),
])
}
Expand Down
2 changes: 2 additions & 0 deletions .ci/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ JOB:
- x-pack-ciGroup9
- x-pack-ciGroup10
- x-pack-ciGroup11
- x-pack-ciGroup12
- x-pack-ciGroup13
- x-pack-accessibility
- x-pack-visualRegression

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -euo pipefail

source "$(dirname "${0}")/../util.sh"

checks-reporter-with-killswitch "Lint: sasslint" \
node scripts/sasslint
checks-reporter-with-killswitch "Lint: stylelint" \
node scripts/stylelint
8 changes: 0 additions & 8 deletions .ci/teamcity/tests/mocha.sh

This file was deleted.

89 changes: 61 additions & 28 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* and the Server Side Public License, v 1; you may not use this file except in
* compliance with, at your election, the Elastic License or the Server Side
* Public License, v 1.
*/

const APACHE_2_0_LICENSE_HEADER = `
Expand All @@ -38,6 +27,16 @@ const APACHE_2_0_LICENSE_HEADER = `
*/
`;

const DUAL_LICENSE_HEADER = `
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* and the Server Side Public License, v 1; you may not use this file except in
* compliance with, at your election, the Elastic License or the Server Side
* Public License, v 1.
*/
`;

const ELASTIC_LICENSE_HEADER = `
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
Expand Down Expand Up @@ -71,11 +70,6 @@ const SAFER_LODASH_SET_DEFINITELYTYPED_HEADER = `
*/
`;

const allMochaRulesOff = {};
Object.keys(require('eslint-plugin-mocha').rules).forEach((k) => {
allMochaRulesOff['mocha/' + k] = 'off';
});

module.exports = {
root: true,

Expand Down Expand Up @@ -118,12 +112,47 @@ module.exports = {
},

/**
* Files that require Apache 2.0 headers, settings
* Files that require dual-license headers, settings
* are overridden below for files that require Elastic
* Licence headers
*/
{
files: ['**/*.{js,mjs,ts,tsx}', '!plugins/**/*'],
files: [
'**/*.{js,mjs,ts,tsx}',
'!plugins/**/*',
'!packages/elastic-datemath/**/*',
'!packages/elastic-eslint-config-kibana/**/*',
],
rules: {
'@kbn/eslint/require-license-header': [
'error',
{
license: DUAL_LICENSE_HEADER,
},
],
'@kbn/eslint/disallow-license-headers': [
'error',
{
licenses: [
APACHE_2_0_LICENSE_HEADER,
ELASTIC_LICENSE_HEADER,
SAFER_LODASH_SET_HEADER,
SAFER_LODASH_SET_LODASH_HEADER,
SAFER_LODASH_SET_DEFINITELYTYPED_HEADER,
],
},
],
},
},

/**
* Files that require Apache headers
*/
{
files: [
'packages/elastic-datemath/**/*.{js,mjs,ts,tsx}',
'packages/elastic-eslint-config-kibana/**/*.{js,mjs,ts,tsx}',
],
rules: {
'@kbn/eslint/require-license-header': [
'error',
Expand All @@ -135,6 +164,7 @@ module.exports = {
'error',
{
licenses: [
DUAL_LICENSE_HEADER,
ELASTIC_LICENSE_HEADER,
SAFER_LODASH_SET_HEADER,
SAFER_LODASH_SET_LODASH_HEADER,
Expand All @@ -156,7 +186,7 @@ module.exports = {
},

/**
* Files that require Elastic license headers instead of Apache 2.0 header
* Files that require Elastic license headers instead of dual-license header
*/
{
files: ['x-pack/**/*.{js,mjs,ts,tsx}'],
Expand All @@ -171,6 +201,7 @@ module.exports = {
'error',
{
licenses: [
DUAL_LICENSE_HEADER,
APACHE_2_0_LICENSE_HEADER,
SAFER_LODASH_SET_HEADER,
SAFER_LODASH_SET_LODASH_HEADER,
Expand All @@ -197,6 +228,7 @@ module.exports = {
'error',
{
licenses: [
DUAL_LICENSE_HEADER,
ELASTIC_LICENSE_HEADER,
APACHE_2_0_LICENSE_HEADER,
SAFER_LODASH_SET_HEADER,
Expand All @@ -219,6 +251,7 @@ module.exports = {
'error',
{
licenses: [
DUAL_LICENSE_HEADER,
ELASTIC_LICENSE_HEADER,
APACHE_2_0_LICENSE_HEADER,
SAFER_LODASH_SET_LODASH_HEADER,
Expand All @@ -241,6 +274,7 @@ module.exports = {
'error',
{
licenses: [
DUAL_LICENSE_HEADER,
ELASTIC_LICENSE_HEADER,
APACHE_2_0_LICENSE_HEADER,
SAFER_LODASH_SET_HEADER,
Expand Down Expand Up @@ -542,7 +576,6 @@ module.exports = {
'packages/kbn-eslint-import-resolver-kibana/**/*.js',
'packages/kbn-eslint-plugin-eslint/**/*',
'x-pack/gulpfile.js',
'x-pack/dev-tools/mocha/setup_mocha.js',
'x-pack/scripts/*.js',
],
excludedFiles: ['**/integration_tests/**/*'],
Expand Down Expand Up @@ -574,7 +607,9 @@ module.exports = {
*/
{
files: ['test/harden/*.js', 'packages/elastic-safer-lodash-set/test/*.js'],
rules: allMochaRulesOff,
rules: {
'mocha/handle-done-callback': 'off',
},
},
{
files: ['**/*.{js,mjs,ts,tsx}'],
Expand Down Expand Up @@ -794,7 +829,6 @@ module.exports = {
files: ['x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}'],
plugins: ['eslint-plugin-node', 'react'],
env: {
mocha: true,
jest: true,
},
rules: {
Expand Down Expand Up @@ -930,7 +964,6 @@ module.exports = {
files: ['x-pack/plugins/lists/**/*.{js,mjs,ts,tsx}'],
plugins: ['eslint-plugin-node'],
env: {
mocha: true,
jest: true,
},
rules: {
Expand Down
29 changes: 11 additions & 18 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,6 @@
#CC# /x-pack/legacy/plugins/canvas/ @elastic/kibana-presentation
#CC# /x-pack/plugins/dashboard_mode @elastic/kibana-presentation

# Core UI
# Exclude tutorials folder for now because they are not owned by Kibana app and most will move out soon
/src/plugins/home/public @elastic/kibana-core-ui
/src/plugins/home/server/*.ts @elastic/kibana-core-ui
/src/plugins/home/server/services/ @elastic/kibana-core-ui
/src/plugins/kibana_overview/ @elastic/kibana-core-ui
/x-pack/plugins/global_search_bar/ @elastic/kibana-core-ui
#CC# /src/plugins/newsfeed @elastic/kibana-core-ui
#CC# /src/plugins/home/public @elastic/kibana-core-ui
#CC# /src/plugins/home/server/services/ @elastic/kibana-core-ui
#CC# /src/plugins/home/ @elastic/kibana-core-ui
#CC# /x-pack/plugins/global_search_providers/ @elastic/kibana-core-ui

# Observability UIs
/x-pack/plugins/infra/ @elastic/logs-metrics-ui
Expand Down Expand Up @@ -138,10 +126,6 @@
/x-pack/test/functional/apps/maps/ @elastic/kibana-gis
/x-pack/test/functional/es_archives/maps/ @elastic/kibana-gis
/x-pack/test/visual_regression/tests/maps/index.js @elastic/kibana-gis
/x-pack/plugins/stack_alerts/server/alert_types/geo_containment @elastic/kibana-gis
/x-pack/plugins/stack_alerts/public/alert_types/geo_containment @elastic/kibana-gis
/x-pack/plugins/stack_alerts/server/alert_types/geo_threshold @elastic/kibana-gis
/x-pack/plugins/stack_alerts/public/alert_types/geo_threshold @elastic/kibana-gis
#CC# /src/plugins/maps_legacy/ @elastic/kibana-gis
#CC# /src/plugins/maps_oss/ @elastic/kibana-gis
#CC# /x-pack/plugins/file_upload @elastic/kibana-gis
Expand Down Expand Up @@ -200,6 +184,11 @@
/src/plugins/status_page/ @elastic/kibana-core
/src/plugins/saved_objects_management/ @elastic/kibana-core
/src/dev/run_check_published_api_changes.ts @elastic/kibana-core
/src/plugins/home/public @elastic/kibana-core
/src/plugins/home/server/*.ts @elastic/kibana-core
/src/plugins/home/server/services/ @elastic/kibana-core
/src/plugins/kibana_overview/ @elastic/kibana-core
/x-pack/plugins/global_search_bar/ @elastic/kibana-core
#CC# /src/core/server/csp/ @elastic/kibana-core
#CC# /src/legacy/server/config/ @elastic/kibana-core
#CC# /src/legacy/server/http/ @elastic/kibana-core
Expand All @@ -210,6 +199,11 @@
#CC# /x-pack/plugins/cloud/ @elastic/kibana-core
#CC# /x-pack/plugins/features/ @elastic/kibana-core
#CC# /x-pack/plugins/global_search/ @elastic/kibana-core
#CC# /src/plugins/newsfeed @elastic/kibana-core
#CC# /src/plugins/home/public @elastic/kibana-core
#CC# /src/plugins/home/server/services/ @elastic/kibana-core
#CC# /src/plugins/home/ @elastic/kibana-core
#CC# /x-pack/plugins/global_search_providers/ @elastic/kibana-core

# Kibana Telemetry
/packages/kbn-analytics/ @elastic/kibana-core
Expand All @@ -236,7 +230,6 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
# Security
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-core
/src/plugins/security_oss/ @elastic/kibana-security
/src/plugins/spaces_oss/ @elastic/kibana-security
/test/security_functional/ @elastic/kibana-security
/x-pack/plugins/spaces/ @elastic/kibana-security
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
Expand All @@ -263,7 +256,7 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/ @elastic/kibana-alerting-services
/docs/user/alerting/ @elastic/kibana-alerting-services
/docs/management/alerting/ @elastic/kibana-alerting-services
#CC# /x-pack/plugins/stack_alerts/ @elastic/kibana-alerting-services
#CC# /x-pack/plugins/stack_alerts @elastic/kibana-alerting-services

# Enterprise Search
# Shared
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# use stylelint
*.scss
Loading

0 comments on commit f8bb120

Please sign in to comment.