Skip to content

Commit 2dd8a45

Browse files
Merge branch '7.x' into UAtouchups
2 parents 02f9d69 + 0f46bdc commit 2dd8a45

510 files changed

Lines changed: 34353 additions & 31531 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
steps:
2+
- block: ":gear: Performance Tests Configuration"
3+
prompt: "Fill out the details for performance test"
4+
fields:
5+
- text: ":arrows_counterclockwise: Iterations"
6+
key: "performance-test-iteration-count"
7+
hint: "How many times you want to run tests? "
8+
required: true
9+
if: build.env('ITERATION_COUNT_ENV') == null
10+
11+
- label: ":male-mechanic::skin-tone-2: Pre-Build"
12+
command: .buildkite/scripts/lifecycle/pre_build.sh
13+
14+
- wait
15+
16+
- label: ":factory_worker: Build Kibana Distribution and Plugins"
17+
command: .buildkite/scripts/steps/build_kibana.sh
18+
agents:
19+
queue: c2-16
20+
key: build
21+
22+
- label: ":muscle: Performance Tests"
23+
command: .buildkite/scripts/steps/functional/performance.sh
24+
agents:
25+
queue: ci-group-6
26+
depends_on: build
27+
concurrency: 50
28+
concurrency_group: 'performance-test-group'
29+
30+
- wait: ~
31+
continue_on_failure: true
32+
33+
- label: ":male_superhero::skin-tone-2: Post-Build"
34+
command: .buildkite/scripts/lifecycle/post_build.sh
35+

.buildkite/scripts/pipelines/pull_request/pipeline.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,20 @@ const uploadPipeline = (pipelineContent) => {
5555
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/base.yml', false));
5656

5757
if (
58-
await doAnyChangesMatch([
58+
(await doAnyChangesMatch([
5959
/^x-pack\/plugins\/security_solution/,
6060
/^x-pack\/test\/security_solution_cypress/,
6161
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/sections\/action_connector_form/,
6262
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/context\/actions_connectors_context\.tsx/,
63-
]) || process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
63+
])) ||
64+
process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
6465
) {
6566
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/security_solution.yml'));
6667
}
6768

68-
// Disabled for now, these are failing/disabled in Jenkins currently as well
6969
// if (
70-
// await doAnyChangesMatch([
71-
// /^x-pack\/plugins\/apm/,
72-
// ]) || process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
70+
// (await doAnyChangesMatch([/^x-pack\/plugins\/apm/])) ||
71+
// process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
7372
// ) {
7473
// pipeline.push(getPipeline('.buildkite/pipelines/pull_request/apm_cypress.yml'));
7574
// }
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
set -uo pipefail
4+
5+
if [ -z "${ITERATION_COUNT_ENV+x}" ]; then
6+
ITERATION_COUNT="$(buildkite-agent meta-data get performance-test-iteration-count)"
7+
else
8+
ITERATION_COUNT=$ITERATION_COUNT_ENV
9+
fi
10+
11+
tput setab 2; tput setaf 0; echo "Performance test will be run at ${BUILDKITE_BRANCH} ${ITERATION_COUNT} times"
12+
13+
cat << EOF | buildkite-agent pipeline upload
14+
steps:
15+
- command: .buildkite/scripts/steps/functional/performance_sub.sh
16+
parallelism: "$ITERATION_COUNT"
17+
EOF
18+
19+
20+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
source .buildkite/scripts/common/util.sh
6+
7+
.buildkite/scripts/bootstrap.sh
8+
.buildkite/scripts/download_build_artifacts.sh
9+
10+
cd "$XPACK_DIR"
11+
12+
echo --- Run Performance Tests
13+
checks-reporter-with-killswitch "Run Performance Tests" \
14+
node scripts/functional_tests \
15+
--debug --bail \
16+
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
17+
--config test/performance/config.ts;

.ci/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
22
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts
33

4-
ARG NODE_VERSION=14.17.6
4+
ARG NODE_VERSION=16.11.1
55

66
FROM node:${NODE_VERSION} AS base
77

@@ -10,7 +10,7 @@ RUN apt-get update && \
1010
libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \
1111
libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
1212
libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \
13-
libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget openjdk-8-jre && \
13+
libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget openjdk-11-jre && \
1414
rm -rf /var/lib/apt/lists/*
1515

1616
RUN curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \

.eslintrc.js

Lines changed: 92 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,78 @@ const DEV_PATTERNS = [
156156
'x-pack/plugins/*/server/scripts/**/*',
157157
];
158158

159+
/** Restricted imports with suggested alternatives */
160+
const RESTRICTED_IMPORTS = [
161+
{
162+
name: 'lodash',
163+
importNames: ['set', 'setWith'],
164+
message: 'Please use @elastic/safer-lodash-set instead',
165+
},
166+
{
167+
name: 'lodash.set',
168+
message: 'Please use @elastic/safer-lodash-set instead',
169+
},
170+
{
171+
name: 'lodash.setwith',
172+
message: 'Please use @elastic/safer-lodash-set instead',
173+
},
174+
{
175+
name: 'lodash/set',
176+
message: 'Please use @elastic/safer-lodash-set instead',
177+
},
178+
{
179+
name: 'lodash/setWith',
180+
message: 'Please use @elastic/safer-lodash-set instead',
181+
},
182+
{
183+
name: 'lodash/fp',
184+
importNames: ['set', 'setWith', 'assoc', 'assocPath'],
185+
message: 'Please use @elastic/safer-lodash-set instead',
186+
},
187+
{
188+
name: 'lodash/fp/set',
189+
message: 'Please use @elastic/safer-lodash-set instead',
190+
},
191+
{
192+
name: 'lodash/fp/setWith',
193+
message: 'Please use @elastic/safer-lodash-set instead',
194+
},
195+
{
196+
name: 'lodash/fp/assoc',
197+
message: 'Please use @elastic/safer-lodash-set instead',
198+
},
199+
{
200+
name: 'lodash/fp/assocPath',
201+
message: 'Please use @elastic/safer-lodash-set instead',
202+
},
203+
{
204+
name: 'lodash',
205+
importNames: ['template'],
206+
message: 'lodash.template is unsafe, and not compatible with our content security policy.',
207+
},
208+
{
209+
name: 'lodash.template',
210+
message: 'lodash.template is unsafe, and not compatible with our content security policy.',
211+
},
212+
{
213+
name: 'lodash/template',
214+
message: 'lodash.template is unsafe, and not compatible with our content security policy.',
215+
},
216+
{
217+
name: 'lodash/fp',
218+
importNames: ['template'],
219+
message: 'lodash.template is unsafe, and not compatible with our content security policy.',
220+
},
221+
{
222+
name: 'lodash/fp/template',
223+
message: 'lodash.template is unsafe, and not compatible with our content security policy.',
224+
},
225+
{
226+
name: 'react-use',
227+
message: 'Please use react-use/lib/{method} instead.',
228+
},
229+
];
230+
159231
module.exports = {
160232
root: true,
161233

@@ -671,81 +743,7 @@ module.exports = {
671743
'no-restricted-imports': [
672744
2,
673745
{
674-
paths: [
675-
{
676-
name: 'lodash',
677-
importNames: ['set', 'setWith'],
678-
message: 'Please use @elastic/safer-lodash-set instead',
679-
},
680-
{
681-
name: 'lodash.set',
682-
message: 'Please use @elastic/safer-lodash-set instead',
683-
},
684-
{
685-
name: 'lodash.setwith',
686-
message: 'Please use @elastic/safer-lodash-set instead',
687-
},
688-
{
689-
name: 'lodash/set',
690-
message: 'Please use @elastic/safer-lodash-set instead',
691-
},
692-
{
693-
name: 'lodash/setWith',
694-
message: 'Please use @elastic/safer-lodash-set instead',
695-
},
696-
{
697-
name: 'lodash/fp',
698-
importNames: ['set', 'setWith', 'assoc', 'assocPath'],
699-
message: 'Please use @elastic/safer-lodash-set instead',
700-
},
701-
{
702-
name: 'lodash/fp/set',
703-
message: 'Please use @elastic/safer-lodash-set instead',
704-
},
705-
{
706-
name: 'lodash/fp/setWith',
707-
message: 'Please use @elastic/safer-lodash-set instead',
708-
},
709-
{
710-
name: 'lodash/fp/assoc',
711-
message: 'Please use @elastic/safer-lodash-set instead',
712-
},
713-
{
714-
name: 'lodash/fp/assocPath',
715-
message: 'Please use @elastic/safer-lodash-set instead',
716-
},
717-
{
718-
name: 'lodash',
719-
importNames: ['template'],
720-
message:
721-
'lodash.template is unsafe, and not compatible with our content security policy.',
722-
},
723-
{
724-
name: 'lodash.template',
725-
message:
726-
'lodash.template is unsafe, and not compatible with our content security policy.',
727-
},
728-
{
729-
name: 'lodash/template',
730-
message:
731-
'lodash.template is unsafe, and not compatible with our content security policy.',
732-
},
733-
{
734-
name: 'lodash/fp',
735-
importNames: ['template'],
736-
message:
737-
'lodash.template is unsafe, and not compatible with our content security policy.',
738-
},
739-
{
740-
name: 'lodash/fp/template',
741-
message:
742-
'lodash.template is unsafe, and not compatible with our content security policy.',
743-
},
744-
{
745-
name: 'react-use',
746-
message: 'Please use react-use/lib/{method} instead.',
747-
},
748-
],
746+
paths: RESTRICTED_IMPORTS,
749747
},
750748
],
751749
'no-restricted-modules': [
@@ -838,6 +836,23 @@ module.exports = {
838836
],
839837
},
840838
},
839+
{
840+
files: ['**/common/**/*.{js,mjs,ts,tsx}', '**/public/**/*.{js,mjs,ts,tsx}'],
841+
rules: {
842+
'no-restricted-imports': [
843+
2,
844+
{
845+
paths: [
846+
...RESTRICTED_IMPORTS,
847+
{
848+
name: 'semver',
849+
message: 'Please use "semver/*/{function}" instead',
850+
},
851+
],
852+
},
853+
],
854+
},
855+
},
841856

842857
/**
843858
* APM and Observability overrides
@@ -1585,8 +1600,8 @@ module.exports = {
15851600
plugins: ['react', '@typescript-eslint'],
15861601
files: ['x-pack/plugins/osquery/**/*.{js,mjs,ts,tsx}'],
15871602
rules: {
1588-
// 'arrow-body-style': ['error', 'as-needed'],
1589-
// 'prefer-arrow-callback': 'error',
1603+
'arrow-body-style': ['error', 'as-needed'],
1604+
'prefer-arrow-callback': 'error',
15901605
'no-unused-vars': 'off',
15911606
'react/prop-types': 'off',
15921607
'@typescript-eslint/explicit-module-boundary-types': 'off',

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.17.6
1+
16.11.1

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.17.6
1+
16.11.1

WORKSPACE.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ check_rules_nodejs_version(minimum_version_string = "3.8.0")
2727
# we can update that rule.
2828
node_repositories(
2929
node_repositories = {
30-
"14.17.6-darwin_amd64": ("node-v14.17.6-darwin-x64.tar.gz", "node-v14.17.6-darwin-x64", "e3e4c02240d74fb1dc8a514daa62e5de04f7eaee0bcbca06a366ece73a52ad88"),
31-
"14.17.6-linux_arm64": ("node-v14.17.6-linux-arm64.tar.xz", "node-v14.17.6-linux-arm64", "9c4f3a651e03cd9b5bddd33a80e8be6a6eb15e518513e410bb0852a658699156"),
32-
"14.17.6-linux_s390x": ("node-v14.17.6-linux-s390x.tar.xz", "node-v14.17.6-linux-s390x", "3677f35b97608056013b5368f86eecdb044bdccc1b3976c1d4448736c37b6a0c"),
33-
"14.17.6-linux_amd64": ("node-v14.17.6-linux-x64.tar.xz", "node-v14.17.6-linux-x64", "3bbe4faf356738d88b45be222bf5e858330541ff16bd0d4cfad36540c331461b"),
34-
"14.17.6-windows_amd64": ("node-v14.17.6-win-x64.zip", "node-v14.17.6-win-x64", "b83e9ce542fda7fc519cec6eb24a2575a84862ea4227dedc171a8e0b5b614ac0"),
30+
"16.11.1-darwin_amd64": ("node-v16.11.1-darwin-x64.tar.gz", "node-v16.11.1-darwin-x64", "ba54b8ed504bd934d03eb860fefe991419b4209824280d4274f6a911588b5e45"),
31+
"16.11.1-linux_arm64": ("node-v16.11.1-linux-arm64.tar.xz", "node-v16.11.1-linux-arm64", "083fc51f0ea26de9041aaf9821874651a9fd3b20d1cf57071ce6b523a0436f17"),
32+
"16.11.1-linux_s390x": ("node-v16.11.1-linux-s390x.tar.xz", "node-v16.11.1-linux-s390x", "855b5c83c2ccb05273d50bb04376335c68d47df57f3187cdebe1f22b972d2825"),
33+
"16.11.1-linux_amd64": ("node-v16.11.1-linux-x64.tar.xz", "node-v16.11.1-linux-x64", "493bcc9b660eff983a6de65a0f032eb2717f57207edf74c745bcb86e360310b3"),
34+
"16.11.1-windows_amd64": ("node-v16.11.1-win-x64.zip", "node-v16.11.1-win-x64", "4d3c179b82d42e66e321c3948a4e332ed78592917a69d38b86e3a242d7e62fb7"),
3535
},
36-
node_version = "14.17.6",
36+
node_version = "16.11.1",
3737
node_urls = [
3838
"https://nodejs.org/dist/v{version}/{filename}",
3939
],

config/node.options

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44

55
## max size of old space in megabytes
66
#--max-old-space-size=4096
7+
8+
## do not terminate process on unhandled promise rejection
9+
--unhandled-rejections=warn

0 commit comments

Comments
 (0)