Skip to content

[CI] Enable Jest selective testing by default on PRs#266326

Merged
delanni merged 3 commits intomainfrom
enable-selective-jest-default
Apr 29, 2026
Merged

[CI] Enable Jest selective testing by default on PRs#266326
delanni merged 3 commits intomainfrom
enable-selective-jest-default

Conversation

@delanni
Copy link
Copy Markdown
Member

@delanni delanni commented Apr 29, 2026

Summary

Followup of: #259137

Jest unit and integration test groups are filtered to affected packages on PR builds by default. Add the GitHub label ci:prevent-selective-testing to run the full Jest suite. The previous opt-in label ci:use-selective-testing is removed. On-merge and other non-PR pipelines are unchanged (GITHUB_PR_NUMBER unset).

On pull request builds, Jest unit and integration test groups are narrowed to configs under affected packages (see pick_test_group_run_order in CI stats). Add the GitHub label ci:prevent-selective-testing to run the full Jest suite instead. Touching files listed in CRITICAL_FILES_JEST_* in const.ts also skips filtering for the relevant test type.

Made with Cursor

Add ci:prevent-selective-testing opt-out; remove ci:use-selective-testing.

Made-with: Cursor
@delanni delanni added Team:Operations Kibana-Operations Team release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release labels Apr 29, 2026
@delanni delanni marked this pull request as ready for review April 29, 2026 09:30
@delanni delanni requested a review from a team as a code owner April 29, 2026 09:30
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

Pinging @elastic/kibana-operations (Team:Operations)

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 29, 2026

Approvability

Verdict: Needs human review

This PR changes the default CI behavior from opt-in to opt-out for Jest selective testing on all PR builds. While the logic is straightforward, all changed files are owned by @elastic/kibana-operations and should be reviewed by that team.

You can customize Macroscope's approvability policy. Learn more.

Copy link
Copy Markdown
Contributor

@TamerlanG TamerlanG left a comment

Choose a reason for hiding this comment

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

nice lgtm

@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

@delanni delanni changed the title Enable Jest selective testing by default on PRs [CI] Enable Jest selective testing by default on PRs Apr 29, 2026
@delanni delanni merged commit f29a9c3 into main Apr 29, 2026
28 checks passed
@delanni delanni deleted the enable-selective-jest-default branch April 29, 2026 13:19
@kibanamachine
Copy link
Copy Markdown
Contributor

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

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

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.2
9.3
9.4

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 Apr 29, 2026
…266397)

# Backport

This will backport the following commits from `main` to `9.4`:
- [[CI] Enable Jest selective testing by default on PRs
(#266326)](#266326)

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

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

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2026-04-29T13:19:44Z","message":"[CI]
Enable Jest selective testing by default on PRs (#266326)\n\n##
Summary\n\nJest unit and integration test groups are filtered to
affected packages\non PR builds by default. Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite. The
previous\nopt-in label `ci:use-selective-testing` is removed. On-merge
and other\nnon-PR pipelines are unchanged (`GITHUB_PR_NUMBER`
unset).\n\n> On pull request builds, Jest unit and integration test
groups are\nnarrowed to configs under affected packages
(see\n`pick_test_group_run_order` in CI stats). Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite
instead.\nTouching files listed in `CRITICAL_FILES_JEST_*` in `const.ts`
also\nskips filtering for the relevant test type.\n\n\nMade with
[Cursor](https://cursor.com)","sha":"f29a9c33c52944a12d6d0ca6cc6dfaf46426795a","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v9.5.0"],"title":"[CI]
Enable Jest selective testing by default on
PRs","number":266326,"url":"https://github.com/elastic/kibana/pull/266326","mergeCommit":{"message":"[CI]
Enable Jest selective testing by default on PRs (#266326)\n\n##
Summary\n\nJest unit and integration test groups are filtered to
affected packages\non PR builds by default. Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite. The
previous\nopt-in label `ci:use-selective-testing` is removed. On-merge
and other\nnon-PR pipelines are unchanged (`GITHUB_PR_NUMBER`
unset).\n\n> On pull request builds, Jest unit and integration test
groups are\nnarrowed to configs under affected packages
(see\n`pick_test_group_run_order` in CI stats). Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite
instead.\nTouching files listed in `CRITICAL_FILES_JEST_*` in `const.ts`
also\nskips filtering for the relevant test type.\n\n\nMade with
[Cursor](https://cursor.com)","sha":"f29a9c33c52944a12d6d0ca6cc6dfaf46426795a"}},"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/266326","number":266326,"mergeCommit":{"message":"[CI]
Enable Jest selective testing by default on PRs (#266326)\n\n##
Summary\n\nJest unit and integration test groups are filtered to
affected packages\non PR builds by default. Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite. The
previous\nopt-in label `ci:use-selective-testing` is removed. On-merge
and other\nnon-PR pipelines are unchanged (`GITHUB_PR_NUMBER`
unset).\n\n> On pull request builds, Jest unit and integration test
groups are\nnarrowed to configs under affected packages
(see\n`pick_test_group_run_order` in CI stats). Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite
instead.\nTouching files listed in `CRITICAL_FILES_JEST_*` in `const.ts`
also\nskips filtering for the relevant test type.\n\n\nMade with
[Cursor](https://cursor.com)","sha":"f29a9c33c52944a12d6d0ca6cc6dfaf46426795a"}}]}]
BACKPORT-->

Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
kibanamachine added a commit that referenced this pull request Apr 29, 2026
…266396)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[CI] Enable Jest selective testing by default on PRs
(#266326)](#266326)

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

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

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2026-04-29T13:19:44Z","message":"[CI]
Enable Jest selective testing by default on PRs (#266326)\n\n##
Summary\n\nJest unit and integration test groups are filtered to
affected packages\non PR builds by default. Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite. The
previous\nopt-in label `ci:use-selective-testing` is removed. On-merge
and other\nnon-PR pipelines are unchanged (`GITHUB_PR_NUMBER`
unset).\n\n> On pull request builds, Jest unit and integration test
groups are\nnarrowed to configs under affected packages
(see\n`pick_test_group_run_order` in CI stats). Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite
instead.\nTouching files listed in `CRITICAL_FILES_JEST_*` in `const.ts`
also\nskips filtering for the relevant test type.\n\n\nMade with
[Cursor](https://cursor.com)","sha":"f29a9c33c52944a12d6d0ca6cc6dfaf46426795a","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v9.5.0"],"title":"[CI]
Enable Jest selective testing by default on
PRs","number":266326,"url":"https://github.com/elastic/kibana/pull/266326","mergeCommit":{"message":"[CI]
Enable Jest selective testing by default on PRs (#266326)\n\n##
Summary\n\nJest unit and integration test groups are filtered to
affected packages\non PR builds by default. Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite. The
previous\nopt-in label `ci:use-selective-testing` is removed. On-merge
and other\nnon-PR pipelines are unchanged (`GITHUB_PR_NUMBER`
unset).\n\n> On pull request builds, Jest unit and integration test
groups are\nnarrowed to configs under affected packages
(see\n`pick_test_group_run_order` in CI stats). Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite
instead.\nTouching files listed in `CRITICAL_FILES_JEST_*` in `const.ts`
also\nskips filtering for the relevant test type.\n\n\nMade with
[Cursor](https://cursor.com)","sha":"f29a9c33c52944a12d6d0ca6cc6dfaf46426795a"}},"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/266326","number":266326,"mergeCommit":{"message":"[CI]
Enable Jest selective testing by default on PRs (#266326)\n\n##
Summary\n\nJest unit and integration test groups are filtered to
affected packages\non PR builds by default. Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite. The
previous\nopt-in label `ci:use-selective-testing` is removed. On-merge
and other\nnon-PR pipelines are unchanged (`GITHUB_PR_NUMBER`
unset).\n\n> On pull request builds, Jest unit and integration test
groups are\nnarrowed to configs under affected packages
(see\n`pick_test_group_run_order` in CI stats). Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite
instead.\nTouching files listed in `CRITICAL_FILES_JEST_*` in `const.ts`
also\nskips filtering for the relevant test type.\n\n\nMade with
[Cursor](https://cursor.com)","sha":"f29a9c33c52944a12d6d0ca6cc6dfaf46426795a"}}]}]
BACKPORT-->

Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
kibanamachine added a commit that referenced this pull request Apr 29, 2026
…#266394)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[CI] Enable Jest selective testing by default on PRs
(#266326)](#266326)

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

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

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2026-04-29T13:19:44Z","message":"[CI]
Enable Jest selective testing by default on PRs (#266326)\n\n##
Summary\n\nJest unit and integration test groups are filtered to
affected packages\non PR builds by default. Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite. The
previous\nopt-in label `ci:use-selective-testing` is removed. On-merge
and other\nnon-PR pipelines are unchanged (`GITHUB_PR_NUMBER`
unset).\n\n> On pull request builds, Jest unit and integration test
groups are\nnarrowed to configs under affected packages
(see\n`pick_test_group_run_order` in CI stats). Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite
instead.\nTouching files listed in `CRITICAL_FILES_JEST_*` in `const.ts`
also\nskips filtering for the relevant test type.\n\n\nMade with
[Cursor](https://cursor.com)","sha":"f29a9c33c52944a12d6d0ca6cc6dfaf46426795a","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v9.5.0"],"title":"[CI]
Enable Jest selective testing by default on
PRs","number":266326,"url":"https://github.com/elastic/kibana/pull/266326","mergeCommit":{"message":"[CI]
Enable Jest selective testing by default on PRs (#266326)\n\n##
Summary\n\nJest unit and integration test groups are filtered to
affected packages\non PR builds by default. Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite. The
previous\nopt-in label `ci:use-selective-testing` is removed. On-merge
and other\nnon-PR pipelines are unchanged (`GITHUB_PR_NUMBER`
unset).\n\n> On pull request builds, Jest unit and integration test
groups are\nnarrowed to configs under affected packages
(see\n`pick_test_group_run_order` in CI stats). Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite
instead.\nTouching files listed in `CRITICAL_FILES_JEST_*` in `const.ts`
also\nskips filtering for the relevant test type.\n\n\nMade with
[Cursor](https://cursor.com)","sha":"f29a9c33c52944a12d6d0ca6cc6dfaf46426795a"}},"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/266326","number":266326,"mergeCommit":{"message":"[CI]
Enable Jest selective testing by default on PRs (#266326)\n\n##
Summary\n\nJest unit and integration test groups are filtered to
affected packages\non PR builds by default. Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite. The
previous\nopt-in label `ci:use-selective-testing` is removed. On-merge
and other\nnon-PR pipelines are unchanged (`GITHUB_PR_NUMBER`
unset).\n\n> On pull request builds, Jest unit and integration test
groups are\nnarrowed to configs under affected packages
(see\n`pick_test_group_run_order` in CI stats). Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite
instead.\nTouching files listed in `CRITICAL_FILES_JEST_*` in `const.ts`
also\nskips filtering for the relevant test type.\n\n\nMade with
[Cursor](https://cursor.com)","sha":"f29a9c33c52944a12d6d0ca6cc6dfaf46426795a"}}]}]
BACKPORT-->

Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
kibanamachine added a commit that referenced this pull request Apr 29, 2026
…266395)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[CI] Enable Jest selective testing by default on PRs
(#266326)](#266326)

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

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

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2026-04-29T13:19:44Z","message":"[CI]
Enable Jest selective testing by default on PRs (#266326)\n\n##
Summary\n\nJest unit and integration test groups are filtered to
affected packages\non PR builds by default. Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite. The
previous\nopt-in label `ci:use-selective-testing` is removed. On-merge
and other\nnon-PR pipelines are unchanged (`GITHUB_PR_NUMBER`
unset).\n\n> On pull request builds, Jest unit and integration test
groups are\nnarrowed to configs under affected packages
(see\n`pick_test_group_run_order` in CI stats). Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite
instead.\nTouching files listed in `CRITICAL_FILES_JEST_*` in `const.ts`
also\nskips filtering for the relevant test type.\n\n\nMade with
[Cursor](https://cursor.com)","sha":"f29a9c33c52944a12d6d0ca6cc6dfaf46426795a","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v9.5.0"],"title":"[CI]
Enable Jest selective testing by default on
PRs","number":266326,"url":"https://github.com/elastic/kibana/pull/266326","mergeCommit":{"message":"[CI]
Enable Jest selective testing by default on PRs (#266326)\n\n##
Summary\n\nJest unit and integration test groups are filtered to
affected packages\non PR builds by default. Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite. The
previous\nopt-in label `ci:use-selective-testing` is removed. On-merge
and other\nnon-PR pipelines are unchanged (`GITHUB_PR_NUMBER`
unset).\n\n> On pull request builds, Jest unit and integration test
groups are\nnarrowed to configs under affected packages
(see\n`pick_test_group_run_order` in CI stats). Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite
instead.\nTouching files listed in `CRITICAL_FILES_JEST_*` in `const.ts`
also\nskips filtering for the relevant test type.\n\n\nMade with
[Cursor](https://cursor.com)","sha":"f29a9c33c52944a12d6d0ca6cc6dfaf46426795a"}},"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/266326","number":266326,"mergeCommit":{"message":"[CI]
Enable Jest selective testing by default on PRs (#266326)\n\n##
Summary\n\nJest unit and integration test groups are filtered to
affected packages\non PR builds by default. Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite. The
previous\nopt-in label `ci:use-selective-testing` is removed. On-merge
and other\nnon-PR pipelines are unchanged (`GITHUB_PR_NUMBER`
unset).\n\n> On pull request builds, Jest unit and integration test
groups are\nnarrowed to configs under affected packages
(see\n`pick_test_group_run_order` in CI stats). Add the GitHub
label\n`ci:prevent-selective-testing` to run the full Jest suite
instead.\nTouching files listed in `CRITICAL_FILES_JEST_*` in `const.ts`
also\nskips filtering for the relevant test type.\n\n\nMade with
[Cursor](https://cursor.com)","sha":"f29a9c33c52944a12d6d0ca6cc6dfaf46426795a"}}]}]
BACKPORT-->

Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
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 Team:Operations Kibana-Operations Team v8.19.16 v9.2.9 v9.3.5 v9.4.0 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants