Skip to content

Commit

Permalink
Merge branch 'master' into tests-sov2
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored May 31, 2021
2 parents 8ec2352 + af4b8e6 commit 16f732f
Show file tree
Hide file tree
Showing 4,741 changed files with 278,997 additions and 142,846 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts

ARG NODE_VERSION=14.16.1
ARG NODE_VERSION=14.17.0

FROM node:${NODE_VERSION} AS base

Expand Down
6 changes: 1 addition & 5 deletions .ci/Jenkinsfile_flaky
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ def agentProcess(Map params = [:]) {
]) {
task {
if (config.needBuild) {
if (!config.isXpack) {
kibanaPipeline.buildOss()
} else {
kibanaPipeline.buildXpack()
}
kibanaPipeline.buildKibana()
}

for(def i = 0; i < config.agentExecutions; i++) {
Expand Down
2 changes: 1 addition & 1 deletion .ci/Jenkinsfile_security_cypress
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kibanaPipeline(timeoutMinutes: 180) {
def job = 'xpack-securityCypress'

workers.ci(name: job, size: 'l', ramDisk: true) {
kibanaPipeline.bash('test/scripts/jenkins_xpack_build_kibana.sh', 'Build Default Distributable')
kibanaPipeline.bash('test/scripts/jenkins_build_kibana.sh', 'Build Distributable')
kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress_chrome.sh')()
// Temporarily disabled to figure out test flake
// kibanaPipeline.functionalTestProcess(job, 'test/scripts/jenkins_security_solution_cypress_firefox.sh')()
Expand Down
6 changes: 1 addition & 5 deletions .ci/es-snapshots/Jenkinsfile_verify_es
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,8 @@ kibanaPipeline(timeoutMinutes: 210) {
])

task {
kibanaPipeline.buildOss(6)
kibanaPipeline.buildKibana(16)
tasks.ossCiGroups()
}

task {
kibanaPipeline.buildXpack(10, true)
tasks.xpackCiGroups()
tasks.xpackCiGroupDocker()
}
Expand Down
29 changes: 29 additions & 0 deletions .ci/package-testing/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/groovy
library 'kibana-pipeline-library'
kibanaLibrary.load()
kibanaPipeline(timeoutMinutes: 300) {
slackNotifications.onFailure {
ciStats.trackBuild {
workers.ci(ramDisk: false, name: "package-build", size: 'l', runErrorReporter: false) {
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') {
kibanaPipeline.bash("test/scripts/jenkins_xpack_package_build.sh", "Package builds")
}
}
def packageTypes = ['deb', 'docker', 'rpm']
def workers = [:]
packageTypes.each { type ->
workers["package-${type}"] = {
testPackage(type)
}
}
parallel(workers)
}
}
}
def testPackage(packageType) {
workers.ci(ramDisk: false, name: "package-${packageType}", size: 's', runErrorReporter: false) {
withGcpServiceAccount.fromVaultSecret('secret/kibana-issues/dev/ci-artifacts-key', 'value') {
kibanaPipeline.bash("test/scripts/jenkins_xpack_package_${packageType}.sh", "Execute package testing for ${packageType}")
}
}
}
64 changes: 49 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,33 @@ module.exports = {
name: 'lodash/fp/assocPath',
message: 'Please use @elastic/safer-lodash-set instead',
},
{
name: 'lodash',
importNames: ['template'],
message:
'lodash.template is unsafe, and not compatible with our content security policy.',
},
{
name: 'lodash.template',
message:
'lodash.template is unsafe, and not compatible with our content security policy.',
},
{
name: 'lodash/template',
message:
'lodash.template is unsafe, and not compatible with our content security policy.',
},
{
name: 'lodash/fp',
importNames: ['template'],
message:
'lodash.template is unsafe, and not compatible with our content security policy.',
},
{
name: 'lodash/fp/template',
message:
'lodash.template is unsafe, and not compatible with our content security policy.',
},
{
name: 'react-use',
message: 'Please use react-use/lib/{method} instead.',
Expand All @@ -730,6 +757,11 @@ module.exports = {
name: 'lodash.setwith',
message: 'Please use @elastic/safer-lodash-set instead',
},
{
name: 'lodash.template',
message:
'lodash.template is unsafe, and not compatible with our content security policy.',
},
{
name: 'lodash/set',
message: 'Please use @elastic/safer-lodash-set instead',
Expand All @@ -738,6 +770,11 @@ module.exports = {
name: 'lodash/setWith',
message: 'Please use @elastic/safer-lodash-set instead',
},
{
name: 'lodash/template',
message:
'lodash.template is unsafe, and not compatible with our content security policy.',
},
],
},
],
Expand All @@ -753,6 +790,18 @@ module.exports = {
property: 'set',
message: 'Please use @elastic/safer-lodash-set instead',
},
{
object: 'lodash',
property: 'template',
message:
'lodash.template is unsafe, and not compatible with our content security policy.',
},
{
object: '_',
property: 'template',
message:
'lodash.template is unsafe, and not compatible with our content security policy.',
},
{
object: 'lodash',
property: 'setWith',
Expand Down Expand Up @@ -1576,20 +1625,5 @@ module.exports = {
'@typescript-eslint/prefer-ts-expect-error': 'error',
},
},
{
files: [
'**/public/**/*.{js,mjs,ts,tsx}',
'**/common/**/*.{js,mjs,ts,tsx}',
'packages/**/*.{js,mjs,ts,tsx}',
],
rules: {
'no-restricted-imports': [
'error',
{
patterns: ['lodash/*', '!lodash/fp', 'rxjs/internal-compatibility'],
},
],
},
},
],
};
7 changes: 2 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@
/x-pack/plugins/apm/server/projections/rum_page_load_transactions.ts @elastic/uptime
/x-pack/test/apm_api_integration/tests/csm/ @elastic/uptime

# Beats
/x-pack/plugins/beats_management/ @elastic/beats
#CC# /x-pack/plugins/beats_management/ @elastic/beats

# Presentation
/src/plugins/dashboard/ @elastic/kibana-presentation
Expand Down Expand Up @@ -150,6 +147,7 @@
#CC# /x-pack/plugins/file_upload @elastic/kibana-gis
/src/plugins/tile_map/ @elastic/kibana-gis
/src/plugins/region_map/ @elastic/kibana-gis
/packages/kbn-mapbox-gl @elastic/kibana-gis

# Operations
/src/dev/ @elastic/kibana-operations
Expand Down Expand Up @@ -188,6 +186,7 @@
/src/core/ @elastic/kibana-core
/src/plugins/saved_objects_tagging_oss @elastic/kibana-core
/config/kibana.yml @elastic/kibana-core
/x-pack/plugins/banners/ @elastic/kibana-core
/x-pack/plugins/features/ @elastic/kibana-core
/x-pack/plugins/licensing/ @elastic/kibana-core
/x-pack/plugins/global_search/ @elastic/kibana-core
Expand All @@ -202,7 +201,6 @@
/packages/kbn-legacy-logging/ @elastic/kibana-core
/packages/kbn-crypto/ @elastic/kibana-core
/packages/kbn-http-tools/ @elastic/kibana-core
/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
Expand All @@ -214,7 +212,6 @@
#CC# /src/plugins/legacy_export/ @elastic/kibana-core
#CC# /src/plugins/xpack_legacy/ @elastic/kibana-core
#CC# /src/plugins/saved_objects/ @elastic/kibana-core
#CC# /src/plugins/status_page/ @elastic/kibana-core
#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
Expand Down
16 changes: 13 additions & 3 deletions .github/ISSUE_TEMPLATE/v8_breaking_change.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ assignees: ''
****************************************
Please add a team label to denote the team that the
breaking change is applicable to.
breaking change is applicable to. If the work requires
changes to Upgrade Assistant itself, please tag Team:Elasticsearch UI.
-->

Expand All @@ -23,14 +24,20 @@ breaking change is applicable to.

8.0

**Is this a Kibana or Elasticsearch breaking change?**

<!-- Kibana breaking changes can be registered via the Kibana deprecations service. Elasticsearch breaking changes may require custom logic in Upgrade Assistant and assistance from the Elasticsearch UI team. See more details below. -->

**Describe the change. How will it manifest to users?**

**How many users will be affected?**

<!-- e.g. Based on telemetry data, roughly 75% of our users will need to make changes to x. -->
<!-- e.g. A majority of users will need to make changes to x. -->

**Can the change be registered with the [Kibana deprecation service](https://github.com/elastic/kibana/blob/master/docs/development/core/server/kibana-plugin-core-server.deprecationsservicesetup.md)?**
**Are there any edge cases?**

**[For Kibana deprecations] Can the change be registered with the [Kibana deprecation service](https://github.com/elastic/kibana/blob/master/docs/development/core/server/kibana-plugin-core-server.deprecationsservicesetup.md)?**

<!-- The deprecation service is consumed by the Upgrade Assistant to surface Kibana deprecations.
It provides a way for Kibana deprecations to be resolved automatically via an API
Expand All @@ -39,8 +46,11 @@ breaking change is applicable to.
<!-- Each plugin owner is responsible for registering their deprecations via the service.
Please link to the issue/PR that will add this functionality. -->

**Are there any edge cases?**
**[For Elasticsearch deprecations] Can the Upgrade Assistant make the migration easier for users? Please explain the proposed solution in as much detail as possible.**

<!-- Upgrade Assistant consumes the ES deprecation info API to surface deprecations to users. In some cases, Upgrade Assistant can provide a way to resolve a particular deprecation returned from the API. Examples include: reindexing an old index, removing deprecated index settings, upgrading or deleting an old Machine Learning model snapshot. -->

<!-- Please provide a detailed explanation on how you foresee the proposed "fix" to work, e.g., "The deprecation will be surfaced via XXX message in the deprecation info API. Upgrade Assistant can call XXX API to resolve this deprecation". See https://github.com/elastic/kibana/issues/91879 as a real-world example. -->
## Test Data

<!-- Provide test data. We can’t build a solution without data to test it against. -->
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ npm-debug.log*
.ci/runbld
.ci/bash_standard_lib.sh
.gradle
.vagrant

## @cypress/snapshot from apm plugin
snapshots.js
Expand Down
15 changes: 3 additions & 12 deletions .i18nrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"paths": {
"common.ui": "src/legacy/ui",
"console": "src/plugins/console",
"core": "src/core",
"discover": "src/plugins/discover",
Expand All @@ -22,10 +21,8 @@
"interpreter": "src/legacy/core_plugins/interpreter",
"kbn": "src/legacy/core_plugins/kibana",
"kbnDocViews": "src/legacy/core_plugins/kbn_doc_views",
"management": [
"src/legacy/core_plugins/management",
"src/plugins/management"
],
"lists": "packages/kbn-securitysolution-list-utils/src",
"management": ["src/legacy/core_plugins/management", "src/plugins/management"],
"maps_legacy": "src/plugins/maps_legacy",
"monaco": "packages/kbn-monaco/src",
"presentationUtil": "src/plugins/presentation_util",
Expand All @@ -45,10 +42,7 @@
"security": "src/plugins/security_oss",
"server": "src/legacy/server",
"statusPage": "src/legacy/core_plugins/status_page",
"telemetry": [
"src/plugins/telemetry",
"src/plugins/telemetry_management_section"
],
"telemetry": ["src/plugins/telemetry", "src/plugins/telemetry_management_section"],
"tileMap": "src/plugins/tile_map",
"timelion": ["src/plugins/timelion", "src/plugins/vis_type_timelion"],
"uiActions": "src/plugins/ui_actions",
Expand All @@ -66,8 +60,5 @@
"apmOss": "src/plugins/apm_oss",
"usageCollection": "src/plugins/usage_collection"
},
"exclude": [
"src/legacy/ui/ui_render/ui_render_mixin.js"
],
"translations": []
}
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.16.1
14.17.0
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.16.1
14.17.0
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ kibanaLibrary.load()
kibanaPipeline(timeoutMinutes: 210, checkPrChanges: true, setCommitStatus: true) {
slackNotifications.onFailure(disabled: !params.NOTIFY_ON_FAILURE) {
githubPr.withDefaultPrComments {
ciStats.trackBuild(requireSuccess: githubPr.isPr()) {
ciStats.trackBuild(requireSuccess: githubPr.isTrackedBranchPr()) {
catchError {
retryable.enable()
kibanaPipeline.allCiTasks()
Expand Down
4 changes: 2 additions & 2 deletions STYLEGUIDE.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: kibStyleGuide
slug: /kibana-dev-docs/styleguide
title: StyleGuide
title: Style Guide
summary: JavaScript/TypeScript styleguide.
date: 2021-05-06
tags: ['kibana', 'onboarding', 'dev', 'styleguide', 'typescript', 'javascript']
Expand Down Expand Up @@ -680,7 +680,7 @@ Using `react-component` means adding a bunch of components into angular, while `
### Action function names and prop function names
Name action functions in the form of a strong verb and passed properties in the form of on<Subject><Change>. E.g:
Name action functions in the form of a strong verb and passed properties in the form of `on<Subject><Change>`. E.g:
```jsx
<sort-button onClick={action.sort}/>
Expand Down
18 changes: 9 additions & 9 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch Node.js rules
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "65067dcad93a61deb593be7d3d9a32a4577d09665536d8da536d731da5cd15e2",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.4.2/rules_nodejs-3.4.2.tar.gz"],
sha256 = "10f534e1c80f795cffe1f2822becd4897754d18564612510c59b3c73544ae7c6",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.5.0/rules_nodejs-3.5.0.tar.gz"],
)

# Now that we have the rules let's import from them to complete the work
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")

# Assure we have at least a given rules_nodejs version
check_rules_nodejs_version(minimum_version_string = "3.4.2")
check_rules_nodejs_version(minimum_version_string = "3.5.0")

# Setup the Node.js toolchain for the architectures we want to support
#
Expand All @@ -27,13 +27,13 @@ check_rules_nodejs_version(minimum_version_string = "3.4.2")
# we can update that rule.
node_repositories(
node_repositories = {
"14.16.1-darwin_amd64": ("node-v14.16.1-darwin-x64.tar.gz", "node-v14.16.1-darwin-x64", "b762b72fc149629b7e394ea9b75a093cad709a9f2f71480942945d8da0fc1218"),
"14.16.1-linux_arm64": ("node-v14.16.1-linux-arm64.tar.xz", "node-v14.16.1-linux-arm64", "b4d474e79f7d33b3b4430fad25c3f836b82ce2d5bb30d4a2c9fa20df027e40da"),
"14.16.1-linux_s390x": ("node-v14.16.1-linux-s390x.tar.xz", "node-v14.16.1-linux-s390x", "af9982fef32e4a3e4a5d66741dcf30ac9c27613bd73582fa1dae1fb25003047a"),
"14.16.1-linux_amd64": ("node-v14.16.1-linux-x64.tar.xz", "node-v14.16.1-linux-x64", "85a89d2f68855282c87851c882d4c4bbea4cd7f888f603722f0240a6e53d89df"),
"14.16.1-windows_amd64": ("node-v14.16.1-win-x64.zip", "node-v14.16.1-win-x64", "e469db37b4df74627842d809566c651042d86f0e6006688f0f5fe3532c6dfa41"),
"14.17.0-darwin_amd64": ("node-v14.17.0-darwin-x64.tar.gz", "node-v14.17.0-darwin-x64", "7b210652e11d1ee25650c164cf32381895e1dcb3e0ff1d0841d8abc1f47ac73e"),
"14.17.0-linux_arm64": ("node-v14.17.0-linux-arm64.tar.xz", "node-v14.17.0-linux-arm64", "712e5575cee20570a0a56f4d4b4572cb0f2ee2f4bce49433de18be0393e7df22"),
"14.17.0-linux_s390x": ("node-v14.17.0-linux-s390x.tar.xz", "node-v14.17.0-linux-s390x", "6419372b9e9ad37e0bce188dc5740f2f060aaa44454418e462b4088a310a1c0b"),
"14.17.0-linux_amd64": ("node-v14.17.0-linux-x64.tar.xz", "node-v14.17.0-linux-x64", "494b161759a3d19c70e3172d33ce1918dd8df9ad20d29d1652a8387a84e2d308"),
"14.17.0-windows_amd64": ("node-v14.17.0-win-x64.zip", "node-v14.17.0-win-x64", "6582a7259c433e9f667dcc4ed3e5d68bc514caba2eed40e4626c8b4c7e5ecd5c"),
},
node_version = "14.16.1",
node_version = "14.17.0",
node_urls = [
"https://nodejs.org/dist/v{version}/{filename}",
],
Expand Down
Loading

0 comments on commit 16f732f

Please sign in to comment.