Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/7.x' into backport/7.x/pr-64974
Browse files Browse the repository at this point in the history
  • Loading branch information
rw-access committed May 5, 2020
2 parents 41f996f + 5168784 commit 01db0c4
Show file tree
Hide file tree
Showing 887 changed files with 24,817 additions and 7,162 deletions.
1 change: 1 addition & 0 deletions .ci/es-snapshots/Jenkinsfile_verify_es
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def SNAPSHOT_MANIFEST = "https://storage.googleapis.com/kibana-ci-es-snapshots-d

kibanaPipeline(timeoutMinutes: 135) {
catchErrors {
retryable.enable(2)
withEnv(["ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}"]) {
parallel([
'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
Expand Down
2 changes: 2 additions & 0 deletions docs/user/reporting/development/pdf-integration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ If there are multiple visualizations, the `data-shared-items-count` attribute sh
many Visualizations to look for. Reporting will look at every element with the `data-shared-item` attribute and use the corresponding
`data-render-complete` attribute and `renderComplete` events to listen for rendering to complete. When rendering is complete for a visualization
the `data-render-complete` attribute should be set to "true" and it should dispatch a custom DOM `renderComplete` event.

If the reporting job uses multiple URLs, before looking for any of the `data-shared-item` or `data-shared-items-count` attributes, it waits for a `data-shared-page` attribute that specifies which page is being loaded.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@
"@babel/core": "^7.9.0",
"@babel/register": "^7.9.0",
"@elastic/apm-rum": "^5.1.1",
"@elastic/charts": "19.1.2",
"@elastic/datemath": "5.0.2",
"@elastic/charts": "18.4.2",
"@elastic/ems-client": "7.8.0",
"@elastic/eui": "22.3.0",
"@elastic/filesaver": "1.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-ui-shared-deps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"kbn:watch": "node scripts/build --watch"
},
"dependencies": {
"@elastic/charts": "18.4.2",
"@elastic/charts": "19.1.2",
"@elastic/eui": "22.3.0",
"@kbn/i18n": "1.0.0",
"abortcontroller-polyfill": "^1.4.0",
Expand Down
24 changes: 14 additions & 10 deletions packages/kbn-ui-shared-deps/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,19 @@ exports.getWebpackConfig = ({ dev = false } = {}) => ({
new webpack.DefinePlugin({
'process.env.NODE_ENV': dev ? '"development"' : '"production"',
}),
new CompressionPlugin({
algorithm: 'brotliCompress',
filename: '[path].br',
test: /\.(js|css)$/,
}),
new CompressionPlugin({
algorithm: 'gzip',
filename: '[path].gz',
test: /\.(js|css)$/,
}),
...(dev
? []
: [
new CompressionPlugin({
algorithm: 'brotliCompress',
filename: '[path].br',
test: /\.(js|css)$/,
}),
new CompressionPlugin({
algorithm: 'gzip',
filename: '[path].gz',
test: /\.(js|css)$/,
}),
]),
],
});
51 changes: 51 additions & 0 deletions src/core/server/elasticsearch/elasticsearch_service.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

import { BehaviorSubject } from 'rxjs';
import { Client } from 'elasticsearch';
import { IClusterClient, ICustomClusterClient } from './cluster_client';
import { IScopedClusterClient } from './scoped_cluster_client';
import { ElasticsearchConfig } from './elasticsearch_config';
Expand Down Expand Up @@ -130,6 +131,55 @@ const createMock = () => {
return mocked;
};

const createElasticsearchClientMock = () => {
const mocked: jest.Mocked<Client> = {
cat: {} as any,
cluster: {} as any,
indices: {} as any,
ingest: {} as any,
nodes: {} as any,
snapshot: {} as any,
tasks: {} as any,
bulk: jest.fn(),
clearScroll: jest.fn(),
count: jest.fn(),
create: jest.fn(),
delete: jest.fn(),
deleteByQuery: jest.fn(),
deleteScript: jest.fn(),
deleteTemplate: jest.fn(),
exists: jest.fn(),
explain: jest.fn(),
fieldStats: jest.fn(),
get: jest.fn(),
getScript: jest.fn(),
getSource: jest.fn(),
getTemplate: jest.fn(),
index: jest.fn(),
info: jest.fn(),
mget: jest.fn(),
msearch: jest.fn(),
msearchTemplate: jest.fn(),
mtermvectors: jest.fn(),
ping: jest.fn(),
putScript: jest.fn(),
putTemplate: jest.fn(),
reindex: jest.fn(),
reindexRethrottle: jest.fn(),
renderSearchTemplate: jest.fn(),
scroll: jest.fn(),
search: jest.fn(),
searchShards: jest.fn(),
searchTemplate: jest.fn(),
suggest: jest.fn(),
termvectors: jest.fn(),
update: jest.fn(),
updateByQuery: jest.fn(),
close: jest.fn(),
};
return mocked;
};

export const elasticsearchServiceMock = {
create: createMock,
createInternalSetup: createInternalSetupContractMock,
Expand All @@ -138,4 +188,5 @@ export const elasticsearchServiceMock = {
createClusterClient: createClusterClientMock,
createCustomClusterClient: createCustomClusterClientMock,
createScopedClusterClient: createScopedClusterClientMock,
createElasticsearchClient: createElasticsearchClientMock,
};
11 changes: 11 additions & 0 deletions src/core/server/http/integration_tests/core_service.test.mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,14 @@ jest.doMock('../../elasticsearch/scoped_cluster_client', () => ({
return elasticsearchServiceMock.createScopedClusterClient();
}),
}));

jest.doMock('elasticsearch', () => {
const realES = jest.requireActual('elasticsearch');
return {
...realES,
// eslint-disable-next-line object-shorthand
Client: function() {
return elasticsearchServiceMock.createElasticsearchClient();
},
};
});
8 changes: 4 additions & 4 deletions src/core/server/http/integration_tests/core_services.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('http service', () => {
describe('auth', () => {
let root: ReturnType<typeof kbnTestServer.createRoot>;
beforeEach(async () => {
root = kbnTestServer.createRoot({ migrations: { skip: true } });
root = kbnTestServer.createRoot({ plugins: { initialize: false } });
}, 30000);

afterEach(async () => {
Expand Down Expand Up @@ -192,7 +192,7 @@ describe('http service', () => {

let root: ReturnType<typeof kbnTestServer.createRoot>;
beforeEach(async () => {
root = kbnTestServer.createRoot({ migrations: { skip: true } });
root = kbnTestServer.createRoot({ plugins: { initialize: false } });
}, 30000);

afterEach(async () => {
Expand Down Expand Up @@ -326,7 +326,7 @@ describe('http service', () => {
describe('#basePath()', () => {
let root: ReturnType<typeof kbnTestServer.createRoot>;
beforeEach(async () => {
root = kbnTestServer.createRoot({ migrations: { skip: true } });
root = kbnTestServer.createRoot({ plugins: { initialize: false } });
}, 30000);

afterEach(async () => await root.shutdown());
Expand Down Expand Up @@ -355,7 +355,7 @@ describe('http service', () => {
describe('elasticsearch', () => {
let root: ReturnType<typeof kbnTestServer.createRoot>;
beforeEach(async () => {
root = kbnTestServer.createRoot({ migrations: { skip: true } });
root = kbnTestServer.createRoot({ plugins: { initialize: false } });
}, 30000);

afterEach(async () => {
Expand Down
2 changes: 0 additions & 2 deletions src/legacy/core_plugins/interpreter/README.md

This file was deleted.

44 changes: 0 additions & 44 deletions src/legacy/core_plugins/interpreter/index.ts

This file was deleted.

52 changes: 0 additions & 52 deletions src/legacy/core_plugins/interpreter/init.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/legacy/core_plugins/interpreter/package.json

This file was deleted.

49 changes: 0 additions & 49 deletions src/legacy/core_plugins/interpreter/public/interpreter.ts

This file was deleted.

This file was deleted.

Loading

0 comments on commit 01db0c4

Please sign in to comment.