Skip to content

Commit 62e059f

Browse files
[Dataset Quality] Work around a geoip limitation in CI (#203165)
The geoip database is not available in CI, so a `tags` field is added to all ingested APM app log documents. This covers up the difference in field counts between serverless CI and MKI by always having a `tags` field in the documents. It also unskips the test that failed in MKI because of this. Co-authored-by: Elastic Machine <[email protected]>
1 parent fa1998c commit 62e059f

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

packages/kbn-apm-synthtrace-client/src/lib/logs/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export type LogDocument = Fields &
8383
'kubernetes.pod.name'?: string;
8484
'kubernetes.container.name'?: string;
8585
'orchestrator.resource.name'?: string;
86+
tags?: string | string[];
8687
}>;
8788

8889
class Log extends Serializable<LogDocument> {

x-pack/test_serverless/functional/test_suites/observability/dataset_quality/data/logs_data.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,7 @@ export const MORE_THAN_1024_CHARS =
217217
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?';
218218
export const ANOTHER_1024_CHARS =
219219
'grape fig tangerine tangerine kiwi lemon papaya cherry nectarine papaya mango cherry nectarine fig cherry fig grape mango mango quince fig strawberry mango quince date kiwi quince raspberry apple kiwi banana quince fig papaya grape mango cherry banana mango cherry lemon cherry tangerine fig quince quince papaya tangerine grape strawberry banana kiwi grape mango papaya nectarine banana nectarine kiwi papaya lemon apple lemon orange fig cherry grape apple nectarine papaya orange fig papaya date mango papaya mango cherry tangerine papaya apple banana papaya cherry strawberry grape raspberry lemon date papaya mango kiwi cherry fig banana banana apple date strawberry mango tangerine date lemon kiwi quince date orange orange papaya date apple fig tangerine quince tangerine date papaya banana banana orange raspberry papaya apple nectarine lemon raspberry raspberry mango cherry kiwi cherry cherry nectarine cherry date strawberry banana orange mango mango tangerine quince papaya papaya kiwi papaya strawberry date mango';
220+
221+
export const CONSISTENT_TAGS = [
222+
'this_is_here_to_remove_variance_introduced_by_the_geoip_processor',
223+
];

x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ import expect from '@kbn/expect';
99
import moment from 'moment';
1010
import { generateShortId, log, timerange } from '@kbn/apm-synthtrace-client';
1111
import {
12+
ANOTHER_1024_CHARS,
13+
CONSISTENT_TAGS,
14+
MORE_THAN_1024_CHARS,
1215
createDegradedFieldsRecord,
1316
defaultNamespace,
1417
getInitialTestLogs,
15-
ANOTHER_1024_CHARS,
16-
MORE_THAN_1024_CHARS,
1718
} from './data';
1819
import { FtrProviderContext } from '../../../ftr_provider_context';
1920
import { logsSynthMappings } from './custom_mappings/custom_synth_mappings';
@@ -55,8 +56,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
5556
const apmAppDataStreamName = `${type}-${apmAppDatasetName}-${defaultNamespace}`;
5657

5758
describe('Degraded fields flyout', function () {
58-
// see details: https://github.com/elastic/kibana/issues/202641
59-
this.tags(['failsOnMKI']);
6059
describe('degraded field flyout open-close', () => {
6160
before(async () => {
6261
await synthtrace.index([
@@ -207,6 +206,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
207206
'service.name': serviceName,
208207
'trace.id': generateShortId(),
209208
test_field: [MORE_THAN_1024_CHARS, ANOTHER_1024_CHARS],
209+
// this works around a geoip limitation in CI
210+
tags: CONSISTENT_TAGS,
210211
})
211212
.timestamp(timestamp)
212213
);
@@ -300,6 +301,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
300301
'trace.id': generateShortId(),
301302
test_field: [MORE_THAN_1024_CHARS, ANOTHER_1024_CHARS],
302303
'cloud.project.id': generateShortId(),
304+
// this works around a geoip limitation in CI
305+
tags: CONSISTENT_TAGS,
303306
})
304307
.timestamp(timestamp)
305308
);
@@ -410,6 +413,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
410413
'trace.id': generateShortId(),
411414
test_field: [MORE_THAN_1024_CHARS, ANOTHER_1024_CHARS],
412415
'cloud.project.id': generateShortId(),
416+
// this works around a geoip limitation in CI
417+
tags: CONSISTENT_TAGS,
413418
})
414419
.timestamp(timestamp)
415420
);

0 commit comments

Comments
 (0)