Skip to content

[9.3] [ftr] skip FTR tests when changes are scoped to "test/scout/**" (#280853)#280880

Open
kibanamachine wants to merge 1 commit into
elastic:9.3from
kibanamachine:backport/9.3/pr-280853
Open

[9.3] [ftr] skip FTR tests when changes are scoped to "test/scout/**" (#280853)#280880
kibanamachine wants to merge 1 commit into
elastic:9.3from
kibanamachine:backport/9.3/pr-280853

Conversation

@kibanamachine

Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.3:

Questions ?

Please refer to the Backport tool documentation

…tic#280853)

## Summary

Fixing the issue I found in [CI
run](https://buildkite.com/elastic/kibana-pull-request/builds/475407):
changes limited to `discover/test/scout/**` (Scout tests) were still
triggering full FTR runs, because:

- Any file under a plugin's `test/scout/**` folder is attributed to that
plugin's module (e.g. `@kbn/discover-plugin`), so the FTR skip logic saw
a "real" module and refused to skip.
- The Scout-tests-only fast path excludes `fixtures/` files (treating
them as regular changes), which also blocked the skip when fixtures were
touched.

### Fix
- `selective_ftr.ts`: `shouldSkipFtrTests` now skips FTR whenever every
changed file matches an irrelevant path (including
`**/test/scout{_*,}/**`), regardless of which module owns the directory.
- `selective_scout.ts` / `pick_test_group_run_order.ts`: added
`isScoutPathOnlyDiff`, used for the Jest/FTR fast path. It's like
`isScoutTestsOnlyDiff` but doesn't `exclude fixtures/`, since Jest/FTR
can never consume Scout fixtures anyway — the fixtures distinction only
matters for Scout's own test selection.

### Testing
Added unit tests in `selective_ftr.test.ts` and
`selective_scout.test.ts` covering Scout-only diffs (with and without
fixtures).

(cherry picked from commit 34b4759)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jul 24, 2026
@kibanamachine
kibanamachine enabled auto-merge (squash) July 24, 2026 20:15
@kibanamachine

kibanamachine commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Scout Lane #4 - stateful-classic / default / local-stateful-classic - Creates a custom TLS alert rule - can create rule and fire alert
  • [job] [logs] Scout Lane #4 - stateful-classic / default / local-stateful-classic - Creates a custom TLS alert rule - can create rule and fire alert
  • [job] [logs] Scout Lane #6 - stateful-classic / default / local-stateful-classic - Step Duration series - builds series with step duration metric

Metrics [docs]

✅ unchanged

History

cc @dmlemeshko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants