Skip to content

Extend selective testing with implicit consumers#268256

Merged
dmlemeshko merged 5 commits into
elastic:mainfrom
dmlemeshko:extend-selective-testing-with-implicit-consumers
May 8, 2026
Merged

Extend selective testing with implicit consumers#268256
dmlemeshko merged 5 commits into
elastic:mainfrom
dmlemeshko:extend-selective-testing-with-implicit-consumers

Conversation

@dmlemeshko
Copy link
Copy Markdown
Contributor

@dmlemeshko dmlemeshko commented May 7, 2026

Summary

Some plugins use registries to inject functionality. Both our strategies for detecting affected modules cannot discover it, because they rely on static dependencies. We need a better way to handle it.

While we discuss a general solution, this PR serves as a quick fix that validates potential implicit consumers on top of computed affected packages and extends "affected modules" if code changes match any of these patterns:

      '**/plugins/**/public/embeddables/**/*.{ts,tsx}',
      '**/plugins/**/public/embeddable/**/*.{ts,tsx}',
      '**/plugins/**/public/react_embeddable/**/*.{ts,tsx}',
      '**/plugins/**/public/apps/embeddables/**/*.{ts,tsx}',
      '**/plugins/**/public/ui_actions/**/*.{ts,tsx}',
      '**/plugins/**/public/trigger_actions/**/*.{ts,tsx}',
      '**/plugins/**/public/**/actions/register*.{ts,tsx}',

Example:

Changing x-pack/platform/plugins/shared/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable_factory.tsx should trigger Scout tests in dashboard, lens, canvas and embeddable plugins

Screenshot 2026-05-07 at 19 10 42

@dmlemeshko dmlemeshko 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 labels May 7, 2026
@dmlemeshko dmlemeshko marked this pull request as ready for review May 7, 2026 17:14
@dmlemeshko dmlemeshko requested review from a team as code owners May 7, 2026 17:14
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout Lane #35 - serverless-observability_complete / default / local-serverless-observability_complete - find - basic - should return 200 with individual responses
  • [job] [logs] Scout Lane #35 - serverless-observability_complete / default / local-serverless-observability_complete - Serverless Observability Navigation - Complete tier body - clicking body nav items sets the active link, updates breadcrumbs, and navigates

Metrics [docs]

✅ unchanged

History

@dmlemeshko dmlemeshko merged commit 86477a0 into elastic:main May 8, 2026
32 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.3, 9.4

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

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.19
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 May 8, 2026
…8381)

# Backport

This will backport the following commits from `main` to `9.4`:
- [Extend selective testing with implicit consumers
(#268256)](#268256)

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

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

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2026-05-08T10:05:36Z","message":"Extend
selective testing with implicit consumers (#268256)\n\n##
Summary\n\nSome plugins use registries to inject functionality. Both our
strategies\nfor detecting affected modules cannot discover it, because
they rely on\nstatic dependencies. We need a better way to handle
it.\n\nWhile we discuss a general solution, this PR serves as a quick
fix that\nvalidates potential implicit consumers on top of computed
affected\npackages and extends \"affected modules\" if code changes
match any of\nthese patterns:\n\n```\n
'**/plugins/**/public/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/react_embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/apps/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/ui_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/trigger_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/**/actions/register*.{ts,tsx}',\n```\n\nExample:
\n\nChanging\n`x-pack/platform/plugins/shared/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable_factory.tsx`\nshould
trigger Scout tests in `dashboard`, `lens`, `canvas` and\n`embeddable`
plugins\n\n<img width=\"1954\" height=\"279\" alt=\"Screenshot
2026-05-07 at 19 10
42\"\nsrc=\"https://github.com/user-attachments/assets/6c0b4163-481b-4f34-84b2-290ab3091d96\"\n/>","sha":"86477a09bed0f060f49d3b68a52707eee5c0f416","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","v9.5.0"],"title":"Extend
selective testing with implicit
consumers","number":268256,"url":"https://github.com/elastic/kibana/pull/268256","mergeCommit":{"message":"Extend
selective testing with implicit consumers (#268256)\n\n##
Summary\n\nSome plugins use registries to inject functionality. Both our
strategies\nfor detecting affected modules cannot discover it, because
they rely on\nstatic dependencies. We need a better way to handle
it.\n\nWhile we discuss a general solution, this PR serves as a quick
fix that\nvalidates potential implicit consumers on top of computed
affected\npackages and extends \"affected modules\" if code changes
match any of\nthese patterns:\n\n```\n
'**/plugins/**/public/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/react_embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/apps/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/ui_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/trigger_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/**/actions/register*.{ts,tsx}',\n```\n\nExample:
\n\nChanging\n`x-pack/platform/plugins/shared/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable_factory.tsx`\nshould
trigger Scout tests in `dashboard`, `lens`, `canvas` and\n`embeddable`
plugins\n\n<img width=\"1954\" height=\"279\" alt=\"Screenshot
2026-05-07 at 19 10
42\"\nsrc=\"https://github.com/user-attachments/assets/6c0b4163-481b-4f34-84b2-290ab3091d96\"\n/>","sha":"86477a09bed0f060f49d3b68a52707eee5c0f416"}},"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/268256","number":268256,"mergeCommit":{"message":"Extend
selective testing with implicit consumers (#268256)\n\n##
Summary\n\nSome plugins use registries to inject functionality. Both our
strategies\nfor detecting affected modules cannot discover it, because
they rely on\nstatic dependencies. We need a better way to handle
it.\n\nWhile we discuss a general solution, this PR serves as a quick
fix that\nvalidates potential implicit consumers on top of computed
affected\npackages and extends \"affected modules\" if code changes
match any of\nthese patterns:\n\n```\n
'**/plugins/**/public/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/react_embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/apps/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/ui_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/trigger_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/**/actions/register*.{ts,tsx}',\n```\n\nExample:
\n\nChanging\n`x-pack/platform/plugins/shared/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable_factory.tsx`\nshould
trigger Scout tests in `dashboard`, `lens`, `canvas` and\n`embeddable`
plugins\n\n<img width=\"1954\" height=\"279\" alt=\"Screenshot
2026-05-07 at 19 10
42\"\nsrc=\"https://github.com/user-attachments/assets/6c0b4163-481b-4f34-84b2-290ab3091d96\"\n/>","sha":"86477a09bed0f060f49d3b68a52707eee5c0f416"}}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
kibanamachine added a commit that referenced this pull request May 8, 2026
…68379)

# Backport

This will backport the following commits from `main` to `8.19`:
- [Extend selective testing with implicit consumers
(#268256)](#268256)

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

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

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2026-05-08T10:05:36Z","message":"Extend
selective testing with implicit consumers (#268256)\n\n##
Summary\n\nSome plugins use registries to inject functionality. Both our
strategies\nfor detecting affected modules cannot discover it, because
they rely on\nstatic dependencies. We need a better way to handle
it.\n\nWhile we discuss a general solution, this PR serves as a quick
fix that\nvalidates potential implicit consumers on top of computed
affected\npackages and extends \"affected modules\" if code changes
match any of\nthese patterns:\n\n```\n
'**/plugins/**/public/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/react_embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/apps/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/ui_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/trigger_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/**/actions/register*.{ts,tsx}',\n```\n\nExample:
\n\nChanging\n`x-pack/platform/plugins/shared/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable_factory.tsx`\nshould
trigger Scout tests in `dashboard`, `lens`, `canvas` and\n`embeddable`
plugins\n\n<img width=\"1954\" height=\"279\" alt=\"Screenshot
2026-05-07 at 19 10
42\"\nsrc=\"https://github.com/user-attachments/assets/6c0b4163-481b-4f34-84b2-290ab3091d96\"\n/>","sha":"86477a09bed0f060f49d3b68a52707eee5c0f416","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","v9.5.0"],"title":"Extend
selective testing with implicit
consumers","number":268256,"url":"https://github.com/elastic/kibana/pull/268256","mergeCommit":{"message":"Extend
selective testing with implicit consumers (#268256)\n\n##
Summary\n\nSome plugins use registries to inject functionality. Both our
strategies\nfor detecting affected modules cannot discover it, because
they rely on\nstatic dependencies. We need a better way to handle
it.\n\nWhile we discuss a general solution, this PR serves as a quick
fix that\nvalidates potential implicit consumers on top of computed
affected\npackages and extends \"affected modules\" if code changes
match any of\nthese patterns:\n\n```\n
'**/plugins/**/public/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/react_embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/apps/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/ui_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/trigger_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/**/actions/register*.{ts,tsx}',\n```\n\nExample:
\n\nChanging\n`x-pack/platform/plugins/shared/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable_factory.tsx`\nshould
trigger Scout tests in `dashboard`, `lens`, `canvas` and\n`embeddable`
plugins\n\n<img width=\"1954\" height=\"279\" alt=\"Screenshot
2026-05-07 at 19 10
42\"\nsrc=\"https://github.com/user-attachments/assets/6c0b4163-481b-4f34-84b2-290ab3091d96\"\n/>","sha":"86477a09bed0f060f49d3b68a52707eee5c0f416"}},"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/268256","number":268256,"mergeCommit":{"message":"Extend
selective testing with implicit consumers (#268256)\n\n##
Summary\n\nSome plugins use registries to inject functionality. Both our
strategies\nfor detecting affected modules cannot discover it, because
they rely on\nstatic dependencies. We need a better way to handle
it.\n\nWhile we discuss a general solution, this PR serves as a quick
fix that\nvalidates potential implicit consumers on top of computed
affected\npackages and extends \"affected modules\" if code changes
match any of\nthese patterns:\n\n```\n
'**/plugins/**/public/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/react_embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/apps/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/ui_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/trigger_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/**/actions/register*.{ts,tsx}',\n```\n\nExample:
\n\nChanging\n`x-pack/platform/plugins/shared/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable_factory.tsx`\nshould
trigger Scout tests in `dashboard`, `lens`, `canvas` and\n`embeddable`
plugins\n\n<img width=\"1954\" height=\"279\" alt=\"Screenshot
2026-05-07 at 19 10
42\"\nsrc=\"https://github.com/user-attachments/assets/6c0b4163-481b-4f34-84b2-290ab3091d96\"\n/>","sha":"86477a09bed0f060f49d3b68a52707eee5c0f416"}}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
kibanamachine added a commit that referenced this pull request May 8, 2026
…8380)

# Backport

This will backport the following commits from `main` to `9.3`:
- [Extend selective testing with implicit consumers
(#268256)](#268256)

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

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

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2026-05-08T10:05:36Z","message":"Extend
selective testing with implicit consumers (#268256)\n\n##
Summary\n\nSome plugins use registries to inject functionality. Both our
strategies\nfor detecting affected modules cannot discover it, because
they rely on\nstatic dependencies. We need a better way to handle
it.\n\nWhile we discuss a general solution, this PR serves as a quick
fix that\nvalidates potential implicit consumers on top of computed
affected\npackages and extends \"affected modules\" if code changes
match any of\nthese patterns:\n\n```\n
'**/plugins/**/public/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/react_embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/apps/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/ui_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/trigger_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/**/actions/register*.{ts,tsx}',\n```\n\nExample:
\n\nChanging\n`x-pack/platform/plugins/shared/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable_factory.tsx`\nshould
trigger Scout tests in `dashboard`, `lens`, `canvas` and\n`embeddable`
plugins\n\n<img width=\"1954\" height=\"279\" alt=\"Screenshot
2026-05-07 at 19 10
42\"\nsrc=\"https://github.com/user-attachments/assets/6c0b4163-481b-4f34-84b2-290ab3091d96\"\n/>","sha":"86477a09bed0f060f49d3b68a52707eee5c0f416","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","v9.5.0"],"title":"Extend
selective testing with implicit
consumers","number":268256,"url":"https://github.com/elastic/kibana/pull/268256","mergeCommit":{"message":"Extend
selective testing with implicit consumers (#268256)\n\n##
Summary\n\nSome plugins use registries to inject functionality. Both our
strategies\nfor detecting affected modules cannot discover it, because
they rely on\nstatic dependencies. We need a better way to handle
it.\n\nWhile we discuss a general solution, this PR serves as a quick
fix that\nvalidates potential implicit consumers on top of computed
affected\npackages and extends \"affected modules\" if code changes
match any of\nthese patterns:\n\n```\n
'**/plugins/**/public/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/react_embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/apps/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/ui_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/trigger_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/**/actions/register*.{ts,tsx}',\n```\n\nExample:
\n\nChanging\n`x-pack/platform/plugins/shared/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable_factory.tsx`\nshould
trigger Scout tests in `dashboard`, `lens`, `canvas` and\n`embeddable`
plugins\n\n<img width=\"1954\" height=\"279\" alt=\"Screenshot
2026-05-07 at 19 10
42\"\nsrc=\"https://github.com/user-attachments/assets/6c0b4163-481b-4f34-84b2-290ab3091d96\"\n/>","sha":"86477a09bed0f060f49d3b68a52707eee5c0f416"}},"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/268256","number":268256,"mergeCommit":{"message":"Extend
selective testing with implicit consumers (#268256)\n\n##
Summary\n\nSome plugins use registries to inject functionality. Both our
strategies\nfor detecting affected modules cannot discover it, because
they rely on\nstatic dependencies. We need a better way to handle
it.\n\nWhile we discuss a general solution, this PR serves as a quick
fix that\nvalidates potential implicit consumers on top of computed
affected\npackages and extends \"affected modules\" if code changes
match any of\nthese patterns:\n\n```\n
'**/plugins/**/public/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/react_embeddable/**/*.{ts,tsx}',\n
'**/plugins/**/public/apps/embeddables/**/*.{ts,tsx}',\n
'**/plugins/**/public/ui_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/trigger_actions/**/*.{ts,tsx}',\n
'**/plugins/**/public/**/actions/register*.{ts,tsx}',\n```\n\nExample:
\n\nChanging\n`x-pack/platform/plugins/shared/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable_factory.tsx`\nshould
trigger Scout tests in `dashboard`, `lens`, `canvas` and\n`embeddable`
plugins\n\n<img width=\"1954\" height=\"279\" alt=\"Screenshot
2026-05-07 at 19 10
42\"\nsrc=\"https://github.com/user-attachments/assets/6c0b4163-481b-4f34-84b2-290ab3091d96\"\n/>","sha":"86477a09bed0f060f49d3b68a52707eee5c0f416"}}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
js-jankisalvi pushed a commit to js-jankisalvi/kibana that referenced this pull request May 12, 2026
## Summary

Some plugins use registries to inject functionality. Both our strategies
for detecting affected modules cannot discover it, because they rely on
static dependencies. We need a better way to handle it.

While we discuss a general solution, this PR serves as a quick fix that
validates potential implicit consumers on top of computed affected
packages and extends "affected modules" if code changes match any of
these patterns:

```
      '**/plugins/**/public/embeddables/**/*.{ts,tsx}',
      '**/plugins/**/public/embeddable/**/*.{ts,tsx}',
      '**/plugins/**/public/react_embeddable/**/*.{ts,tsx}',
      '**/plugins/**/public/apps/embeddables/**/*.{ts,tsx}',
      '**/plugins/**/public/ui_actions/**/*.{ts,tsx}',
      '**/plugins/**/public/trigger_actions/**/*.{ts,tsx}',
      '**/plugins/**/public/**/actions/register*.{ts,tsx}',
```

Example: 

Changing
`x-pack/platform/plugins/shared/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable_factory.tsx`
should trigger Scout tests in `dashboard`, `lens`, `canvas` and
`embeddable` plugins

<img width="1954" height="279" alt="Screenshot 2026-05-07 at 19 10 42"
src="https://github.com/user-attachments/assets/6c0b4163-481b-4f34-84b2-290ab3091d96"
/>
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 v8.19.16 v9.3.5 v9.4.1 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants