Skip to content

[Scout reporter] Set area and owner fields to unknown if no mapping is found#249837

Merged
csr merged 7 commits intoelastic:mainfrom
csr:scout-reporters-use-unknown-for-default-area-fields
Jan 21, 2026
Merged

[Scout reporter] Set area and owner fields to unknown if no mapping is found#249837
csr merged 7 commits intoelastic:mainfrom
csr:scout-reporters-use-unknown-for-default-area-fields

Conversation

@csr
Copy link
Contributor

@csr csr commented Jan 21, 2026

This PR updates our Scout reporters (FTR, Playwright, Jest, Cypress) to use the default unknown value for area fields (e.g. test.file.area, test_run.config.file.area) if no area is available for a given team. The same logic applies to the test.file.owner field.

Area mapping

Find the mapping object in the @kbn/code-owners package:

export const CODE_OWNER_AREA_MAPPINGS: { [area in CodeOwnerArea]: string[] } = {
// BOOKMARK - List of Kibana solutions
platform: [
'elastic/appex-ai-infra',
'elastic/appex-qa',
'elastic/appex-sharedux',
'elastic/docs',
'elastic/eui-team',
'elastic/fleet',
'elastic/kibana-core',
'elastic/kibana-data-discovery',
'elastic/kibana-design',
'elastic/kibana-esql',
'elastic/kibana-localization',
'elastic/kibana-management',
'elastic/kibana-operations',
'elastic/kibana-performance-testing',
'elastic/kibana-presentation',
'elastic/kibana-reporting-services',
'elastic/kibana-security',
'elastic/kibana-tech-leads',
'elastic/kibana-visualizations',
'elastic/logstash',
'elastic/ml-ui',
'elastic/platform-docs',
'elastic/response-ops',
'elastic/stack-monitoring',
'elastic/workflows-eng',
],
search: ['elastic/search-design', 'elastic/search-kibana'],
observability: [
'elastic/actionable-obs-team',
'elastic/obs-ai-team',
'elastic/obs-cloudnative-monitoring',
'elastic/obs-docs',
'elastic/obs-entities',
'elastic/obs-exploration-team',
'elastic/obs-knowledge-team',
'elastic/obs-onboarding-team',
'elastic/obs-presentation-team',
'elastic/obs-ux-management-team',
'elastic/observability-design',
'elastic/observability-ui',
'elastic/observablt-robots',
'elastic/streams-program-team',
],
security: [
'elastic/contextual-security-apps',
'elastic/core-analysis',
'elastic/integration-experience',
'elastic/kibana-cases',
'elastic/kibana-cloud-security-posture',
'elastic/security-data-analytics',
'elastic/security-defend-workflows',
'elastic/security-design',
'elastic/security-detection-engine',
'elastic/security-detection-rule-management',
'elastic/security-detections-response',
'elastic/security-engineering-productivity',
'elastic/security-entity-analytics',
'elastic/security-generative-ai',
'elastic/security-service-integrations',
'elastic/security-solution',
'elastic/security-threat-hunting',
'elastic/security-threat-hunting-investigations',
],
workplaceai: ['elastic/search-kibana', 'elastic/workchat-eng'],
};

We have some transforms in our AppEx QA cluster relying on this mapping. If the area value is undefined, no field is populated and no pivot document is created for a given team. Setting a default unknown field value ensures a document is created in all cases (even before we update the official area <> codeowner mapping).

@csr csr self-assigned this Jan 21, 2026
@csr csr added release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release test:scout labels Jan 21, 2026
return owners
.map((owner) => findAreaForCodeOwner(owner))
.filter((area) => area !== undefined) as CodeOwnerArea[];
.filter((area): area is CodeOwnerArea => area !== undefined);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find using a type predicate instead of the type assertion here safer and more maintainable: TypeScript can verify the filtering logic, whereas type assertions bypass type checking entirely.

path: filePath,
owner: fileOwners,
area: this.getOwnerAreas(fileOwners),
area: areas.length > 0 ? areas : 'unknown',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested this locally by prefixing the run command with SCOUT_REPORTER_ENABLED=true (to collect test events) and ensuring the .scout/reports event files look as expected.

@csr csr marked this pull request as ready for review January 21, 2026 11:41
@csr csr requested review from a team as code owners January 21, 2026 11:41
@csr csr changed the title [Scout reporter] Set test.file.area and test_run.config.file.area to unknown if no mapping is found Jan 21, 2026
@csr csr enabled auto-merge (squash) January 21, 2026 12:03
@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 21, 2026

💔 Build Failed

Failed CI Steps

History

cc @csr

@csr csr merged commit 8f52211 into elastic:main Jan 21, 2026
16 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1, 9.2, 9.3

https://github.com/elastic/kibana/actions/runs/21217994043

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 21, 2026
… is found (elastic#249837)

This PR updates our Scout reporters (FTR, Playwright, Jest, Cypress) to
use the default `unknown` value for area fields (e.g. `test.file.area`,
`test_run.config.file.area`) if no area is available for a given team.
The same logic applies to the `test.file.owner` field.

### Area mapping
Find the mapping object in the `@kbn/code-owners` package:

https://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92

We have some transforms in our AppEx QA cluster relying on this mapping.
If the area value is undefined, no field isn't populated at all and no
document is created for a given team. The transforms relies on the field
to exist, otherwise no document is created. Setting a default `unknown`
field value ensures a document is created in all cases (even before we
update the official area <> codeowner mapping).

(cherry picked from commit 8f52211)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 21, 2026
… is found (elastic#249837)

This PR updates our Scout reporters (FTR, Playwright, Jest, Cypress) to
use the default `unknown` value for area fields (e.g. `test.file.area`,
`test_run.config.file.area`) if no area is available for a given team.
The same logic applies to the `test.file.owner` field.

### Area mapping
Find the mapping object in the `@kbn/code-owners` package:

https://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92

We have some transforms in our AppEx QA cluster relying on this mapping.
If the area value is undefined, no field isn't populated at all and no
document is created for a given team. The transforms relies on the field
to exist, otherwise no document is created. Setting a default `unknown`
field value ensures a document is created in all cases (even before we
update the official area <> codeowner mapping).

(cherry picked from commit 8f52211)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 21, 2026
… is found (elastic#249837)

This PR updates our Scout reporters (FTR, Playwright, Jest, Cypress) to
use the default `unknown` value for area fields (e.g. `test.file.area`,
`test_run.config.file.area`) if no area is available for a given team.
The same logic applies to the `test.file.owner` field.

### Area mapping
Find the mapping object in the `@kbn/code-owners` package:

https://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92

We have some transforms in our AppEx QA cluster relying on this mapping.
If the area value is undefined, no field isn't populated at all and no
document is created for a given team. The transforms relies on the field
to exist, otherwise no document is created. Setting a default `unknown`
field value ensures a document is created in all cases (even before we
update the official area <> codeowner mapping).

(cherry picked from commit 8f52211)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 21, 2026
… is found (elastic#249837)

This PR updates our Scout reporters (FTR, Playwright, Jest, Cypress) to
use the default `unknown` value for area fields (e.g. `test.file.area`,
`test_run.config.file.area`) if no area is available for a given team.
The same logic applies to the `test.file.owner` field.

### Area mapping
Find the mapping object in the `@kbn/code-owners` package:

https://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92

We have some transforms in our AppEx QA cluster relying on this mapping.
If the area value is undefined, no field isn't populated at all and no
document is created for a given team. The transforms relies on the field
to exist, otherwise no document is created. Setting a default `unknown`
field value ensures a document is created in all cases (even before we
update the official area <> codeowner mapping).

(cherry picked from commit 8f52211)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1
9.2
9.3

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 21, 2026
…apping is found (#249837) (#249920)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Scout reporter] Set area and owner fields to `unknown` if no mapping
is found (#249837)](#249837)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Cesare de
Cal","email":"cesare.decal@elastic.co"},"sourceCommit":{"committedDate":"2026-01-21T16:46:44Z","message":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is found
(#249837)\n\nThis PR updates our Scout reporters (FTR, Playwright, Jest,
Cypress) to\nuse the default `unknown` value for area fields (e.g.
`test.file.area`,\n`test_run.config.file.area`) if no area is available
for a given team.\nThe same logic applies to the `test.file.owner`
field.\n\n\n### Area mapping\nFind the mapping object in the
`@kbn/code-owners`
package:\n\n\nhttps://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92\n\nWe
have some transforms in our AppEx QA cluster relying on this
mapping.\nIf the area value is undefined, no field isn't populated at
all and no\ndocument is created for a given team. The transforms relies
on the field\nto exist, otherwise no document is created. Setting a
default `unknown`\nfield value ensures a document is created in all
cases (even before we\nupdate the official area <> codeowner
mapping).","sha":"8f52211d49e79a4eac81592da5a74808fcd54785","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is
found","number":249837,"url":"https://github.com/elastic/kibana/pull/249837","mergeCommit":{"message":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is found
(#249837)\n\nThis PR updates our Scout reporters (FTR, Playwright, Jest,
Cypress) to\nuse the default `unknown` value for area fields (e.g.
`test.file.area`,\n`test_run.config.file.area`) if no area is available
for a given team.\nThe same logic applies to the `test.file.owner`
field.\n\n\n### Area mapping\nFind the mapping object in the
`@kbn/code-owners`
package:\n\n\nhttps://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92\n\nWe
have some transforms in our AppEx QA cluster relying on this
mapping.\nIf the area value is undefined, no field isn't populated at
all and no\ndocument is created for a given team. The transforms relies
on the field\nto exist, otherwise no document is created. Setting a
default `unknown`\nfield value ensures a document is created in all
cases (even before we\nupdate the official area <> codeowner
mapping).","sha":"8f52211d49e79a4eac81592da5a74808fcd54785"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/249837","number":249837,"mergeCommit":{"message":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is found
(#249837)\n\nThis PR updates our Scout reporters (FTR, Playwright, Jest,
Cypress) to\nuse the default `unknown` value for area fields (e.g.
`test.file.area`,\n`test_run.config.file.area`) if no area is available
for a given team.\nThe same logic applies to the `test.file.owner`
field.\n\n\n### Area mapping\nFind the mapping object in the
`@kbn/code-owners`
package:\n\n\nhttps://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92\n\nWe
have some transforms in our AppEx QA cluster relying on this
mapping.\nIf the area value is undefined, no field isn't populated at
all and no\ndocument is created for a given team. The transforms relies
on the field\nto exist, otherwise no document is created. Setting a
default `unknown`\nfield value ensures a document is created in all
cases (even before we\nupdate the official area <> codeowner
mapping).","sha":"8f52211d49e79a4eac81592da5a74808fcd54785"}}]}]
BACKPORT-->

Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
kibanamachine added a commit that referenced this pull request Jan 21, 2026
…apping is found (#249837) (#249922)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[Scout reporter] Set area and owner fields to `unknown` if no mapping
is found (#249837)](#249837)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Cesare de
Cal","email":"cesare.decal@elastic.co"},"sourceCommit":{"committedDate":"2026-01-21T16:46:44Z","message":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is found
(#249837)\n\nThis PR updates our Scout reporters (FTR, Playwright, Jest,
Cypress) to\nuse the default `unknown` value for area fields (e.g.
`test.file.area`,\n`test_run.config.file.area`) if no area is available
for a given team.\nThe same logic applies to the `test.file.owner`
field.\n\n\n### Area mapping\nFind the mapping object in the
`@kbn/code-owners`
package:\n\n\nhttps://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92\n\nWe
have some transforms in our AppEx QA cluster relying on this
mapping.\nIf the area value is undefined, no field isn't populated at
all and no\ndocument is created for a given team. The transforms relies
on the field\nto exist, otherwise no document is created. Setting a
default `unknown`\nfield value ensures a document is created in all
cases (even before we\nupdate the official area <> codeowner
mapping).","sha":"8f52211d49e79a4eac81592da5a74808fcd54785","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is
found","number":249837,"url":"https://github.com/elastic/kibana/pull/249837","mergeCommit":{"message":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is found
(#249837)\n\nThis PR updates our Scout reporters (FTR, Playwright, Jest,
Cypress) to\nuse the default `unknown` value for area fields (e.g.
`test.file.area`,\n`test_run.config.file.area`) if no area is available
for a given team.\nThe same logic applies to the `test.file.owner`
field.\n\n\n### Area mapping\nFind the mapping object in the
`@kbn/code-owners`
package:\n\n\nhttps://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92\n\nWe
have some transforms in our AppEx QA cluster relying on this
mapping.\nIf the area value is undefined, no field isn't populated at
all and no\ndocument is created for a given team. The transforms relies
on the field\nto exist, otherwise no document is created. Setting a
default `unknown`\nfield value ensures a document is created in all
cases (even before we\nupdate the official area <> codeowner
mapping).","sha":"8f52211d49e79a4eac81592da5a74808fcd54785"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/249837","number":249837,"mergeCommit":{"message":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is found
(#249837)\n\nThis PR updates our Scout reporters (FTR, Playwright, Jest,
Cypress) to\nuse the default `unknown` value for area fields (e.g.
`test.file.area`,\n`test_run.config.file.area`) if no area is available
for a given team.\nThe same logic applies to the `test.file.owner`
field.\n\n\n### Area mapping\nFind the mapping object in the
`@kbn/code-owners`
package:\n\n\nhttps://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92\n\nWe
have some transforms in our AppEx QA cluster relying on this
mapping.\nIf the area value is undefined, no field isn't populated at
all and no\ndocument is created for a given team. The transforms relies
on the field\nto exist, otherwise no document is created. Setting a
default `unknown`\nfield value ensures a document is created in all
cases (even before we\nupdate the official area <> codeowner
mapping).","sha":"8f52211d49e79a4eac81592da5a74808fcd54785"}}]}]
BACKPORT-->

Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
kibanamachine added a commit that referenced this pull request Jan 21, 2026
…apping is found (#249837) (#249921)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Scout reporter] Set area and owner fields to `unknown` if no mapping
is found (#249837)](#249837)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Cesare de
Cal","email":"cesare.decal@elastic.co"},"sourceCommit":{"committedDate":"2026-01-21T16:46:44Z","message":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is found
(#249837)\n\nThis PR updates our Scout reporters (FTR, Playwright, Jest,
Cypress) to\nuse the default `unknown` value for area fields (e.g.
`test.file.area`,\n`test_run.config.file.area`) if no area is available
for a given team.\nThe same logic applies to the `test.file.owner`
field.\n\n\n### Area mapping\nFind the mapping object in the
`@kbn/code-owners`
package:\n\n\nhttps://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92\n\nWe
have some transforms in our AppEx QA cluster relying on this
mapping.\nIf the area value is undefined, no field isn't populated at
all and no\ndocument is created for a given team. The transforms relies
on the field\nto exist, otherwise no document is created. Setting a
default `unknown`\nfield value ensures a document is created in all
cases (even before we\nupdate the official area <> codeowner
mapping).","sha":"8f52211d49e79a4eac81592da5a74808fcd54785","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is
found","number":249837,"url":"https://github.com/elastic/kibana/pull/249837","mergeCommit":{"message":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is found
(#249837)\n\nThis PR updates our Scout reporters (FTR, Playwright, Jest,
Cypress) to\nuse the default `unknown` value for area fields (e.g.
`test.file.area`,\n`test_run.config.file.area`) if no area is available
for a given team.\nThe same logic applies to the `test.file.owner`
field.\n\n\n### Area mapping\nFind the mapping object in the
`@kbn/code-owners`
package:\n\n\nhttps://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92\n\nWe
have some transforms in our AppEx QA cluster relying on this
mapping.\nIf the area value is undefined, no field isn't populated at
all and no\ndocument is created for a given team. The transforms relies
on the field\nto exist, otherwise no document is created. Setting a
default `unknown`\nfield value ensures a document is created in all
cases (even before we\nupdate the official area <> codeowner
mapping).","sha":"8f52211d49e79a4eac81592da5a74808fcd54785"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/249837","number":249837,"mergeCommit":{"message":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is found
(#249837)\n\nThis PR updates our Scout reporters (FTR, Playwright, Jest,
Cypress) to\nuse the default `unknown` value for area fields (e.g.
`test.file.area`,\n`test_run.config.file.area`) if no area is available
for a given team.\nThe same logic applies to the `test.file.owner`
field.\n\n\n### Area mapping\nFind the mapping object in the
`@kbn/code-owners`
package:\n\n\nhttps://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92\n\nWe
have some transforms in our AppEx QA cluster relying on this
mapping.\nIf the area value is undefined, no field isn't populated at
all and no\ndocument is created for a given team. The transforms relies
on the field\nto exist, otherwise no document is created. Setting a
default `unknown`\nfield value ensures a document is created in all
cases (even before we\nupdate the official area <> codeowner
mapping).","sha":"8f52211d49e79a4eac81592da5a74808fcd54785"}}]}]
BACKPORT-->

Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
kibanamachine added a commit that referenced this pull request Jan 21, 2026
…mapping is found (#249837) (#249919)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Scout reporter] Set area and owner fields to `unknown` if no mapping
is found (#249837)](#249837)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Cesare de
Cal","email":"cesare.decal@elastic.co"},"sourceCommit":{"committedDate":"2026-01-21T16:46:44Z","message":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is found
(#249837)\n\nThis PR updates our Scout reporters (FTR, Playwright, Jest,
Cypress) to\nuse the default `unknown` value for area fields (e.g.
`test.file.area`,\n`test_run.config.file.area`) if no area is available
for a given team.\nThe same logic applies to the `test.file.owner`
field.\n\n\n### Area mapping\nFind the mapping object in the
`@kbn/code-owners`
package:\n\n\nhttps://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92\n\nWe
have some transforms in our AppEx QA cluster relying on this
mapping.\nIf the area value is undefined, no field isn't populated at
all and no\ndocument is created for a given team. The transforms relies
on the field\nto exist, otherwise no document is created. Setting a
default `unknown`\nfield value ensures a document is created in all
cases (even before we\nupdate the official area <> codeowner
mapping).","sha":"8f52211d49e79a4eac81592da5a74808fcd54785","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is
found","number":249837,"url":"https://github.com/elastic/kibana/pull/249837","mergeCommit":{"message":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is found
(#249837)\n\nThis PR updates our Scout reporters (FTR, Playwright, Jest,
Cypress) to\nuse the default `unknown` value for area fields (e.g.
`test.file.area`,\n`test_run.config.file.area`) if no area is available
for a given team.\nThe same logic applies to the `test.file.owner`
field.\n\n\n### Area mapping\nFind the mapping object in the
`@kbn/code-owners`
package:\n\n\nhttps://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92\n\nWe
have some transforms in our AppEx QA cluster relying on this
mapping.\nIf the area value is undefined, no field isn't populated at
all and no\ndocument is created for a given team. The transforms relies
on the field\nto exist, otherwise no document is created. Setting a
default `unknown`\nfield value ensures a document is created in all
cases (even before we\nupdate the official area <> codeowner
mapping).","sha":"8f52211d49e79a4eac81592da5a74808fcd54785"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/249837","number":249837,"mergeCommit":{"message":"[Scout
reporter] Set area and owner fields to `unknown` if no mapping is found
(#249837)\n\nThis PR updates our Scout reporters (FTR, Playwright, Jest,
Cypress) to\nuse the default `unknown` value for area fields (e.g.
`test.file.area`,\n`test_run.config.file.area`) if no area is available
for a given team.\nThe same logic applies to the `test.file.owner`
field.\n\n\n### Area mapping\nFind the mapping object in the
`@kbn/code-owners`
package:\n\n\nhttps://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92\n\nWe
have some transforms in our AppEx QA cluster relying on this
mapping.\nIf the area value is undefined, no field isn't populated at
all and no\ndocument is created for a given team. The transforms relies
on the field\nto exist, otherwise no document is created. Setting a
default `unknown`\nfield value ensures a document is created in all
cases (even before we\nupdate the official area <> codeowner
mapping).","sha":"8f52211d49e79a4eac81592da5a74808fcd54785"}}]}]
BACKPORT-->

Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
@csr csr deleted the scout-reporters-use-unknown-for-default-area-fields branch January 22, 2026 08:00
qn895 pushed a commit to qn895/kibana that referenced this pull request Jan 22, 2026
… is found (elastic#249837)

This PR updates our Scout reporters (FTR, Playwright, Jest, Cypress) to
use the default `unknown` value for area fields (e.g. `test.file.area`,
`test_run.config.file.area`) if no area is available for a given team.
The same logic applies to the `test.file.owner` field.


### Area mapping
Find the mapping object in the `@kbn/code-owners` package:


https://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92

We have some transforms in our AppEx QA cluster relying on this mapping.
If the area value is undefined, no field isn't populated at all and no
document is created for a given team. The transforms relies on the field
to exist, otherwise no document is created. Setting a default `unknown`
field value ensures a document is created in all cases (even before we
update the official area <> codeowner mapping).
dennis-tismenko pushed a commit to dennis-tismenko/kibana that referenced this pull request Jan 22, 2026
… is found (elastic#249837)

This PR updates our Scout reporters (FTR, Playwright, Jest, Cypress) to
use the default `unknown` value for area fields (e.g. `test.file.area`,
`test_run.config.file.area`) if no area is available for a given team.
The same logic applies to the `test.file.owner` field.


### Area mapping
Find the mapping object in the `@kbn/code-owners` package:


https://github.com/elastic/kibana/blob/48d93fc2eb5702feab0c3f8696a377b8ec2455c2/src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts#L25-L92

We have some transforms in our AppEx QA cluster relying on this mapping.
If the area value is undefined, no field isn't populated at all and no
document is created for a given team. The transforms relies on the field
to exist, otherwise no document is created. Setting a default `unknown`
field value ensures a document is created in all cases (even before we
update the official area <> codeowner mapping).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release release_note:skip Skip the PR/issue when compiling release notes test:scout v8.19.11 v9.1.11 v9.2.5 v9.3.0 v9.4.0

5 participants