Skip to content

Commit 63e96dc

Browse files
Merge branch 'master' into fix-tms-load-issue-on-maps
2 parents 1e7b98b + ba76476 commit 63e96dc

File tree

1,122 files changed

+24859
-19796
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,122 files changed

+24859
-19796
lines changed

.backportrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"targetBranchChoices": [
44
{ "name": "master", "checked": true },
55
{ "name": "7.x", "checked": true },
6+
"7.9",
67
"7.8",
78
"7.7",
89
"7.6",
@@ -26,7 +27,7 @@
2627
"targetPRLabels": ["backport"],
2728
"branchLabelMapping": {
2829
"^v8.0.0$": "master",
29-
"^v7.9.0$": "7.x",
30+
"^v7.10.0$": "7.x",
3031
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
3132
}
3233
}

.browserslistrc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[production]
2-
last 2 versions
3-
> 5%
4-
Safari 7 # for PhantomJS support: https://github.com/elastic/kibana/issues/27136
2+
last 2 Firefox versions
3+
last 2 Chrome versions
4+
last 2 Safari versions
5+
> 0.25%
6+
not ie 11
57

68
[dev]
79
last 1 chrome versions
File renamed without changes.

.ci/Jenkinsfile_baseline_trigger

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/groovy
2+
3+
def MAXIMUM_COMMITS_TO_CHECK = 10
4+
def MAXIMUM_COMMITS_TO_BUILD = 5
5+
6+
if (!params.branches_yaml) {
7+
error "'branches_yaml' parameter must be specified"
8+
}
9+
10+
def additionalBranches = []
11+
12+
def branches = readYaml(text: params.branches_yaml) + additionalBranches
13+
14+
library 'kibana-pipeline-library'
15+
kibanaLibrary.load()
16+
17+
withGithubCredentials {
18+
branches.each { branch ->
19+
stage(branch) {
20+
def commits = getCommits(branch, MAXIMUM_COMMITS_TO_CHECK, MAXIMUM_COMMITS_TO_BUILD)
21+
22+
commits.take(MAXIMUM_COMMITS_TO_BUILD).each { commit ->
23+
catchErrors {
24+
githubCommitStatus.create(commit, 'pending', 'Baseline started.', 'kibana-ci-baseline')
25+
26+
build(
27+
propagate: false,
28+
wait: false,
29+
job: 'elastic+kibana+baseline-capture',
30+
parameters: [
31+
string(name: 'branch_specifier', value: branch),
32+
string(name: 'commit', value: commit),
33+
]
34+
)
35+
}
36+
}
37+
}
38+
}
39+
}
40+
41+
def getCommits(String branch, maximumCommitsToCheck, maximumCommitsToBuild) {
42+
print "Getting latest commits for ${branch}..."
43+
def commits = githubApi.get("repos/elastic/kibana/commits?sha=${branch}").take(maximumCommitsToCheck).collect { it.sha }
44+
def commitsToBuild = []
45+
46+
for (commit in commits) {
47+
print "Getting statuses for ${commit}"
48+
def status = githubApi.get("repos/elastic/kibana/statuses/${commit}").find { it.context == 'kibana-ci-baseline' }
49+
print "Commit '${commit}' already built? ${status ? 'Yes' : 'No'}"
50+
51+
if (!status) {
52+
commitsToBuild << commit
53+
} else {
54+
// Stop at the first commit we find that's already been triggered
55+
break
56+
}
57+
58+
if (commitsToBuild.size() >= maximumCommitsToBuild) {
59+
break
60+
}
61+
}
62+
63+
return commitsToBuild.reverse() // We want the builds to trigger oldest-to-newest
64+
}

.ci/Jenkinsfile_coverage

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ kibanaPipeline(timeoutMinutes: 240) {
1313
workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) {
1414
catchError {
1515
kibanaCoverage.runTests()
16+
kibanaTeamAssign.load('team_assignment', "### Upload Team Assignment JSON")
1617
handleIngestion(TIME_STAMP)
1718
}
1819
handleFail()

.ci/packer_cache_for_branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ node scripts/es snapshot --download-only;
1818
node scripts/es snapshot --license=oss --download-only;
1919

2020
# download reporting browsers
21-
(cd "x-pack" && yarn gulp prepare);
21+
(cd "x-pack" && yarn gulp downloadChromium);
2222

2323
# cache the chromedriver archive
2424
chromedriverDistVersion="$(node -e "console.log(require('chromedriver').version)")"

.ci/pipeline-library/src/test/prChanges.groovy

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,17 @@ class PrChangesTest extends KibanaBasePipelineTest {
8484

8585
assertFalse(prChanges.areChangesSkippable())
8686
}
87+
88+
@Test
89+
void 'areChangesSkippable() with skippable changes that are in notSkippablePaths'() {
90+
props([
91+
githubPrs: [
92+
getChanges: { [
93+
[filename: 'docs/developer/architecture/code-exploration.asciidoc'],
94+
] },
95+
],
96+
])
97+
98+
assertFalse(prChanges.areChangesSkippable())
99+
}
87100
}

.eslintrc.js

Lines changed: 228 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,31 @@ const ELASTIC_LICENSE_HEADER = `
4949
*/
5050
`;
5151

52+
const SAFER_LODASH_SET_HEADER = `
53+
/*
54+
* Elasticsearch B.V licenses this file to you under the MIT License.
55+
* See \`packages/elastic-safer-lodash-set/LICENSE\` for more information.
56+
*/
57+
`;
58+
59+
const SAFER_LODASH_SET_LODASH_HEADER = `
60+
/*
61+
* This file is forked from the lodash project (https://lodash.com/),
62+
* and may include modifications made by Elasticsearch B.V.
63+
* Elasticsearch B.V. licenses this file to you under the MIT License.
64+
* See \`packages/elastic-safer-lodash-set/LICENSE\` for more information.
65+
*/
66+
`;
67+
68+
const SAFER_LODASH_SET_DEFINITELYTYPED_HEADER = `
69+
/*
70+
* This file is forked from the DefinitelyTyped project (https://github.com/DefinitelyTyped/DefinitelyTyped),
71+
* and may include modifications made by Elasticsearch B.V.
72+
* Elasticsearch B.V. licenses this file to you under the MIT License.
73+
* See \`packages/elastic-safer-lodash-set/LICENSE\` for more information.
74+
*/
75+
`;
76+
5277
const allMochaRulesOff = {};
5378
Object.keys(require('eslint-plugin-mocha').rules).forEach((k) => {
5479
allMochaRulesOff['mocha/' + k] = 'off';
@@ -143,7 +168,12 @@ module.exports = {
143168
'@kbn/eslint/disallow-license-headers': [
144169
'error',
145170
{
146-
licenses: [ELASTIC_LICENSE_HEADER],
171+
licenses: [
172+
ELASTIC_LICENSE_HEADER,
173+
SAFER_LODASH_SET_HEADER,
174+
SAFER_LODASH_SET_LODASH_HEADER,
175+
SAFER_LODASH_SET_DEFINITELYTYPED_HEADER,
176+
],
147177
},
148178
],
149179
},
@@ -174,7 +204,82 @@ module.exports = {
174204
'@kbn/eslint/disallow-license-headers': [
175205
'error',
176206
{
177-
licenses: [APACHE_2_0_LICENSE_HEADER],
207+
licenses: [
208+
APACHE_2_0_LICENSE_HEADER,
209+
SAFER_LODASH_SET_HEADER,
210+
SAFER_LODASH_SET_LODASH_HEADER,
211+
SAFER_LODASH_SET_DEFINITELYTYPED_HEADER,
212+
],
213+
},
214+
],
215+
},
216+
},
217+
218+
/**
219+
* safer-lodash-set package requires special license headers
220+
*/
221+
{
222+
files: ['packages/elastic-safer-lodash-set/**/*.{js,mjs,ts,tsx}'],
223+
rules: {
224+
'@kbn/eslint/require-license-header': [
225+
'error',
226+
{
227+
license: SAFER_LODASH_SET_LODASH_HEADER,
228+
},
229+
],
230+
'@kbn/eslint/disallow-license-headers': [
231+
'error',
232+
{
233+
licenses: [
234+
ELASTIC_LICENSE_HEADER,
235+
APACHE_2_0_LICENSE_HEADER,
236+
SAFER_LODASH_SET_HEADER,
237+
SAFER_LODASH_SET_DEFINITELYTYPED_HEADER,
238+
],
239+
},
240+
],
241+
},
242+
},
243+
{
244+
files: ['packages/elastic-safer-lodash-set/test/*.{js,mjs,ts,tsx}'],
245+
rules: {
246+
'@kbn/eslint/require-license-header': [
247+
'error',
248+
{
249+
license: SAFER_LODASH_SET_HEADER,
250+
},
251+
],
252+
'@kbn/eslint/disallow-license-headers': [
253+
'error',
254+
{
255+
licenses: [
256+
ELASTIC_LICENSE_HEADER,
257+
APACHE_2_0_LICENSE_HEADER,
258+
SAFER_LODASH_SET_LODASH_HEADER,
259+
SAFER_LODASH_SET_DEFINITELYTYPED_HEADER,
260+
],
261+
},
262+
],
263+
},
264+
},
265+
{
266+
files: ['packages/elastic-safer-lodash-set/**/*.d.ts'],
267+
rules: {
268+
'@kbn/eslint/require-license-header': [
269+
'error',
270+
{
271+
license: SAFER_LODASH_SET_DEFINITELYTYPED_HEADER,
272+
},
273+
],
274+
'@kbn/eslint/disallow-license-headers': [
275+
'error',
276+
{
277+
licenses: [
278+
ELASTIC_LICENSE_HEADER,
279+
APACHE_2_0_LICENSE_HEADER,
280+
SAFER_LODASH_SET_HEADER,
281+
SAFER_LODASH_SET_LODASH_HEADER,
282+
],
178283
},
179284
],
180285
},
@@ -541,9 +646,129 @@ module.exports = {
541646
* Harden specific rules
542647
*/
543648
{
544-
files: ['test/harden/*.js'],
649+
files: ['test/harden/*.js', 'packages/elastic-safer-lodash-set/test/*.js'],
545650
rules: allMochaRulesOff,
546651
},
652+
{
653+
files: ['**/*.{js,mjs,ts,tsx}'],
654+
rules: {
655+
'no-restricted-imports': [
656+
2,
657+
{
658+
paths: [
659+
{
660+
name: 'lodash',
661+
importNames: ['set', 'setWith'],
662+
message: 'Please use @elastic/safer-lodash-set instead',
663+
},
664+
{
665+
name: 'lodash.set',
666+
message: 'Please use @elastic/safer-lodash-set instead',
667+
},
668+
{
669+
name: 'lodash.setwith',
670+
message: 'Please use @elastic/safer-lodash-set instead',
671+
},
672+
{
673+
name: 'lodash/set',
674+
message: 'Please use @elastic/safer-lodash-set instead',
675+
},
676+
{
677+
name: 'lodash/setWith',
678+
message: 'Please use @elastic/safer-lodash-set instead',
679+
},
680+
{
681+
name: 'lodash/fp',
682+
importNames: ['set', 'setWith', 'assoc', 'assocPath'],
683+
message: 'Please use @elastic/safer-lodash-set instead',
684+
},
685+
{
686+
name: 'lodash/fp/set',
687+
message: 'Please use @elastic/safer-lodash-set instead',
688+
},
689+
{
690+
name: 'lodash/fp/setWith',
691+
message: 'Please use @elastic/safer-lodash-set instead',
692+
},
693+
{
694+
name: 'lodash/fp/assoc',
695+
message: 'Please use @elastic/safer-lodash-set instead',
696+
},
697+
{
698+
name: 'lodash/fp/assocPath',
699+
message: 'Please use @elastic/safer-lodash-set instead',
700+
},
701+
],
702+
},
703+
],
704+
'no-restricted-modules': [
705+
2,
706+
{
707+
paths: [
708+
{
709+
name: 'lodash.set',
710+
message: 'Please use @elastic/safer-lodash-set instead',
711+
},
712+
{
713+
name: 'lodash.setwith',
714+
message: 'Please use @elastic/safer-lodash-set instead',
715+
},
716+
{
717+
name: 'lodash/set',
718+
message: 'Please use @elastic/safer-lodash-set instead',
719+
},
720+
{
721+
name: 'lodash/setWith',
722+
message: 'Please use @elastic/safer-lodash-set instead',
723+
},
724+
],
725+
},
726+
],
727+
'no-restricted-properties': [
728+
2,
729+
{
730+
object: 'lodash',
731+
property: 'set',
732+
message: 'Please use @elastic/safer-lodash-set instead',
733+
},
734+
{
735+
object: '_',
736+
property: 'set',
737+
message: 'Please use @elastic/safer-lodash-set instead',
738+
},
739+
{
740+
object: 'lodash',
741+
property: 'setWith',
742+
message: 'Please use @elastic/safer-lodash-set instead',
743+
},
744+
{
745+
object: '_',
746+
property: 'setWith',
747+
message: 'Please use @elastic/safer-lodash-set instead',
748+
},
749+
{
750+
object: 'lodash',
751+
property: 'assoc',
752+
message: 'Please use @elastic/safer-lodash-set instead',
753+
},
754+
{
755+
object: '_',
756+
property: 'assoc',
757+
message: 'Please use @elastic/safer-lodash-set instead',
758+
},
759+
{
760+
object: 'lodash',
761+
property: 'assocPath',
762+
message: 'Please use @elastic/safer-lodash-set instead',
763+
},
764+
{
765+
object: '_',
766+
property: 'assocPath',
767+
message: 'Please use @elastic/safer-lodash-set instead',
768+
},
769+
],
770+
},
771+
},
547772

548773
/**
549774
* APM overrides

0 commit comments

Comments
 (0)