Skip to content

Commit ef1fb30

Browse files
[8.19] fix Failing test: Maps - maps telemetry - should return the correct telemetry values for map saved objects (#268284) (#268462)
# Backport This will backport the following commits from `main` to `8.19`: - [fix Failing test: Maps - maps telemetry - should return the correct telemetry values for map saved objects (#268284)](#268284) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2026-05-08T14:18:26Z","message":"fix Failing test: Maps - maps telemetry - should return the correct telemetry values for map saved objects (#268284)\n\nCloses https://github.com/elastic/kibana/issues/265020\n\nflaky test runner\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/12177\n\n@dmlemeshko shared this information in slack\n\"We are constantly working on improving CI runtime and just yesterday we\nmerged \"lanes distribibution\": It works similar to FTR configs balancing\n(we balance Playwright configs into similar runtime groups) but we start\nES/Kibana only 1 time and then run multiple configs one by one. What it\nmeans: checking geoPointFieldStats.count without taking into\nconsideration the system state is brittle: there is a chance other tests\naffected these stats and maps telemetry should either do a pre-cleanup\nor change the validation to not rely on \"clean Kibana/ES state\"\"\n\nIt is not possible to clean up all Elasticsearch indices since they need\nto be cleaned up by name and this will always be brittle. Instead,\nexpect statements are updated to `toBeGreaterThanOrEqual`. The goal of\nthis test is to ensure telemetry is being collected for available geo\nfields. Ensuring exact values is not as important. Saved objects are\ncleaned up type so maps usage telemetry should allow for exact\nvalidation.","sha":"e225ba6e94ff90cbe5e93fde7dea73804710bf58","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","backport:all-open","v9.5.0"],"title":"fix Failing test: Maps - maps telemetry - should return the correct telemetry values for map saved objects","number":268284,"url":"https://github.com/elastic/kibana/pull/268284","mergeCommit":{"message":"fix Failing test: Maps - maps telemetry - should return the correct telemetry values for map saved objects (#268284)\n\nCloses https://github.com/elastic/kibana/issues/265020\n\nflaky test runner\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/12177\n\n@dmlemeshko shared this information in slack\n\"We are constantly working on improving CI runtime and just yesterday we\nmerged \"lanes distribibution\": It works similar to FTR configs balancing\n(we balance Playwright configs into similar runtime groups) but we start\nES/Kibana only 1 time and then run multiple configs one by one. What it\nmeans: checking geoPointFieldStats.count without taking into\nconsideration the system state is brittle: there is a chance other tests\naffected these stats and maps telemetry should either do a pre-cleanup\nor change the validation to not rely on \"clean Kibana/ES state\"\"\n\nIt is not possible to clean up all Elasticsearch indices since they need\nto be cleaned up by name and this will always be brittle. Instead,\nexpect statements are updated to `toBeGreaterThanOrEqual`. The goal of\nthis test is to ensure telemetry is being collected for available geo\nfields. Ensuring exact values is not as important. Saved objects are\ncleaned up type so maps usage telemetry should allow for exact\nvalidation.","sha":"e225ba6e94ff90cbe5e93fde7dea73804710bf58"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/268284","number":268284,"mergeCommit":{"message":"fix Failing test: Maps - maps telemetry - should return the correct telemetry values for map saved objects (#268284)\n\nCloses https://github.com/elastic/kibana/issues/265020\n\nflaky test runner\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/12177\n\n@dmlemeshko shared this information in slack\n\"We are constantly working on improving CI runtime and just yesterday we\nmerged \"lanes distribibution\": It works similar to FTR configs balancing\n(we balance Playwright configs into similar runtime groups) but we start\nES/Kibana only 1 time and then run multiple configs one by one. What it\nmeans: checking geoPointFieldStats.count without taking into\nconsideration the system state is brittle: there is a chance other tests\naffected these stats and maps telemetry should either do a pre-cleanup\nor change the validation to not rely on \"clean Kibana/ES state\"\"\n\nIt is not possible to clean up all Elasticsearch indices since they need\nto be cleaned up by name and this will always be brittle. Instead,\nexpect statements are updated to `toBeGreaterThanOrEqual`. The goal of\nthis test is to ensure telemetry is being collected for available geo\nfields. Ensuring exact values is not as important. Saved objects are\ncleaned up type so maps usage telemetry should allow for exact\nvalidation.","sha":"e225ba6e94ff90cbe5e93fde7dea73804710bf58"}}]}] BACKPORT--> Co-authored-by: Nathan Reese <reese.nathan@elastic.co>
1 parent bf1b5e5 commit ef1fb30

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

x-pack/platform/plugins/shared/maps/test/scout/api/tests/maps_telemetry.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,12 @@ apiTest.describe('Maps - maps telemetry', { tag: [...tags.stateful.classic] }, (
4444
const geoPointFieldStats = apiResponse.cluster_stats.indices.mappings.field_types.find(
4545
(fieldStat: { name: string }) => fieldStat.name === 'geo_point'
4646
);
47-
expect(geoPointFieldStats.count).toBe(71);
48-
expect(geoPointFieldStats.index_count).toBe(14);
47+
expect(geoPointFieldStats.count).toBeGreaterThanOrEqual(71);
4948

5049
const geoShapeFieldStats = apiResponse.cluster_stats.indices.mappings.field_types.find(
5150
(fieldStat: { name: string }) => fieldStat.name === 'geo_shape'
5251
);
53-
expect(geoShapeFieldStats.count).toBe(3);
54-
expect(geoShapeFieldStats.index_count).toBe(3);
52+
expect(geoShapeFieldStats.count).toBeGreaterThanOrEqual(3);
5553

5654
const mapUsage = apiResponse.stack_stats.kibana.plugins.maps;
5755
delete mapUsage.timeCaptured;

0 commit comments

Comments
 (0)