Skip to content

Commit

Permalink
Merge branch 'main' into feature-dynamic-template-mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Aug 2, 2022
2 parents 4589dd9 + eb0cfa8 commit 3be2c5e
Show file tree
Hide file tree
Showing 160 changed files with 848 additions and 512 deletions.
7 changes: 6 additions & 1 deletion .buildkite/pipeline-utils/ci-stats/on_complete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ export async function onComplete() {
return;
}

const report = await ciStats.getPrReport(process.env.CI_STATS_BUILD_ID);
const backfillJobIds: string[] = [];
if (process.env.KIBANA_REUSABLE_BUILD_JOB_ID) {
backfillJobIds.push(process.env.KIBANA_REUSABLE_BUILD_JOB_ID);
}

const report = await ciStats.getPrReport(process.env.CI_STATS_BUILD_ID, backfillJobIds);
if (report?.md) {
buildkite.setMetadata('pr_comment:ci_stats_report:body', report.md);

Expand Down
8 changes: 8 additions & 0 deletions .buildkite/scripts/lifecycle/pre_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ if [[ ! "${ES_SNAPSHOT_MANIFEST:-}" ]]; then
ES_SNAPSHOT_MANIFEST_DEFAULT="https://storage.googleapis.com/$BUCKET/manifest.json"
buildkite-agent meta-data set ES_SNAPSHOT_MANIFEST_DEFAULT "$ES_SNAPSHOT_MANIFEST_DEFAULT"
fi

if [[ "${KIBANA_BUILD_ID:-}" && "${KIBANA_REUSABLE_BUILD_JOB_URL:-}" ]]; then
cat << EOF | buildkite-agent annotate --style default --context kibana-reusable-build
This build is using the Kibana distributable built from a different job, as the changes since this build do not seem to require a rebuild.
See job here: $KIBANA_REUSABLE_BUILD_JOB_URL
EOF
fi
2 changes: 1 addition & 1 deletion fleet_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
},
{
"name": "synthetics",
"version": "0.9.4"
"version": "0.10.1"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe('SavedObjectsFinder', () => {
name: 'Search',
getIconForSavedObject: () => 'search' as IconType,
showSavedObject: () => true,
defaultSearchField: 'name',
},
];

Expand All @@ -73,7 +74,7 @@ describe('SavedObjectsFinder', () => {
search: undefined,
page: 1,
perPage: 10,
searchFields: ['title^3', 'description'],
searchFields: ['title^3', 'description', 'name'],
defaultSearchOperator: 'AND',
});
});
Expand Down Expand Up @@ -228,7 +229,7 @@ describe('SavedObjectsFinder', () => {
search: 'abc*',
page: 1,
perPage: 10,
searchFields: ['title^3', 'description'],
searchFields: ['title^3', 'description', 'name'],
defaultSearchOperator: 'AND',
});
});
Expand Down
10 changes: 9 additions & 1 deletion src/plugins/saved_objects/public/finder/saved_object_finder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export interface SavedObjectMetaData<T = unknown> {
showSavedObject?(savedObject: SimpleSavedObject<T>): boolean;
getSavedObjectSubType?(savedObject: SimpleSavedObject<T>): string;
includeFields?: string[];
defaultSearchField?: string;
}

interface FinderAttributes {
Expand Down Expand Up @@ -125,14 +126,21 @@ class SavedObjectFinderUi extends React.Component<
.map((metaData) => metaData.includeFields || [])
.reduce((allFields, currentFields) => allFields.concat(currentFields), ['title', 'name']);

const additionalSearchFields = Object.values(metaDataMap).reduce<string[]>((col, item) => {
if (item.defaultSearchField) {
col.push(item.defaultSearchField);
}
return col;
}, []);

const perPage = this.props.uiSettings.get(LISTING_LIMIT_SETTING);
const resp = await this.props.savedObjects.client.find<FinderAttributes>({
type: Object.keys(metaDataMap),
fields: [...new Set(fields)],
search: query ? `${query}*` : undefined,
page: 1,
perPage,
searchFields: ['title^3', 'description'],
searchFields: ['title^3', 'description', ...additionalSearchFields],
defaultSearchOperator: 'AND',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export class SearchSelection extends React.Component<SearchSelectionProps> {
defaultMessage: 'Data view',
}
),
defaultSearchField: 'name',
},
]}
fixedPageSize={this.fixedPageSize}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x-pack/plugins/apm/common/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { i18n } from '@kbn/i18n';
import { ProcessorEvent } from './processor_event';
import { ProcessorEvent } from '@kbn/observability-plugin/common';
import {
PROCESSOR_EVENT,
SPAN_DESTINATION_SERVICE_RESOURCE,
Expand Down
13 changes: 0 additions & 13 deletions x-pack/plugins/apm/common/elasticsearch_fieldnames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,23 +128,10 @@ export const CLIENT_GEO_COUNTRY_ISO_CODE = 'client.geo.country_iso_code';

// RUM Labels
export const TRANSACTION_URL = 'url.full';
export const CLIENT_GEO = 'client.geo';
export const USER_AGENT_DEVICE = 'user_agent.device.name';
export const USER_AGENT_OS = 'user_agent.os.name';

export const TRANSACTION_TIME_TO_FIRST_BYTE =
'transaction.marks.agent.timeToFirstByte';
export const TRANSACTION_DOM_INTERACTIVE =
'transaction.marks.agent.domInteractive';

export const FCP_FIELD = 'transaction.marks.agent.firstContentfulPaint';
export const LCP_FIELD = 'transaction.marks.agent.largestContentfulPaint';
export const TBT_FIELD = 'transaction.experience.tbt';
export const FID_FIELD = 'transaction.experience.fid';
export const CLS_FIELD = 'transaction.experience.cls';

export const PROFILE_ID = 'profile.id';
export const PROFILE_DURATION = 'profile.duration';
export const PROFILE_TOP_ID = 'profile.top.id';
export const PROFILE_STACK = 'profile.stack';

Expand Down
9 changes: 1 addition & 8 deletions x-pack/plugins/apm/common/processor_event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,9 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { ProcessorEvent } from '@kbn/observability-plugin/common';
import * as t from 'io-ts';

export enum ProcessorEvent {
transaction = 'transaction',
error = 'error',
metric = 'metric',
span = 'span',
profile = 'profile',
}

export const processorEventRt = t.union([
t.literal(ProcessorEvent.transaction),
t.literal(ProcessorEvent.error),
Expand Down
Loading

0 comments on commit 3be2c5e

Please sign in to comment.