Skip to content

Commit de88378

Browse files
authored
Merge branch 'main' into fix/198754
2 parents 2b4498c + 06cf554 commit de88378

2,906 files changed

Lines changed: 21822 additions & 10476 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.

.buildkite/ftr_platform_stateful_configs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ enabled:
178178
- x-pack/test/banners_functional/config.ts
179179
- x-pack/test/cases_api_integration/security_and_spaces/config_basic.ts
180180
- x-pack/test/cases_api_integration/security_and_spaces/config_trial.ts
181+
- x-pack/test/cases_api_integration/security_and_spaces/config_trial_common.ts
181182
- x-pack/test/cases_api_integration/security_and_spaces/config_no_public_base_url.ts
182183
- x-pack/test/cases_api_integration/spaces_only/config.ts
183184
- x-pack/test/disable_ems/config.ts

.buildkite/pipeline-resource-definitions/kibana-es-snapshots.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts'
2323
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
2424
allow_rebuilds: true
25-
branch_configuration: main 8.x 8.17 8.16 8.15 7.17
25+
branch_configuration: main 8.x 8.17 8.16 7.17
2626
default_branch: main
2727
repository: elastic/kibana
2828
pipeline_file: .buildkite/pipelines/es_snapshots/build.yml
@@ -95,7 +95,7 @@ spec:
9595
SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts'
9696
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
9797
allow_rebuilds: true
98-
branch_configuration: main 8.x 8.17 8.16 8.15 7.17
98+
branch_configuration: main 8.x 8.17 8.16 7.17
9999
default_branch: main
100100
repository: elastic/kibana
101101
pipeline_file: .buildkite/pipelines/es_snapshots/promote.yml
@@ -144,7 +144,7 @@ spec:
144144
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
145145
REPORT_FAILED_TESTS_TO_GITHUB: 'true'
146146
allow_rebuilds: true
147-
branch_configuration: main 8.x 8.17 8.16 8.15 7.17
147+
branch_configuration: main 8.x 8.17 8.16 7.17
148148
default_branch: main
149149
repository: elastic/kibana
150150
pipeline_file: .buildkite/pipelines/es_snapshots/verify.yml

.buildkite/pipeline-resource-definitions/kibana-on-merge-unsupported-ftrs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
SLACK_NOTIFICATIONS_CHANNEL: '#kibana-unsupported-ftrs-alerts'
2323
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
2424
allow_rebuilds: true
25-
branch_configuration: main 8.x 8.17 8.16 8.15 7.17
25+
branch_configuration: main 8.x 8.17 8.16 7.17
2626
default_branch: main
2727
repository: elastic/kibana
2828
pipeline_file: .buildkite/pipelines/on_merge_unsupported_ftrs.yml

.buildkite/pipeline-resource-definitions/kibana-on-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
REPORT_FAILED_TESTS_TO_GITHUB: 'true'
2626
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
2727
allow_rebuilds: true
28-
branch_configuration: main 8.x 8.17 8.16 8.15 7.17
28+
branch_configuration: main 8.x 8.17 8.16 7.17
2929
default_branch: main
3030
repository: elastic/kibana
3131
pipeline_file: .buildkite/pipelines/on_merge.yml

packages/content-management/table_list_view_table/jest.config.js renamed to .buildkite/pipeline-utils/buildkite/emitPipeline.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
module.exports = {
11-
preset: '@kbn/test',
12-
rootDir: '../../..',
13-
roots: ['<rootDir>/packages/content-management/table_list_view_table'],
14-
};
10+
export function emitPipeline(pipelineSteps: string[]) {
11+
const pipelineStr = [...new Set(pipelineSteps)].join('\n');
12+
console.log(pipelineStr);
13+
}

.buildkite/pipeline-utils/buildkite/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99

1010
export * from './client';
1111
export * from './types';
12+
export * from './emitPipeline';

.buildkite/pipelines/on_merge_unsupported_ftrs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ steps:
3737
machineType: n2-standard-4
3838
preemptible: true
3939
depends_on: build
40+
env:
41+
PING_SLACK_TEAM: "@obs-ux-infra_services-team"
4042
timeout_in_minutes: 120
4143
retry:
4244
automatic:
@@ -54,6 +56,8 @@ steps:
5456
machineType: n2-standard-4
5557
preemptible: true
5658
depends_on: build
59+
env:
60+
PING_SLACK_TEAM: "@obs-ux-infra_services-team"
5761
timeout_in_minutes: 120
5862
retry:
5963
automatic:

.buildkite/scripts/lifecycle/post_command.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,12 @@ if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then
5252
buildkite-agent artifact upload 'target/test_failures/**/*'
5353
ts-node .buildkite/scripts/lifecycle/annotate_test_failures.ts
5454
fi
55+
5556
fi
57+
58+
if [[ $BUILDKITE_COMMAND_EXIT_STATUS -ne 0 ]]; then
59+
# If the slack team environment variable is set, ping the team in slack
60+
if [ -n "${PING_SLACK_TEAM:-}" ]; then
61+
buildkite-agent meta-data set 'slack:ping_team:body' "${PING_SLACK_TEAM}, can you please take a look at the test failures?"
62+
fi
63+
fi

.buildkite/scripts/pipelines/pull_request/pipeline.ts

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,22 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10+
/* eslint "no-restricted-syntax": [
11+
"error",
12+
{
13+
"selector": "CallExpression[callee.object.name='console'][callee.property.name!=/^(warn|error)$/]",
14+
"message": "Debug logging to stdout in this file will attempt to upload the log message as yaml to buildkite, which might result in pipeline syntax error. Use emitPipeline() to upload steps, or log to stderr."
15+
}
16+
] */
17+
1018
import fs from 'fs';
1119
import prConfigs from '../../../pull_requests.json';
12-
import { areChangesSkippable, doAnyChangesMatch, getAgentImageConfig } from '#pipeline-utils';
20+
import {
21+
areChangesSkippable,
22+
doAnyChangesMatch,
23+
getAgentImageConfig,
24+
emitPipeline,
25+
} from '#pipeline-utils';
1326

1427
const prConfig = prConfigs.jobs.find((job) => job.pipelineSlug === 'kibana-pull-request');
1528
const emptyStep = `steps: []`;
@@ -35,7 +48,7 @@ const getPipeline = (filename: string, removeSteps = true) => {
3548
const skippable = await areChangesSkippable(SKIPPABLE_PR_MATCHERS, REQUIRED_PATHS);
3649

3750
if (skippable) {
38-
console.log(emptyStep);
51+
emitPipeline([emptyStep]);
3952
return;
4053
}
4154

@@ -44,8 +57,8 @@ const getPipeline = (filename: string, removeSteps = true) => {
4457
const onlyRunQuickChecks = await areChangesSkippable([/^renovate\.json$/], REQUIRED_PATHS);
4558
if (onlyRunQuickChecks) {
4659
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/renovate.yml', false));
47-
48-
console.log([...new Set(pipeline)].join('\n'));
60+
console.warn('Isolated changes to renovate.json. Skipping main PR pipeline.');
61+
emitPipeline(pipeline);
4962
return;
5063
}
5164

@@ -401,8 +414,7 @@ const getPipeline = (filename: string, removeSteps = true) => {
401414

402415
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml'));
403416

404-
// remove duplicated steps
405-
console.log([...new Set(pipeline)].join('\n'));
417+
emitPipeline(pipeline);
406418
} catch (ex) {
407419
console.error('Error while generating the pipeline steps: ' + ex.message, ex);
408420
process.exit(1);

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,10 @@ const RESTRICTED_IMPORTS = [
271271
message:
272272
'Please, use rxjs instead: rxjs/operators is just a subset, unnecessarily duplicating the package import.',
273273
},
274+
{
275+
name: '@testing-library/react-hooks',
276+
message: 'Please use @testing-library/react instead',
277+
},
274278
];
275279

276280
module.exports = {

0 commit comments

Comments
 (0)