Skip to content

Commit 95956fe

Browse files
committed
chore: 🤖 catch up with master
2 parents a7d75f8 + 6c1f248 commit 95956fe

File tree

81 files changed

+4297
-265
lines changed

Some content is hidden

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

81 files changed

+4297
-265
lines changed

‎.eslintrc.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ module.exports = {
326326
allowSameFolder: true,
327327
},
328328
{
329-
target: ['src/core/**/*'],
329+
target: ['src/**/*'],
330330
from: ['x-pack/**/*'],
331331
errorMessage: 'OSS cannot import x-pack files.',
332332
},
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
on:
2+
pull_request:
3+
types: [labeled, unlabeled]
4+
5+
jobs:
6+
assign_to_project:
7+
runs-on: ubuntu-latest
8+
name: Assign a PR to project based on label
9+
steps:
10+
- name: Assign to project
11+
uses: elastic/github-actions/[email protected]
12+
id: project_assigner
13+
with:
14+
issue-mappings: '[{"label": "Team:AppAch", "projectName": "kibana-app-arch", "columnId": 6173897}]'
15+
ghToken: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on:
2+
issues:
3+
types: [labeled, unlabeled]
4+
5+
jobs:
6+
assign_to_project:
7+
runs-on: ubuntu-latest
8+
name: Assign issue or PR to project based on label
9+
steps:
10+
- name: Assign to project
11+
uses: elastic/github-actions/[email protected]
12+
id: project_assigner
13+
with:
14+
issue-mappings: '[{"label": "Team:AppArch", "projectName": "kibana-app-arch", "columnId": 6173895}]'
15+
ghToken: ${{ secrets.GITHUB_TOKEN }}
16+
17+

‎packages/kbn-test/src/failed_tests_reporter/__fixtures__/ftr_report.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Wait timed out after 10055ms
1818
at onFailure (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-ciGroup7/node/immutable/kibana/test/common/services/retry/retry_for_success.ts:68:13)]]>
1919
</failure>
2020
</testcase>
21-
<testcase name="maps app &quot;after all&quot; hook" classname="Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/maps" time="0.179">
21+
<testcase name="maps app &quot;after all&quot; hook" classname="Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/maps" time="0.179" metadata-json="{&quot;messages&quot;:[&quot;foo&quot;],&quot;screenshots&quot;:[{&quot;name&quot;:&quot;failure[dashboard app using current data dashboard snapshots compare TSVB snapshot]&quot;,&quot;url&quot;:&quot;https://storage.googleapis.com/kibana-ci-artifacts/jobs/elastic+kibana+7.x/1632/kibana-oss-tests/test/functional/screenshots/failure/dashboard%20app%20using%20current%20data%20dashboard%20snapshots%20compare%20TSVB%20snapshot.png&quot;}]}">
2222
<system-out>
2323
<![CDATA[[00:00:00] │
2424
[00:07:04] â””-: maps app

‎packages/kbn-test/src/failed_tests_reporter/add_messages_to_report.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ it('rewrites ftr reports with minimal changes', async () => {
102102
+ at onFailure (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-ciGroup7/node/immutable/kibana/test/common/services/retry/retry_for_success.ts:68:13)
103103
‹/failure›
104104
‹/testcase›
105-
‹testcase name="maps app &quot;after all&quot; hook" classname="Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/maps" time="0.179"›
105+
‹testcase name="maps app &quot;after all&quot; hook" classname="Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/maps" time="0.179" metadata-json="{&quot;messages&quot;:[&quot;foo&quot;],&quot;screenshots&quot;:[{&quot;name&quot;:&quot;failure[dashboard app using current data dashboard snapshots compare TSVB snapshot]&quot;,&quot;url&quot;:&quot;https://storage.googleapis.com/kibana-ci-artifacts/jobs/elastic+kibana+7.x/1632/kibana-oss-tests/test/functional/screenshots/failure/dashboard%20app%20using%20current%20data%20dashboard%20snapshots%20compare%20TSVB%20snapshot.png&quot;}]}"›
106106
‹system-out›
107107
- ‹![CDATA[[00:00:00] │
108108
+ [00:00:00] │

‎packages/kbn-test/src/failed_tests_reporter/get_failures.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ it('discovers failures in ftr report', async () => {
4848
at process._tickCallback (internal/process/next_tick.js:68:7) name: 'NoSuchSessionError', remoteStacktrace: '' }
4949
",
5050
"likelyIrrelevant": true,
51+
"metadata-json": "{\\"messages\\":[\\"foo\\"],\\"screenshots\\":[{\\"name\\":\\"failure[dashboard app using current data dashboard snapshots compare TSVB snapshot]\\",\\"url\\":\\"https://storage.googleapis.com/kibana-ci-artifacts/jobs/elastic+kibana+7.x/1632/kibana-oss-tests/test/functional/screenshots/failure/dashboard%20app%20using%20current%20data%20dashboard%20snapshots%20compare%20TSVB%20snapshot.png\\"}]}",
5152
"name": "maps app \\"after all\\" hook",
5253
"time": "0.179",
5354
},
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { getReportMessageIter } from './report_metadata';
21+
import { parseTestReport } from './test_report';
22+
import { FTR_REPORT, JEST_REPORT, KARMA_REPORT, MOCHA_REPORT } from './__fixtures__';
23+
24+
it('reads messages and screenshots from metadata-json properties', async () => {
25+
const ftrReport = await parseTestReport(FTR_REPORT);
26+
expect(Array.from(getReportMessageIter(ftrReport))).toMatchInlineSnapshot(`
27+
Array [
28+
Object {
29+
"classname": "Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/maps",
30+
"message": "foo",
31+
"name": "maps app \\"after all\\" hook",
32+
},
33+
Object {
34+
"classname": "Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/maps",
35+
"message": "Screenshot: failure[dashboard app using current data dashboard snapshots compare TSVB snapshot] https://storage.googleapis.com/kibana-ci-artifacts/jobs/elastic+kibana+7.x/1632/kibana-oss-tests/test/functional/screenshots/failure/dashboard%20app%20using%20current%20data%20dashboard%20snapshots%20compare%20TSVB%20snapshot.png",
36+
"name": "maps app \\"after all\\" hook",
37+
},
38+
]
39+
`);
40+
41+
const jestReport = await parseTestReport(JEST_REPORT);
42+
expect(Array.from(getReportMessageIter(jestReport))).toMatchInlineSnapshot(`Array []`);
43+
44+
const mochaReport = await parseTestReport(MOCHA_REPORT);
45+
expect(Array.from(getReportMessageIter(mochaReport))).toMatchInlineSnapshot(`Array []`);
46+
47+
const karmaReport = await parseTestReport(KARMA_REPORT);
48+
expect(Array.from(getReportMessageIter(karmaReport))).toMatchInlineSnapshot(`Array []`);
49+
});

‎packages/kbn-test/src/failed_tests_reporter/report_metadata.ts‎

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,25 @@
1818
*/
1919

2020
import { TestReport, makeTestCaseIter } from './test_report';
21-
import { Message } from './add_messages_to_report';
2221

23-
export function* getMetadataIter(report: TestReport) {
22+
export function* getReportMessageIter(report: TestReport) {
2423
for (const testCase of makeTestCaseIter(report)) {
25-
if (!testCase.$['metadata-json']) {
26-
yield [{}, testCase];
27-
} else {
28-
yield [{}, JSON.parse(testCase.$['metadata-json'])];
29-
}
30-
}
31-
}
24+
const metadata = testCase.$['metadata-json'] ? JSON.parse(testCase.$['metadata-json']) : {};
3225

33-
export function getReportMessages(report: TestReport) {
34-
const messages: Message[] = [];
35-
for (const [metadata, testCase] of getMetadataIter(report)) {
3626
for (const message of metadata.messages || []) {
37-
messages.push({
27+
yield {
3828
classname: testCase.$.classname,
3929
name: testCase.$.name,
40-
message,
41-
});
30+
message: String(message),
31+
};
4232
}
4333

4434
for (const screenshot of metadata.screenshots || []) {
45-
messages.push({
35+
yield {
4636
classname: testCase.$.classname,
4737
name: testCase.$.name,
4838
message: `Screenshot: ${screenshot.name} ${screenshot.url}`,
49-
});
39+
};
5040
}
5141
}
52-
return messages;
5342
}

‎packages/kbn-test/src/failed_tests_reporter/run_failed_tests_reporter_cli.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { updateFailureIssue, createFailureIssue } from './report_failure';
2626
import { getIssueMetadata } from './issue_metadata';
2727
import { readTestReport } from './test_report';
2828
import { addMessagesToReport } from './add_messages_to_report';
29-
import { getReportMessages } from './report_metadata';
29+
import { getReportMessageIter } from './report_metadata';
3030

3131
export function runFailedTestsReporterCli() {
3232
run(
@@ -75,7 +75,7 @@ export function runFailedTestsReporterCli() {
7575

7676
for (const reportPath of reportPaths) {
7777
const report = await readTestReport(reportPath);
78-
const messages = getReportMessages(report);
78+
const messages = Array.from(getReportMessageIter(report));
7979

8080
for (const failure of await getFailures(report)) {
8181
const pushMessage = (msg: string) => {

‎src/legacy/ui/public/new_platform/new_platform.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import { KibanaLegacySetup, KibanaLegacyStart } from '../../../../plugins/kibana
3333
import { HomePublicPluginSetup, HomePublicPluginStart } from '../../../../plugins/home/public';
3434
import { SharePluginSetup, SharePluginStart } from '../../../../plugins/share/public';
3535
import { BfetchPublicSetup, BfetchPublicStart } from '../../../../plugins/bfetch/public';
36-
import { LicensingPluginSetup } from '../../../../../x-pack/plugins/licensing/common/types';
3736

3837
export interface PluginsSetup {
3938
bfetch: BfetchPublicSetup;
@@ -46,7 +45,6 @@ export interface PluginsSetup {
4645
dev_tools: DevToolsSetup;
4746
kibana_legacy: KibanaLegacySetup;
4847
share: SharePluginSetup;
49-
licensing: LicensingPluginSetup;
5048
}
5149

5250
export interface PluginsStart {

0 commit comments

Comments
 (0)