diff --git a/.ci/end2end.groovy b/.ci/end2end.groovy
index 5cf6efe324ac3f..38fed4aca19dcb 100644
--- a/.ci/end2end.groovy
+++ b/.ci/end2end.groovy
@@ -25,7 +25,7 @@ pipeline {
durabilityHint('PERFORMANCE_OPTIMIZED')
}
triggers {
- issueCommentTrigger('(?i).*jenkins\\W+run\\W+(?:the\\W+)?e2e(?:\\W+please)?.*')
+ issueCommentTrigger('(?i)(retest|.*jenkins\\W+run\\W+(?:the\\W+)?e2e?.*)')
}
parameters {
booleanParam(name: 'FORCE', defaultValue: false, description: 'Whether to force the run.')
@@ -60,8 +60,14 @@ pipeline {
}
}
steps {
+ notifyStatus('Starting services', 'PENDING')
dir("${APM_ITS}"){
- sh './scripts/compose.py start master --no-kibana --no-xpack-secure'
+ sh './scripts/compose.py start master --no-kibana'
+ }
+ }
+ post {
+ unsuccessful {
+ notifyStatus('Environmental issue', 'FAILURE')
}
}
}
@@ -77,10 +83,16 @@ pipeline {
JENKINS_NODE_COOKIE = 'dontKillMe'
}
steps {
+ notifyStatus('Preparing kibana', 'PENDING')
dir("${BASE_DIR}"){
sh script: "${CYPRESS_DIR}/ci/prepare-kibana.sh"
}
}
+ post {
+ unsuccessful {
+ notifyStatus('Kibana warm up failed', 'FAILURE')
+ }
+ }
}
stage('Smoke Tests'){
options { skipDefaultCheckout() }
@@ -91,6 +103,7 @@ pipeline {
}
}
steps{
+ notifyStatus('Running smoke tests', 'PENDING')
dir("${BASE_DIR}"){
sh '''
jobs -l
@@ -112,6 +125,12 @@ pipeline {
archiveArtifacts(allowEmptyArchive: false, artifacts: 'apm-its.log')
}
}
+ unsuccessful {
+ notifyStatus('Test failures', 'FAILURE')
+ }
+ success {
+ notifyStatus('Tests passed', 'SUCCESS')
+ }
}
}
}
@@ -123,3 +142,7 @@ pipeline {
}
}
}
+
+def notifyStatus(String description, String status) {
+ withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanDisplayURL())
+}
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index bf1e341c796fa0..56db8d3793f57c 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -72,7 +72,8 @@
# Observability UIs
/x-pack/legacy/plugins/infra/ @elastic/logs-metrics-ui
/x-pack/plugins/infra/ @elastic/logs-metrics-ui
-/x-pack/legacy/plugins/integrations_manager/ @elastic/epm
+/x-pack/plugins/ingest_manager/ @elastic/ingest
+/x-pack/legacy/plugins/ingest_manager/ @elastic/ingest
/x-pack/plugins/observability/ @elastic/logs-metrics-ui @elastic/apm-ui @elastic/uptime @elastic/ingest
# Machine Learning
@@ -149,6 +150,7 @@
# Kibana Alerting Services
/x-pack/legacy/plugins/alerting/ @elastic/kibana-alerting-services
/x-pack/legacy/plugins/actions/ @elastic/kibana-alerting-services
+/x-pack/plugins/alerting/ @elastic/kibana-alerting-services
/x-pack/plugins/actions/ @elastic/kibana-alerting-services
/x-pack/plugins/event_log/ @elastic/kibana-alerting-services
/x-pack/plugins/task_manager/ @elastic/kibana-alerting-services
@@ -156,6 +158,7 @@
/x-pack/test/plugin_api_integration/plugins/task_manager/ @elastic/kibana-alerting-services
/x-pack/test/plugin_api_integration/test_suites/task_manager/ @elastic/kibana-alerting-services
/x-pack/legacy/plugins/triggers_actions_ui/ @elastic/kibana-alerting-services
+/x-pack/plugins/triggers_actions_ui/ @elastic/kibana-alerting-services
/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/ @elastic/kibana-alerting-services
/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/ @elastic/kibana-alerting-services
@@ -170,8 +173,14 @@
/x-pack/legacy/plugins/index_lifecycle_management/ @elastic/es-ui
/x-pack/legacy/plugins/index_management/ @elastic/es-ui
/x-pack/legacy/plugins/license_management/ @elastic/es-ui
-/x-pack/legacy/plugins/remote_clusters/ @elastic/es-ui
+/x-pack/plugins/remote_clusters/ @elastic/es-ui
/x-pack/legacy/plugins/rollup/ @elastic/es-ui
/x-pack/plugins/searchprofiler/ @elastic/es-ui
/x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui
/x-pack/plugins/watcher/ @elastic/es-ui
+
+# Endpoint
+/x-pack/plugins/endpoint/ @elastic/endpoint-app-team
+/x-pack/test/api_integration/apis/endpoint/ @elastic/endpoint-app-team
+/x-pack/test/functional/apps/endpoint/ @elastic/endpoint-app-team
+/x-pack/test/functional/es_archives/endpoint/ @elastic/endpoint-app-team
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9cba1ee909f6da..bd7868adb511ec 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -55,11 +55,9 @@ Granted that you share your thoughts, we might even be able to come up with crea
First of all, **sorry about that!** We want you to have a great time with Kibana.
-Hosting meaningful discussions on GitHub can be challenging. For that reason, we'll sometimes ask that you join us on IRC _([#kibana](https://kiwiirc.com/client/irc.freenode.net/?#kibana) on freenode)_ to chat about your issues. You may also experience **faster response times** when engaging us via IRC.
-
There's hundreds of open issues and prioritizing what to work on is an important aspect of our daily jobs. We prioritize issues according to impact and difficulty, so some issues can be neglected while we work on more pressing issues.
-Feel free to bump your issues if you think they've been neglected for a prolonged period, or just jump on IRC and let us have it!
+Feel free to bump your issues if you think they've been neglected for a prolonged period.
### "I want to help!"
@@ -471,11 +469,11 @@ The following table outlines possible test file locations and how to invoke them
| Test runner | Test location | Runner command (working directory is kibana root) |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
-| Jest | `src/**/*.test.js`
`src/**/*.test.ts` | `node scripts/jest -t regexp [test path]` |
-| Jest (integration) | `**/integration_tests/**/*.test.js` | `node scripts/jest_integration -t regexp [test path]` |
+| Jest | `src/**/*.test.js`
`src/**/*.test.ts` | `yarn test:jest -t regexp [test path]` |
+| Jest (integration) | `**/integration_tests/**/*.test.js` | `yarn test:jest_integration -t regexp [test path]` |
| Mocha | `src/**/__tests__/**/*.js`
`!src/**/public/__tests__/*.js`
`packages/kbn-datemath/test/**/*.js`
`packages/kbn-dev-utils/src/**/__tests__/**/*.js`
`tasks/**/__tests__/**/*.js` | `node scripts/mocha --grep=regexp [test path]` |
-| Functional | `test/*integration/**/config.js`
`test/*functional/**/config.js`
`test/accessibility/config.js` | `node scripts/functional_tests_server --config test/[directory]/config.js`
`node scripts/functional_test_runner --config test/[directory]/config.js --grep=regexp` |
-| Karma | `src/**/public/__tests__/*.js` | `npm run test:dev` |
+| Functional | `test/*integration/**/config.js`
`test/*functional/**/config.js`
`test/accessibility/config.js` | `yarn test:ftr:server --config test/[directory]/config.js`
`yarn test:ftr:runner --config test/[directory]/config.js --grep=regexp` |
+| Karma | `src/**/public/__tests__/*.js` | `yarn test:karma:debug` |
For X-Pack tests located in `x-pack/` see [X-Pack Testing](x-pack/README.md#testing)
@@ -486,56 +484,38 @@ Test runner arguments:
Examples:
- Run the entire elasticsearch_service test suite:
```
- node scripts/jest src/core/server/elasticsearch/elasticsearch_service.test.ts
+ yarn test:jest src/core/server/elasticsearch/elasticsearch_service.test.ts
```
- Run the jest test case whose description matches `stops both admin and data clients`:
```
- node scripts/jest -t 'stops both admin and data clients' src/core/server/elasticsearch/elasticsearch_service.test.ts
+ yarn test:jest -t 'stops both admin and data clients' src/core/server/elasticsearch/elasticsearch_service.test.ts
```
- Run the api integration test case whose description matches the given string:
```
- node scripts/functional_tests_server --config test/api_integration/config.js
- node scripts/functional_test_runner --config test/api_integration/config.js --grep='should return 404 if id does not match any sample data sets'
+ yarn test:ftr:server --config test/api_integration/config.js
+ yarn test:ftr:runner --config test/api_integration/config.js --grep='should return 404 if id does not match any sample data sets'
```
### Debugging Unit Tests
The standard `yarn test` task runs several sub tasks and can take several minutes to complete, making debugging failures pretty painful. In order to ease the pain specialized tasks provide alternate methods for running the tests.
-To execute both server and browser tests, but skip linting, use `yarn test:quick`.
-
-```bash
-yarn test:quick
-```
-
-Use `yarn test:mocha` when you want to run the mocha tests.
-
-```bash
-yarn test:mocha
-```
-
-When you'd like to execute individual server-side test files, you can use the command below. Note that this command takes care of configuring Mocha with Babel compilation for you, and you'll be better off avoiding a globally installed `mocha` package. This command is great for development and for quickly identifying bugs.
-
-```bash
-node scripts/mocha The embeddable panel component
+
+ Check out the "e;Dynamically adding children"e; section, to see how to add + children to this container, and see it rendered inside an `EmbeddablePanel` component. +
= Readonly<{ [K in keyof P]: TypeO export type ObjectTypeOptions
= TypeOptions< { [K in keyof P]: TypeOf
} > & { + /** Should uknown keys not be defined in the schema be allowed. Defaults to `false` */ allowUnknowns?: boolean; }; export class ObjectType
extends Type = {}) {
+ constructor(props: P, { allowUnknowns = false, ...typeOptions }: ObjectTypeOptions = {}) {
const schemaKeys = {} as Record
-
+
-
-
-
+
+
+
-
+
-
-
+
+
-
- foobar
-
+
+ foobar
+
-
-
-
+
+
+ {this.formatErrorMessage(this.state.error)} {this.formatErrorMessage(this.state.error)}
+
+
200
@@ -101,12 +97,8 @@ Array [
+
+
status:200
@@ -125,12 +117,8 @@ Array [
+
+
status:[400 TO 499]
@@ -149,12 +137,8 @@ Array [
+
+
status:[400 TO 499] AND extension:PHP
@@ -173,12 +157,8 @@ Array [
+
+
status:[400 TO 499] AND (extension:php OR extension:html)
@@ -291,15 +271,9 @@ Array [
-
-
+
+
@@ -320,15 +294,9 @@ Array [
-
{"reason":"Awful error"}
-
+
+
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/histogram.tsx b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/histogram.tsx
index 77bbab97d95c7c..8db3c77ba0f472 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/histogram.tsx
+++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/histogram.tsx
@@ -41,7 +41,7 @@ import {
} from '@elastic/charts';
import { i18n } from '@kbn/i18n';
-import { EuiChartThemeType } from '@elastic/eui/src/themes/charts/themes';
+import { EuiChartThemeType } from '@elastic/eui/dist/eui_charts_theme';
import { Subscription } from 'rxjs';
import { getServices, timezoneProvider } from '../../../kibana_services';
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/no_results.test.js b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/no_results.test.js
index 7de792c6129931..98a4a926a282e9 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/no_results.test.js
+++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/directives/no_results.test.js
@@ -36,6 +36,31 @@ jest.mock('../../../kibana_services', () => {
};
});
+// Mocking to prevent errors with React portal.
+// Temporary until https://github.com/elastic/kibana/pull/55877 provides other alternatives.
+jest.mock('@elastic/eui/lib/components/code/code_block', () => {
+ const React = require.requireActual('react');
+ return {
+ EuiCodeBlock: ({ children }) => (
+
{"reason":"Bad error"}
+
+ {children}
+ {children}
+
+ ),
+ };
+});
+
beforeEach(() => {
jest.clearAllMocks();
});
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.html b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.html
index efde83a0e35f00..3fd3c5b5b7633b 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.html
+++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.html
@@ -190,6 +190,7 @@ {{screenTitle}}
data-shared-item
data-title="{{opts.savedSearch.lastSavedTitle}}"
data-description="{{opts.savedSearch.description}}"
+ data-test-subj="discoverDocTable"
minimum-visible-rows="minimumVisibleRows"
render-complete
on-add-column="addColumn"
diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js
index 39a9ca6641fd16..bf5049cd976a30 100644
--- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js
+++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js
@@ -60,7 +60,6 @@ import {
ensureDefaultIndexPattern,
registerTimefilterWithGlobalStateFactory,
} from '../../kibana_services';
-import { Vis } from '../../../../../visualizations/public';
const {
core,
@@ -71,6 +70,7 @@ const {
timefilter,
toastNotifications,
uiSettings,
+ visualizations,
} = getServices();
import { getRootBreadcrumbs, getSavedSearchBreadcrumbs } from '../helpers/breadcrumbs';
@@ -990,7 +990,10 @@ function discoverController(
},
};
- $scope.vis = new Vis($scope.searchSource.getField('index'), visSavedObject.visState);
+ $scope.vis = new visualizations.Vis(
+ $scope.searchSource.getField('index'),
+ visSavedObject.visState
+ );
visSavedObject.vis = $scope.vis;
$scope.searchSource.onRequestStart((searchSource, options) => {
diff --git a/src/legacy/core_plugins/kibana/public/discover/plugin.ts b/src/legacy/core_plugins/kibana/public/discover/plugin.ts
index a495b56d5e9ea6..e8ded9d99f8924 100644
--- a/src/legacy/core_plugins/kibana/public/discover/plugin.ts
+++ b/src/legacy/core_plugins/kibana/public/discover/plugin.ts
@@ -16,11 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+import { BehaviorSubject } from 'rxjs';
import { i18n } from '@kbn/i18n';
import { AppMountParameters, CoreSetup, CoreStart, Plugin } from 'kibana/public';
import angular, { auto } from 'angular';
import { UiActionsSetup, UiActionsStart } from 'src/plugins/ui_actions/public';
-import { DataPublicPluginStart } from 'src/plugins/data/public';
+import {
+ DataPublicPluginStart,
+ DataPublicPluginSetup,
+ getQueryStateContainer,
+} from '../../../../../plugins/data/public';
import { registerFeature } from './np_ready/register_feature';
import './kibana_services';
import { IEmbeddableStart, IEmbeddableSetup } from '../../../../../plugins/embeddable/public';
@@ -30,12 +36,20 @@ import { NavigationPublicPluginStart as NavigationStart } from '../../../../../p
import { ChartsPluginStart } from '../../../../../plugins/charts/public';
import { buildServices } from './build_services';
import { SharePluginStart } from '../../../../../plugins/share/public';
-import { KibanaLegacySetup } from '../../../../../plugins/kibana_legacy/public';
+import {
+ KibanaLegacySetup,
+ AngularRenderedAppUpdater,
+} from '../../../../../plugins/kibana_legacy/public';
import { DocViewsRegistry } from './np_ready/doc_views/doc_views_registry';
import { DocViewInput, DocViewInputFn } from './np_ready/doc_views/doc_views_types';
import { DocViewTable } from './np_ready/components/table/table';
import { JsonCodeBlock } from './np_ready/components/json_code_block/json_code_block';
import { HomePublicPluginSetup } from '../../../../../plugins/home/public';
+import {
+ VisualizationsStart,
+ VisualizationsSetup,
+} from '../../../visualizations/public/np_ready/public';
+import { createKbnUrlTracker } from '../../../../../plugins/kibana_utils/public';
/**
* These are the interfaces with your public contracts. You should export these
@@ -51,6 +65,8 @@ export interface DiscoverSetupPlugins {
embeddable: IEmbeddableSetup;
kibanaLegacy: KibanaLegacySetup;
home: HomePublicPluginSetup;
+ visualizations: VisualizationsSetup;
+ data: DataPublicPluginSetup;
}
export interface DiscoverStartPlugins {
uiActions: UiActionsStart;
@@ -60,6 +76,7 @@ export interface DiscoverStartPlugins {
data: DataPublicPluginStart;
share: SharePluginStart;
inspector: any;
+ visualizations: VisualizationsStart;
}
const innerAngularName = 'app/discover';
const embeddableAngularName = 'app/discoverEmbeddable';
@@ -75,6 +92,9 @@ export class DiscoverPlugin implements Plugin
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+