Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into prevent-public-im…
Browse files Browse the repository at this point in the history
…port
  • Loading branch information
Tyler Smalley committed Jun 9, 2020
2 parents 6675b80 + f4cfa49 commit f172882
Show file tree
Hide file tree
Showing 6,664 changed files with 234,423 additions and 162,864 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
18 changes: 16 additions & 2 deletions .ci/Jenkinsfile_coverage
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ kibanaPipeline(timeoutMinutes: 240) {
'CODE_COVERAGE=1', // Enables coverage. Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
]) {
workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) {
kibanaCoverage.runTests()
handleIngestion(TIME_STAMP)
catchError {
kibanaCoverage.runTests()
handleIngestion(TIME_STAMP)
}
handleFail()
}
}
kibanaPipeline.sendMail()
Expand All @@ -23,8 +26,19 @@ def handleIngestion(timestamp) {
kibanaPipeline.downloadCoverageArtifacts()
kibanaCoverage.prokLinks("### Process HTML Links")
kibanaCoverage.collectVcsInfo("### Collect VCS Info")
kibanaCoverage.generateReports("### Merge coverage reports")
kibanaCoverage.uploadCombinedReports()
kibanaCoverage.ingest(timestamp, '### Injest && Upload')
kibanaCoverage.uploadCoverageStaticSite(timestamp)
}

def handleFail() {
def buildStatus = buildUtils.getBuildStatus()
if(params.NOTIFY_ON_FAILURE && buildStatus != 'SUCCESS' && buildStatus != 'ABORTED') {
slackNotifications.sendFailedBuild(
channel: '#kibana-qa',
username: 'Kibana QA'
)
}
}

6 changes: 5 additions & 1 deletion .ci/Jenkinsfile_flaky
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def getWorkerFromParams(isXpack, job, ciGroup) {
"run `node scripts/mocha`"
)
})
} else 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')
} else if(job == 'visualRegression') {
Expand All @@ -79,7 +81,9 @@ def getWorkerFromParams(isXpack, job, ciGroup) {
}
}

if (job == 'firefoxSmoke') {
if (job == 'accessibility') {
return kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh')
} else if (job == 'firefoxSmoke') {
return kibanaPipeline.functionalTestProcess('xpack-firefoxSmoke', './test/scripts/jenkins_xpack_firefox_smoke.sh')
} else if(job == 'visualRegression') {
return kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh')
Expand Down
57 changes: 13 additions & 44 deletions .ci/end2end.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ pipeline {
environment {
BASE_DIR = 'src/github.com/elastic/kibana'
HOME = "${env.WORKSPACE}"
APM_ITS = 'apm-integration-testing'
CYPRESS_DIR = 'x-pack/plugins/apm/e2e'
E2E_DIR = 'x-pack/plugins/apm/e2e'
PIPELINE_LOG_LEVEL = 'DEBUG'
}
options {
Expand Down Expand Up @@ -43,32 +42,6 @@ pipeline {
env.APM_UPDATED = isGitRegionMatch(patterns: regexps)
}
}
dir("${APM_ITS}"){
git changelog: false,
credentialsId: 'f6c7695a-671e-4f4f-a331-acdce44ff9ba',
poll: false,
url: "git@github.com:elastic/${APM_ITS}.git"
}
}
}
stage('Start services') {
options { skipDefaultCheckout() }
when {
anyOf {
expression { return params.FORCE }
expression { return env.APM_UPDATED != "false" }
}
}
steps {
notifyStatus('Starting services', 'PENDING')
dir("${APM_ITS}"){
sh './scripts/compose.py start master --no-kibana'
}
}
post {
unsuccessful {
notifyStatus('Environmental issue', 'FAILURE')
}
}
}
stage('Prepare Kibana') {
Expand All @@ -85,7 +58,7 @@ pipeline {
steps {
notifyStatus('Preparing kibana', 'PENDING')
dir("${BASE_DIR}"){
sh script: "${CYPRESS_DIR}/ci/prepare-kibana.sh"
sh "${E2E_DIR}/ci/prepare-kibana.sh"
}
}
post {
Expand All @@ -105,24 +78,20 @@ pipeline {
steps{
notifyStatus('Running smoke tests', 'PENDING')
dir("${BASE_DIR}"){
sh '''
jobs -l
docker build --tag cypress --build-arg NODE_VERSION=$(cat .node-version) ${CYPRESS_DIR}/ci
docker run --rm -t --user "$(id -u):$(id -g)" \
-v `pwd`:/app --network="host" \
--name cypress cypress'''
sh "${E2E_DIR}/ci/run-e2e.sh"
}
}
post {
always {
dir("${BASE_DIR}"){
archiveArtifacts(allowEmptyArchive: false, artifacts: "${CYPRESS_DIR}/**/screenshots/**,${CYPRESS_DIR}/**/videos/**,${CYPRESS_DIR}/**/test-results/*e2e-tests.xml")
junit(allowEmptyResults: true, testResults: "${CYPRESS_DIR}/**/test-results/*e2e-tests.xml")
}
dir("${APM_ITS}"){
sh 'docker-compose logs > apm-its.log || true'
sh 'docker-compose down -v || true'
archiveArtifacts(allowEmptyArchive: false, artifacts: 'apm-its.log')
dir("${BASE_DIR}/${E2E_DIR}"){
archiveArtifacts(allowEmptyArchive: false, artifacts: 'cypress/screenshots/**,cypress/videos/**,cypress/test-results/*e2e-tests.xml')
junit(allowEmptyResults: true, testResults: 'cypress/test-results/*e2e-tests.xml')
dir('tmp/apm-integration-testing'){
sh 'docker-compose logs > apm-its-docker.log || true'
sh 'docker-compose down -v || true'
archiveArtifacts(allowEmptyArchive: true, artifacts: 'apm-its-docker.log')
}
archiveArtifacts(allowEmptyArchive: true, artifacts: 'tmp/*.log')
}
}
unsuccessful {
Expand All @@ -137,7 +106,7 @@ pipeline {
post {
always {
dir("${BASE_DIR}"){
archiveArtifacts(allowEmptyArchive: true, artifacts: "${CYPRESS_DIR}/ingest-data.log,kibana.log")
archiveArtifacts(allowEmptyArchive: true, artifacts: "${E2E_DIR}/kibana.log")
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions .ci/es-snapshots/Jenkinsfile_verify_es
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def SNAPSHOT_MANIFEST = "https://storage.googleapis.com/kibana-ci-es-snapshots-d
kibanaPipeline(timeoutMinutes: 150) {
catchErrors {
slackNotifications.onFailure(
title: ":broken_heart: *<${env.BUILD_URL}|[${SNAPSHOT_VERSION}] ES Snapshot Verification Failure>*",
message: ":broken_heart: [${SNAPSHOT_VERSION}] ES Snapshot Verification Failure",
title: "*<${env.BUILD_URL}|[${SNAPSHOT_VERSION}] ES Snapshot Verification Failure>*",
message: "[${SNAPSHOT_VERSION}] ES Snapshot Verification Failure",
) {
retryable.enable(2)
withEnv(["ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}"]) {
Expand Down
14 changes: 7 additions & 7 deletions .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ mkdir -p ".geckodriver"
cp "node_modules/geckodriver/geckodriver.tar.gz" .geckodriver/geckodriver.tar.gz
echo "$geckodriverPkgVersion" > .geckodriver/pkgVersion

echo "Creating bootstrap_cache archive"

# archive cacheable directories
mkdir -p "$HOME/.kibana/bootstrap_cache"
tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \
node_modules \
packages/*/node_modules \
x-pack/node_modules \
x-pack/legacy/plugins/*/node_modules \
x-pack/legacy/plugins/reporting/.chromium \
test/plugin_functional/plugins/*/node_modules \
examples/*/node_modules \
x-pack/plugins/reporting/.chromium \
.es \
.chromedriver \
.geckodriver;

echo "Adding node_modules"
# Find all of the node_modules directories that aren't test fixtures, and aren't inside other node_modules directories, and append them to the tar
find . -type d -name node_modules -not -path '*__fixtures__*' -prune -print0 | xargs -0I % tar -rf "$HOME/.kibana/bootstrap_cache/$branch.tar" "%"

echo "created $HOME/.kibana/bootstrap_cache/$branch.tar"

if [ "$branch" == "master" ]; then
Expand Down
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/.es
/build
/built_assets
/config/apm.dev.js
/data
/html_docs
/optimize
Expand All @@ -25,7 +26,8 @@ target
/src/plugins/vis_type_timelion/public/_generated_/**
/src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.*
/x-pack/legacy/plugins/**/__tests__/fixtures/**
/x-pack/plugins/apm/e2e/cypress/**/snapshots.js
/x-pack/plugins/apm/e2e/**/snapshots.js
/x-pack/plugins/apm/e2e/tmp/*
/x-pack/plugins/canvas/canvas_plugin
/x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts
/x-pack/plugins/canvas/shareable_runtime/build
Expand Down
22 changes: 11 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ module.exports = {
{
files: ['x-pack/plugins/canvas/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
},
},
Expand Down Expand Up @@ -205,6 +204,11 @@ module.exports = {
from: ['(src|x-pack)/plugins/*/public/**/*'],
errorMessage: `Server code can not import from public, use a common directory.`,
},
{
target: ['(src|x-pack)/plugins/*/common/**/*'],
from: ['(src|x-pack)/plugins/*/(server|public)/**/*'],
errorMessage: `Common code can not import from server or public, use a common directory.`,
},
{
target: [
'(src|x-pack)/legacy/**/*',
Expand All @@ -223,7 +227,7 @@ module.exports = {
'!src/core/server/index.ts', // relative import
'!src/core/server/mocks{,.ts}',
'!src/core/server/types{,.ts}',
'!src/core/server/test_utils',
'!src/core/server/test_utils{,.ts}',
// for absolute imports until fixed in
// https://github.com/elastic/kibana/issues/36096
'!src/core/server/*.test.mocks{,.ts}',
Expand Down Expand Up @@ -585,11 +589,11 @@ module.exports = {
},

/**
* SIEM overrides
* Security Solution overrides
*/
{
// front end typescript and javascript files only
files: ['x-pack/plugins/siem/public/**/*.{js,ts,tsx}'],
files: ['x-pack/plugins/security_solution/public/**/*.{js,ts,tsx}'],
rules: {
'import/no-nodejs-modules': 'error',
'no-restricted-imports': [
Expand All @@ -603,7 +607,7 @@ module.exports = {
},
{
// typescript only for front and back end
files: ['x-pack/{,legacy/}plugins/siem/**/*.{ts,tsx}'],
files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{ts,tsx}'],
rules: {
// This will be turned on after bug fixes are complete
// '@typescript-eslint/explicit-member-accessibility': 'warn',
Expand Down Expand Up @@ -638,7 +642,7 @@ module.exports = {
// {
// // will introduced after the other warns are fixed
// // typescript and javascript for front end react performance
// files: ['x-pack/plugins/siem/public/**/!(*.test).{js,ts,tsx}'],
// files: ['x-pack/plugins/security_solution/public/**/!(*.test).{js,ts,tsx}'],
// plugins: ['react-perf'],
// rules: {
// // 'react-perf/jsx-no-new-object-as-prop': 'error',
Expand All @@ -649,7 +653,7 @@ module.exports = {
// },
{
// typescript and javascript for front and back end
files: ['x-pack/{,legacy/}plugins/siem/**/*.{js,ts,tsx}'],
files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{js,ts,tsx}'],
plugins: ['eslint-plugin-node', 'react'],
env: {
mocha: true,
Expand Down Expand Up @@ -756,10 +760,6 @@ module.exports = {
'react/jsx-no-target-blank': 'error',
'react/jsx-fragments': 'error',
'react/jsx-sort-default-props': 'error',
// might be introduced after the other warns are fixed
// 'react/jsx-sort-props': 'error',
// might be introduced after the other warns are fixed
'react-hooks/exhaustive-deps': 'off',
'require-atomic-updates': 'error',
'symbol-description': 'error',
'vars-on-top': 'error',
Expand Down
18 changes: 9 additions & 9 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
/x-pack/plugins/dashboard_enhanced/ @elastic/kibana-app
/x-pack/plugins/lens/ @elastic/kibana-app
/x-pack/plugins/graph/ @elastic/kibana-app
/src/legacy/server/url_shortening/ @elastic/kibana-app
/src/legacy/server/sample_data/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/dev_tools/ @elastic/kibana-app
/src/plugins/dashboard/ @elastic/kibana-app
/src/plugins/discover/ @elastic/kibana-app
/src/plugins/input_control_vis/ @elastic/kibana-app
Expand Down Expand Up @@ -37,9 +34,11 @@
/src/legacy/core_plugins/kibana/public/home/np_ready/ @elastic/kibana-core-ui

# App Architecture
/examples/developer_examples/ @elastic/kibana-app-arch
/examples/url_generators_examples/ @elastic/kibana-app-arch
/examples/url_generators_explorer/ @elastic/kibana-app-arch
/packages/kbn-interpreter/ @elastic/kibana-app-arch
/packages/elastic-datemath/ @elastic/kibana-app-arch
/src/legacy/core_plugins/embeddable_api/ @elastic/kibana-app-arch
/src/legacy/core_plugins/interpreter/ @elastic/kibana-app-arch
/src/legacy/core_plugins/kibana_react/ @elastic/kibana-app-arch
Expand Down Expand Up @@ -142,6 +141,8 @@
/config/kibana.yml @elastic/kibana-platform
/x-pack/plugins/features/ @elastic/kibana-platform
/x-pack/plugins/licensing/ @elastic/kibana-platform
/x-pack/plugins/global_search/ @elastic/kibana-platform
/x-pack/plugins/cloud/ @elastic/kibana-platform
/packages/kbn-config-schema/ @elastic/kibana-platform
/src/legacy/server/config/ @elastic/kibana-platform
/src/legacy/server/http/ @elastic/kibana-platform
Expand All @@ -157,7 +158,6 @@
/x-pack/legacy/plugins/security/ @elastic/kibana-security
/x-pack/legacy/plugins/spaces/ @elastic/kibana-security
/x-pack/plugins/spaces/ @elastic/kibana-security
/x-pack/legacy/plugins/encrypted_saved_objects/ @elastic/kibana-security
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
/x-pack/plugins/security/ @elastic/kibana-security
/x-pack/test/api_integration/apis/security/ @elastic/kibana-security
Expand All @@ -179,7 +179,7 @@
/x-pack/plugins/telemetry_collection_xpack/ @elastic/pulse

# Kibana Alerting Services
/x-pack/plugins/alerting/ @elastic/kibana-alerting-services
/x-pack/plugins/alerts/ @elastic/kibana-alerting-services
/x-pack/plugins/actions/ @elastic/kibana-alerting-services
/x-pack/plugins/event_log/ @elastic/kibana-alerting-services
/x-pack/plugins/task_manager/ @elastic/kibana-alerting-services
Expand Down Expand Up @@ -228,12 +228,12 @@
/x-pack/test/plugin_functional/plugins/resolver_test/ @elastic/endpoint-app-team @elastic/siem
/x-pack/test/plugin_functional/test_suites/resolver/ @elastic/endpoint-app-team @elastic/siem

# SIEM
/x-pack/plugins/siem/ @elastic/siem @elastic/endpoint-app-team
# Security Solution
/x-pack/plugins/security_solution/ @elastic/siem @elastic/endpoint-app-team
/x-pack/test/detection_engine_api_integration @elastic/siem @elastic/endpoint-app-team
/x-pack/test/api_integration/apis/siem @elastic/siem @elastic/endpoint-app-team
/x-pack/test/api_integration/apis/security_solution @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/case @elastic/siem @elastic/endpoint-app-team
/x-pack/plugins/lists @elastic/siem @elastic/endpoint-app-team

# Security Intelligence And Analytics
/x-pack/plugins/siem/server/lib/detection_engine/rules/prepackaged_rules @elastic/security-intelligence-analytics
/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules @elastic/security-intelligence-analytics
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ package-lock.json
*.sublime-*
npm-debug.log*
.tern-project
x-pack/plugins/apm/tsconfig.json
apm.tsconfig.json
/x-pack/legacy/plugins/apm/e2e/snapshots.js
/x-pack/plugins/apm/e2e/snapshots.js
.nyc_output

# apm plugin
/x-pack/plugins/apm/tsconfig.json
apm.tsconfig.json
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.19.0
10.21.0
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.19.0
10.21.0
2 changes: 1 addition & 1 deletion .sass-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ files:
- 'src/legacy/core_plugins/timelion/**/*.s+(a|c)ss'
- 'src/plugins/vis_type_vislib/**/*.s+(a|c)ss'
- 'src/plugins/vis_type_xy/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/security/**/*.s+(a|c)ss'
- 'x-pack/plugins/canvas/**/*.s+(a|c)ss'
- 'x-pack/plugins/triggers_actions_ui/**/*.s+(a|c)ss'
- 'x-pack/plugins/lens/**/*.s+(a|c)ss'
- 'x-pack/plugins/cross_cluster_replication/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/maps/**/*.s+(a|c)ss'
- 'x-pack/plugins/maps/**/*.s+(a|c)ss'
- 'x-pack/plugins/spaces/**/*.s+(a|c)ss'
- 'x-pack/plugins/security/**/*.s+(a|c)ss'
ignore:
- 'x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss'
rules:
Expand Down
Loading

0 comments on commit f172882

Please sign in to comment.