Skip to content

Commit

Permalink
Merge branch 'master' into saved-objects-aggs
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Nov 12, 2020
2 parents 48dcdda + 6f1fa74 commit 2dc3ff8
Show file tree
Hide file tree
Showing 74 changed files with 251 additions and 236 deletions.
7 changes: 4 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/src/plugins/vis_type_vislib/ @elastic/kibana-app
/src/plugins/vis_type_xy/ @elastic/kibana-app
/src/plugins/visualize/ @elastic/kibana-app
/src/plugins/visualizations/ @elastic/kibana-application
/src/plugins/visualizations/ @elastic/kibana-app

# Application Services
/examples/bfetch_explorer/ @elastic/kibana-app-arch
Expand Down Expand Up @@ -123,8 +123,8 @@
# ML team owns and maintains the transform plugin despite it living in the Elasticsearch management section.
/x-pack/plugins/transform/ @elastic/ml-ui
/x-pack/test/functional/apps/transform/ @elastic/ml-ui
/x-pack/test/functional/services/transform/ @elastic/ml-ui/
x-pack/test/api_integration_basic/apis/ml/ @elastic/ml-ui
/x-pack/test/functional/services/transform/ @elastic/ml-ui
/x-pack/test/api_integration_basic/apis/ml/ @elastic/ml-ui
/x-pack/test/functional_basic/apps/ml/ @elastic/ml-ui

/x-pack/test/api_integration_basic/apis/transform/ @elastic/ml-ui
Expand Down Expand Up @@ -261,6 +261,7 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
# Elasticsearch UI
/src/plugins/dev_tools/ @elastic/es-ui
/src/plugins/console/ @elastic/es-ui
/src/plugins/es_ui_shared/ @elastic/es-ui
/x-pack/plugins/cross_cluster_replication/ @elastic/es-ui
/x-pack/plugins/index_lifecycle_management/ @elastic/es-ui
/x-pack/plugins/console_extensions/ @elastic/es-ui
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export class KbnClientUiSettings {
body: {
changes: updates,
},
retries: 3,
});
}

Expand Down
15 changes: 9 additions & 6 deletions src/dev/typescript/run_check_ts_projects_cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { resolve } from 'path';
import { resolve, relative } from 'path';

import execa from 'execa';

Expand All @@ -35,7 +35,7 @@ export async function runCheckTsProjectsCli() {
});

const isNotInTsProject: File[] = [];
const isInMultipleTsProjects: File[] = [];
const isInMultipleTsProjects: string[] = [];

for (const lineRaw of files.split('\n')) {
const line = lineRaw.trim();
Expand All @@ -56,7 +56,11 @@ export async function runCheckTsProjectsCli() {
isNotInTsProject.push(file);
}
if (projects.length > 1 && !file.isTypescriptAmbient()) {
isInMultipleTsProjects.push(file);
isInMultipleTsProjects.push(
` - ${file.getRelativePath()}:\n${projects
.map((p) => ` - ${relative(process.cwd(), p.tsConfigPath)}`)
.join('\n')}`
);
}
}

Expand All @@ -74,10 +78,9 @@ export async function runCheckTsProjectsCli() {
}

if (isInMultipleTsProjects.length) {
const details = isInMultipleTsProjects.join('\n');
log.error(
`The following files belong to multiple tsconfig.json files listed in src/dev/typescript/projects.ts\n${isInMultipleTsProjects
.map((file) => ` - ${file.getRelativePath()}`)
.join('\n')}`
`The following files belong to multiple tsconfig.json files listed in src/dev/typescript/projects.ts\n${details}`
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { ESFilter } from '../../../../../../typings/elasticsearch';
import {
ERROR_GROUP_ID,
PROCESSOR_EVENT,
Expand All @@ -12,7 +13,6 @@ import {
TRANSACTION_TYPE,
} from '../../../../common/elasticsearch_fieldnames';
import { UIProcessorEvent } from '../../../../common/processor_event';
import { ESFilter } from '../../../../typings/elasticsearch';
import { IUrlParams } from '../../../context/UrlParamsContext/types';

export function getBoolFilter({
Expand Down
20 changes: 10 additions & 10 deletions x-pack/plugins/apm/public/utils/testHelpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@

/* global jest */

import React from 'react';
import { ReactWrapper, mount, MountRendererProps } from 'enzyme';
import { render, waitFor } from '@testing-library/react';
import { mount, MountRendererProps, ReactWrapper } from 'enzyme';
import enzymeToJson from 'enzyme-to-json';
import { Location } from 'history';
import moment from 'moment';
import { Moment } from 'moment-timezone';
import { render, waitFor } from '@testing-library/react';
import React from 'react';
import { MemoryRouter } from 'react-router-dom';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { APMConfig } from '../../server';
import { PromiseReturnType } from '../../typings/common';
import { EuiThemeProvider } from '../../../observability/public';
import {
ESFilter,
ESSearchResponse,
ESSearchRequest,
} from '../../typings/elasticsearch';
ESSearchResponse,
} from '../../../../typings/elasticsearch';
import { EuiThemeProvider } from '../../../observability/public';
import { PromiseReturnType } from '../../../observability/typings/common';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { APMConfig } from '../../server';
import { UIFilters } from '../../typings/ui_filters';
import { MockApmPluginContextWrapper } from '../context/ApmPluginContext/MockApmPluginContext';
import { UrlParamsProvider } from '../context/UrlParamsContext';
import { UIFilters } from '../../typings/ui_filters';

const originalConsoleWarn = console.warn; // eslint-disable-line no-console
/**
Expand Down
5 changes: 4 additions & 1 deletion x-pack/plugins/apm/scripts/shared/get_es_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

import { Client } from '@elastic/elasticsearch';
import { ApiKeyAuth, BasicAuth } from '@elastic/elasticsearch/lib/pool';
import { ESSearchResponse, ESSearchRequest } from '../../typings/elasticsearch';
import {
ESSearchResponse,
ESSearchRequest,
} from '../../../../typings/elasticsearch';

export type ESClient = ReturnType<typeof getEsClient>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { isEmpty } from 'lodash';
import { Observable } from 'rxjs';
import { take } from 'rxjs/operators';
import { APMConfig } from '../..';
import { ESSearchResponse } from '../../../../../typings/elasticsearch';
import { AlertingPlugin } from '../../../../alerts/server';
import { AlertType, ALERT_TYPES_CONFIG } from '../../../common/alert_types';
import {
Expand All @@ -17,7 +18,6 @@ import {
SERVICE_NAME,
} from '../../../common/elasticsearch_fieldnames';
import { ProcessorEvent } from '../../../common/processor_event';
import { ESSearchResponse } from '../../../typings/elasticsearch';
import { getEnvironmentUiFilterES } from '../helpers/convert_ui_filters/get_environment_ui_filter_es';
import { getApmIndices } from '../settings/apm_indices/get_apm_indices';
import { apmActionVariables } from './action_variables';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
import { schema } from '@kbn/config-schema';
import { Observable } from 'rxjs';
import { take } from 'rxjs/operators';
import { getDurationFormatter } from '../../../common/utils/formatters';
import { ProcessorEvent } from '../../../common/processor_event';
import { APMConfig } from '../..';
import { ESSearchResponse } from '../../../../../typings/elasticsearch';
import { AlertingPlugin } from '../../../../alerts/server';
import { AlertType, ALERT_TYPES_CONFIG } from '../../../common/alert_types';
import { ESSearchResponse } from '../../../typings/elasticsearch';
import {
PROCESSOR_EVENT,
SERVICE_ENVIRONMENT,
SERVICE_NAME,
TRANSACTION_TYPE,
TRANSACTION_DURATION,
SERVICE_ENVIRONMENT,
TRANSACTION_TYPE,
} from '../../../common/elasticsearch_fieldnames';
import { AlertingPlugin } from '../../../../alerts/server';
import { getApmIndices } from '../settings/apm_indices/get_apm_indices';
import { APMConfig } from '../..';
import { ProcessorEvent } from '../../../common/processor_event';
import { getDurationFormatter } from '../../../common/utils/formatters';
import { getEnvironmentUiFilterES } from '../helpers/convert_ui_filters/get_environment_ui_filter_es';
import { getApmIndices } from '../settings/apm_indices/get_apm_indices';
import { apmActionVariables } from './action_variables';

interface RegisterAlertParams {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
*/

import { schema } from '@kbn/config-schema';
import { isEmpty } from 'lodash';
import { Observable } from 'rxjs';
import { take } from 'rxjs/operators';
import { isEmpty } from 'lodash';
import { asDecimalOrInteger } from '../../../common/utils/formatters';
import { ProcessorEvent } from '../../../common/processor_event';
import { EventOutcome } from '../../../common/event_outcome';
import { APMConfig } from '../..';
import { ESSearchResponse } from '../../../../../typings/elasticsearch';
import { AlertingPlugin } from '../../../../alerts/server';
import { AlertType, ALERT_TYPES_CONFIG } from '../../../common/alert_types';
import { ESSearchResponse } from '../../../typings/elasticsearch';
import {
EVENT_OUTCOME,
PROCESSOR_EVENT,
SERVICE_ENVIRONMENT,
SERVICE_NAME,
TRANSACTION_TYPE,
EVENT_OUTCOME,
SERVICE_ENVIRONMENT,
} from '../../../common/elasticsearch_fieldnames';
import { AlertingPlugin } from '../../../../alerts/server';
import { getApmIndices } from '../settings/apm_indices/get_apm_indices';
import { APMConfig } from '../..';
import { EventOutcome } from '../../../common/event_outcome';
import { ProcessorEvent } from '../../../common/processor_event';
import { asDecimalOrInteger } from '../../../common/utils/formatters';
import { getEnvironmentUiFilterES } from '../helpers/convert_ui_filters/get_environment_ui_filter_es';
import { getApmIndices } from '../settings/apm_indices/get_apm_indices';
import { apmActionVariables } from './action_variables';

interface RegisterAlertParams {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { IndicesStatsParams, Client } from 'elasticsearch';
import {
ESSearchRequest,
ESSearchResponse,
} from '../../../../typings/elasticsearch';
} from '../../../../../../typings/elasticsearch';
import { ApmIndicesConfig } from '../../settings/apm_indices/get_apm_indices';
import { tasks } from './tasks';
import { APMDataTelemetry } from '../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import { ValuesType } from 'utility-types';
import { flatten, merge, sortBy, sum, pickBy } from 'lodash';
import { AggregationOptionsByType } from '../../../../typings/elasticsearch/aggregations';
import { AggregationOptionsByType } from '../../../../../../typings/elasticsearch/aggregations';
import { ProcessorEvent } from '../../../../common/processor_event';
import { TelemetryTask } from '.';
import { AGENT_NAMES, RUM_AGENT_NAMES } from '../../../../common/agent_name';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { ProcessorEvent } from '../../../../common/processor_event';
import { ESFilter } from '../../../../typings/elasticsearch';
import { ESFilter } from '../../../../../../typings/elasticsearch';
import {
ERROR_GROUP_ID,
SERVICE_NAME,
} from '../../../../common/elasticsearch_fieldnames';
import { ProcessorEvent } from '../../../../common/processor_event';
import { rangeFilter } from '../../../../common/utils/range_filter';
import { Setup, SetupTimeRange } from '../../helpers/setup_request';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { PromiseReturnType } from '../../../../typings/common';
import { PromiseReturnType } from '../../../../../observability/typings/common';
import { Setup, SetupTimeRange } from '../../helpers/setup_request';
import { getBuckets } from './get_buckets';
import { BUCKET_TARGET_COUNT } from '../../transactions/constants';
import { getBuckets } from './get_buckets';

function getBucketSize({ start, end }: SetupTimeRange) {
return Math.floor((end - start) / BUCKET_TARGET_COUNT);
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/apm/server/lib/errors/get_error_group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { ProcessorEvent } from '../../../common/processor_event';
import { PromiseReturnType } from '../../../../observability/typings/common';
import {
ERROR_GROUP_ID,
SERVICE_NAME,
TRANSACTION_SAMPLED,
} from '../../../common/elasticsearch_fieldnames';
import { PromiseReturnType } from '../../../typings/common';
import { ProcessorEvent } from '../../../common/processor_event';
import { rangeFilter } from '../../../common/utils/range_filter';
import { Setup, SetupTimeRange } from '../helpers/setup_request';
import { getTransaction } from '../transactions/get_transaction';
Expand Down
6 changes: 3 additions & 3 deletions x-pack/plugins/apm/server/lib/errors/get_error_groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { SortOptions } from '../../../../../typings/elasticsearch/aggregations';
import { PromiseReturnType } from '../../../../observability/typings/common';
import {
ERROR_CULPRIT,
ERROR_EXC_HANDLED,
Expand All @@ -12,11 +14,9 @@ import {
ERROR_GROUP_ID,
ERROR_LOG_MESSAGE,
} from '../../../common/elasticsearch_fieldnames';
import { PromiseReturnType } from '../../../typings/common';
import { Setup, SetupTimeRange } from '../helpers/setup_request';
import { getErrorGroupsProjection } from '../../projections/errors';
import { mergeProjection } from '../../projections/util/merge_projection';
import { SortOptions } from '../../../typings/elasticsearch/aggregations';
import { Setup, SetupTimeRange } from '../helpers/setup_request';

export type ErrorGroupListAPIResponse = PromiseReturnType<
typeof getErrorGroups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { ESFilter } from '../../../../typings/elasticsearch';
import { ESFilter } from '../../../../../../typings/elasticsearch';
import {
ENVIRONMENT_NOT_DEFINED,
ENVIRONMENT_ALL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { ESFilter } from '../../../../typings/elasticsearch';
import { ESFilter } from '../../../../../../typings/elasticsearch';
import { UIFilters } from '../../../../typings/ui_filters';
import { getEnvironmentUiFilterES } from './get_environment_ui_filter_es';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { OBSERVER_VERSION_MAJOR } from '../../../../../common/elasticsearch_fiel
import {
ESSearchRequest,
ESFilter,
} from '../../../../../typings/elasticsearch';
} from '../../../../../../../typings/elasticsearch';

/*
Adds a range query to the ES request to exclude legacy data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ProcessorEvent } from '../../../../../common/processor_event';
import {
ESSearchRequest,
ESSearchResponse,
} from '../../../../../typings/elasticsearch';
} from '../../../../../../../typings/elasticsearch';
import { ApmIndicesConfig } from '../../../settings/apm_indices/get_apm_indices';
import { addFilterToExcludeLegacyData } from './add_filter_to_exclude_legacy_data';
import { callClientWithDebug } from '../call_client_with_debug';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ProcessorEvent } from '../../../../../common/processor_event';
import {
ESSearchRequest,
ESFilter,
} from '../../../../../typings/elasticsearch';
} from '../../../../../../../typings/elasticsearch';
import { APMEventESSearchRequest } from '.';
import {
ApmIndicesConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { APMRequestHandlerContext } from '../../../../routes/typings';
import {
ESSearchResponse,
ESSearchRequest,
} from '../../../../../typings/elasticsearch';
} from '../../../../../../../typings/elasticsearch';
import { callClientWithDebug } from '../call_client_with_debug';

// `type` was deprecated in 7.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { CoreSetup } from 'src/core/server';
import { PromiseReturnType } from '../../../typings/common';
import { PromiseReturnType } from '../../../../observability/typings/common';

export type InternalSavedObjectsClient = PromiseReturnType<
typeof getInternalSavedObjectsClient
Expand Down
Loading

0 comments on commit 2dc3ff8

Please sign in to comment.