Skip to content

[CI] Affected testing for Jest/Jest integration#259137

Merged
delanni merged 15 commits intoelastic:mainfrom
delanni:jest-through-moon-2
Apr 2, 2026
Merged

[CI] Affected testing for Jest/Jest integration#259137
delanni merged 15 commits intoelastic:mainfrom
delanni:jest-through-moon-2

Conversation

@delanni
Copy link
Copy Markdown
Member

@delanni delanni commented Mar 23, 2026

Summary

Split from: #253279

  • adopt affected-packages for selective jest/jest-integration
  • behind the label: ci:use-selective-testing

This filters Jest Unit tests we're running based on changed files in the PR. We're running tests for all the touched projects plus their downstream, as well as the whole set of tests when some critical files are changed we think should warrant a full test run.

@delanni delanni added ci:use-selective-testing Turns on selective testing features for the PR CI run 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 Mar 23, 2026
@delanni delanni force-pushed the jest-through-moon-2 branch from 5e03cb6 to 203f522 Compare March 24, 2026 15:10
@delanni delanni marked this pull request as ready for review March 25, 2026 14:49
@delanni delanni requested a review from a team as a code owner March 25, 2026 14:49
Comment thread .buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts Outdated
@delanni delanni marked this pull request as draft March 30, 2026 11:12
@delanni delanni marked this pull request as ready for review March 30, 2026 12:38
@delanni delanni force-pushed the jest-through-moon-2 branch from 1a9bac1 to 5f4334a Compare March 30, 2026 13:53
Copy link
Copy Markdown
Contributor

@Ikuni17 Ikuni17 left a comment

Choose a reason for hiding this comment

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

Maybe I missed it, but I didn't see a commit testing the selective testing for an affected package. Like disabling the critical files check and adding a dummy change to a package.

Also do the TODO need to be addressed in this PR or what is your plan?

@delanni
Copy link
Copy Markdown
Member Author

delanni commented Apr 1, 2026

Thanks for checking Brad!
1: TODOs: yes, the list for sensitive files should be resolved before merge
2: TODOs: the one about enabling it by default will be removed if we turn this on by default
3: I did run some affected testing in the bigger PR (#253279) but I'm happy to test in this one too

@delanni delanni requested a review from a team as a code owner April 1, 2026 09:42
@delanni delanni marked this pull request as draft April 1, 2026 12:18
@delanni delanni force-pushed the jest-through-moon-2 branch from 0ec6f3e to 2a00ec7 Compare April 1, 2026 13:12
Comment thread .buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts
@delanni delanni force-pushed the jest-through-moon-2 branch from e9676c0 to 6c440e9 Compare April 1, 2026 14:44
@delanni delanni marked this pull request as ready for review April 1, 2026 16:05
@delanni
Copy link
Copy Markdown
Member Author

delanni commented Apr 1, 2026

@Ikuni17 - https://buildkite.com/elastic/kibana-pull-request/builds/420536#019d4931-169b-49e3-8e03-666f82a10eb5 this demonstrates a run for the affected set of this commit (2a00ec7)
I've added some more patterns to the sensitive paths, still not sure if these are enough.

@delanni delanni requested a review from a team April 1, 2026 16:08
@delanni delanni added the Team:Operations Kibana-Operations Team label Apr 1, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 1, 2026

Approvability

Verdict: Needs human review

The author does not own any of the 10 changed files (all owned by @elastic/kibana-operations), and there is an unresolved review comment suggesting a missing critical file pattern. CI test selection logic changes warrant review by the designated owners.

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


// Changes here skip affected-package filtering for Jest (full run).
// Keep narrow: global test harness, transforms, CI selection.
export const CRITICAL_FILES_JEST_UNIT_TESTS = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe worth adding src/platform/packages/private/kbn-jest-serializers/* also

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #156 / Agent Builder sidebar Sidebar Conversation Flow sends a message and receives a response

Metrics [docs]

✅ unchanged

History

@delanni delanni merged commit 95f453a into elastic:main Apr 2, 2026
22 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.2, 9.3

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 2, 2026
## Summary
Split from: elastic#253279
- adopt affected-packages for selective jest/jest-integration
- behind the label: `ci:use-selective-testing`

(cherry picked from commit 95f453a)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
8.19 Backport failed because of merge conflicts
9.2 Backport failed because of merge conflicts
9.3

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 259137

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Apr 2, 2026
)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[CI] Affected testing for Jest/Jest integration
(#259137)](#259137)

<!--- 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-02T11:07:31Z","message":"[CI]
Affected testing for Jest/Jest integration (#259137)\n\n##
Summary\nSplit from: https://github.com/elastic/kibana/pull/253279\n-
adopt affected-packages for selective jest/jest-integration\n- behind
the label:
`ci:use-selective-testing`","sha":"95f453a517b011eb4b08ac37d63c38fedcf40bea","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v9.4.0","ci:use-selective-testing"],"title":"[CI]
Affected testing for Jest/Jest
integration","number":259137,"url":"https://github.com/elastic/kibana/pull/259137","mergeCommit":{"message":"[CI]
Affected testing for Jest/Jest integration (#259137)\n\n##
Summary\nSplit from: https://github.com/elastic/kibana/pull/253279\n-
adopt affected-packages for selective jest/jest-integration\n- behind
the label:
`ci:use-selective-testing`","sha":"95f453a517b011eb4b08ac37d63c38fedcf40bea"}},"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/259137","number":259137,"mergeCommit":{"message":"[CI]
Affected testing for Jest/Jest integration (#259137)\n\n##
Summary\nSplit from: https://github.com/elastic/kibana/pull/253279\n-
adopt affected-packages for selective jest/jest-integration\n- behind
the label:
`ci:use-selective-testing`","sha":"95f453a517b011eb4b08ac37d63c38fedcf40bea"}}]}]
BACKPORT-->

Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
delanni added a commit to delanni/kibana that referenced this pull request Apr 14, 2026
## Summary
Split from: elastic#253279
- adopt affected-packages for selective jest/jest-integration
- behind the label: `ci:use-selective-testing`

(cherry picked from commit 95f453a)

# Conflicts:
#	.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts
delanni added a commit to delanni/kibana that referenced this pull request Apr 14, 2026
## Summary
Split from: elastic#253279
- adopt affected-packages for selective jest/jest-integration
- behind the label: `ci:use-selective-testing`

(cherry picked from commit 95f453a)

# Conflicts:
#	.buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts
@delanni
Copy link
Copy Markdown
Member Author

delanni commented Apr 14, 2026

💚 All backports created successfully

Status Branch Result
9.2
8.19

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

Questions ?

Please refer to the Backport tool documentation

delanni added a commit that referenced this pull request Apr 14, 2026
…3045)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[CI] Affected testing for Jest/Jest integration
(#259137)](#259137)

<!--- Backport version: 11.0.1 -->

### 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-02T11:07:31Z","message":"[CI]
Affected testing for Jest/Jest integration (#259137)\n\n##
Summary\nSplit from: https://github.com/elastic/kibana/pull/253279\n-
adopt affected-packages for selective jest/jest-integration\n- behind
the label:
`ci:use-selective-testing`","sha":"95f453a517b011eb4b08ac37d63c38fedcf40bea","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v9.4.0","v9.3.3","ci:use-selective-testing"],"title":"[CI]
Affected testing for Jest/Jest
integration","number":259137,"url":"https://github.com/elastic/kibana/pull/259137","mergeCommit":{"message":"[CI]
Affected testing for Jest/Jest integration (#259137)\n\n##
Summary\nSplit from: https://github.com/elastic/kibana/pull/253279\n-
adopt affected-packages for selective jest/jest-integration\n- behind
the label:
`ci:use-selective-testing`","sha":"95f453a517b011eb4b08ac37d63c38fedcf40bea"}},"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/259137","number":259137,"mergeCommit":{"message":"[CI]
Affected testing for Jest/Jest integration (#259137)\n\n##
Summary\nSplit from: https://github.com/elastic/kibana/pull/253279\n-
adopt affected-packages for selective jest/jest-integration\n- behind
the label:
`ci:use-selective-testing`","sha":"95f453a517b011eb4b08ac37d63c38fedcf40bea"}},{"branch":"9.3","label":"v9.3.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/260905","number":260905,"state":"MERGED","mergeCommit":{"sha":"4757faca14bfaed0a9a88023d505b265c7e9fdbd","message":"[9.3]
[CI] Affected testing for Jest/Jest integration (#259137) (#260905)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`9.3`:\n- [[CI] Affected testing for Jest/Jest
integration\n(#259137)](https://github.com/elastic/kibana/pull/259137)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Alex Szabo <alex.szabo@elastic.co>"}}]}] BACKPORT-->
delanni added a commit that referenced this pull request Apr 16, 2026
)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[CI] Affected testing for Jest/Jest integration
(#259137)](#259137)

<!--- Backport version: 11.0.1 -->

### 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-02T11:07:31Z","message":"[CI]
Affected testing for Jest/Jest integration (#259137)\n\n##
Summary\nSplit from: https://github.com/elastic/kibana/pull/253279\n-
adopt affected-packages for selective jest/jest-integration\n- behind
the label:
`ci:use-selective-testing`","sha":"95f453a517b011eb4b08ac37d63c38fedcf40bea","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v9.4.0","v9.3.3","ci:use-selective-testing"],"title":"[CI]
Affected testing for Jest/Jest
integration","number":259137,"url":"https://github.com/elastic/kibana/pull/259137","mergeCommit":{"message":"[CI]
Affected testing for Jest/Jest integration (#259137)\n\n##
Summary\nSplit from: https://github.com/elastic/kibana/pull/253279\n-
adopt affected-packages for selective jest/jest-integration\n- behind
the label:
`ci:use-selective-testing`","sha":"95f453a517b011eb4b08ac37d63c38fedcf40bea"}},"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/259137","number":259137,"mergeCommit":{"message":"[CI]
Affected testing for Jest/Jest integration (#259137)\n\n##
Summary\nSplit from: https://github.com/elastic/kibana/pull/253279\n-
adopt affected-packages for selective jest/jest-integration\n- behind
the label:
`ci:use-selective-testing`","sha":"95f453a517b011eb4b08ac37d63c38fedcf40bea"}},{"branch":"9.3","label":"v9.3.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/260905","number":260905,"state":"MERGED","mergeCommit":{"sha":"4757faca14bfaed0a9a88023d505b265c7e9fdbd","message":"[9.3]
[CI] Affected testing for Jest/Jest integration (#259137) (#260905)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`9.3`:\n- [[CI] Affected testing for Jest/Jest
integration\n(#259137)](https://github.com/elastic/kibana/pull/259137)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Alex Szabo <alex.szabo@elastic.co>"}}]}] BACKPORT-->

---------

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@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 ci:use-selective-testing Turns on selective testing features for the PR CI run release_note:skip Skip the PR/issue when compiling release notes Team:Operations Kibana-Operations Team v8.19.15 v9.2.9 v9.3.3 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants