[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 <elasticmachine@users.noreply.github.com>
This commit is contained in:
Felix Stürmer 2024-12-11 12:46:40 +01:00 committed by GitHub
parent fa1998ce92
commit 62e059f0ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 4 deletions

View file

@ -83,6 +83,7 @@ export type LogDocument = Fields &
'kubernetes.pod.name'?: string;
'kubernetes.container.name'?: string;
'orchestrator.resource.name'?: string;
tags?: string | string[];
}>;
class Log extends Serializable<LogDocument> {

View file

@ -217,3 +217,7 @@ export const MORE_THAN_1024_CHARS =
'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?';
export const ANOTHER_1024_CHARS =
'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';
export const CONSISTENT_TAGS = [
'this_is_here_to_remove_variance_introduced_by_the_geoip_processor',
];

View file

@ -9,11 +9,12 @@ import expect from '@kbn/expect';
import moment from 'moment';
import { generateShortId, log, timerange } from '@kbn/apm-synthtrace-client';
import {
ANOTHER_1024_CHARS,
CONSISTENT_TAGS,
MORE_THAN_1024_CHARS,
createDegradedFieldsRecord,
defaultNamespace,
getInitialTestLogs,
ANOTHER_1024_CHARS,
MORE_THAN_1024_CHARS,
} from './data';
import { FtrProviderContext } from '../../../ftr_provider_context';
import { logsSynthMappings } from './custom_mappings/custom_synth_mappings';
@ -55,8 +56,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const apmAppDataStreamName = `${type}-${apmAppDatasetName}-${defaultNamespace}`;
describe('Degraded fields flyout', function () {
// see details: https://github.com/elastic/kibana/issues/202641
this.tags(['failsOnMKI']);
describe('degraded field flyout open-close', () => {
before(async () => {
await synthtrace.index([
@ -207,6 +206,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'service.name': serviceName,
'trace.id': generateShortId(),
test_field: [MORE_THAN_1024_CHARS, ANOTHER_1024_CHARS],
// this works around a geoip limitation in CI
tags: CONSISTENT_TAGS,
})
.timestamp(timestamp)
);
@ -300,6 +301,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'trace.id': generateShortId(),
test_field: [MORE_THAN_1024_CHARS, ANOTHER_1024_CHARS],
'cloud.project.id': generateShortId(),
// this works around a geoip limitation in CI
tags: CONSISTENT_TAGS,
})
.timestamp(timestamp)
);
@ -410,6 +413,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'trace.id': generateShortId(),
test_field: [MORE_THAN_1024_CHARS, ANOTHER_1024_CHARS],
'cloud.project.id': generateShortId(),
// this works around a geoip limitation in CI
tags: CONSISTENT_TAGS,
})
.timestamp(timestamp)
);