Skip to content

[scout] migrate Lens API tests#267993

Merged
dmlemeshko merged 5 commits into
elastic:mainfrom
dmlemeshko:migrate-lens-api-tests-to-scout
May 8, 2026
Merged

[scout] migrate Lens API tests#267993
dmlemeshko merged 5 commits into
elastic:mainfrom
dmlemeshko:migrate-lens-api-tests-to-scout

Conversation

@dmlemeshko
Copy link
Copy Markdown
Contributor

@dmlemeshko dmlemeshko commented May 6, 2026

Summary

This PR migrates Lens API tests to Scout:

before: x-pack/platform/test/api_integration/apis/lens
after: x-pack/platform/plugins/shared/lens/test/scout/api

Screenshot 2026-05-07 at 17 42 01

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

coderabbitai Bot commented May 7, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 42875c6e-af90-4b81-9edc-f9b497fee17d

📥 Commits

Reviewing files that changed from the base of the PR and between 46e385b and d771ad3.

📒 Files selected for processing (30)
  • .buildkite/ftr_platform_stateful_configs.yml
  • .github/CODEOWNERS
  • x-pack/platform/plugins/shared/lens/test/scout/api/fixtures/constants.ts
  • x-pack/platform/plugins/shared/lens/test/scout/api/fixtures/index.ts
  • x-pack/platform/plugins/shared/lens/test/scout/api/fixtures/lens_example_docs.json
  • x-pack/platform/plugins/shared/lens/test/scout/api/playwright.config.ts
  • x-pack/platform/plugins/shared/lens/test/scout/api/tests/visualizations/create.spec.ts
  • x-pack/platform/plugins/shared/lens/test/scout/api/tests/visualizations/delete.spec.ts
  • x-pack/platform/plugins/shared/lens/test/scout/api/tests/visualizations/get.spec.ts
  • x-pack/platform/plugins/shared/lens/test/scout/api/tests/visualizations/search.spec.ts
  • x-pack/platform/plugins/shared/lens/test/scout/api/tests/visualizations/update.spec.ts
  • x-pack/platform/test/api_integration/apis/lens/config.ts
  • x-pack/platform/test/api_integration/apis/lens/examples.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/create/index.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/create/main.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/create/validation.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/delete/index.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/delete/main.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/get/index.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/get/main.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/index.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/search/index.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/search/main.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/search/validation.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/update/index.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/update/main.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/update/validation.ts
  • x-pack/platform/test/api_integration/fixtures/kbn_archives/lens/constant_keyword.json
  • x-pack/platform/test/moon.yml
  • x-pack/platform/test/tsconfig.json
💤 Files with no reviewable changes (21)
  • x-pack/platform/test/api_integration/fixtures/kbn_archives/lens/constant_keyword.json
  • x-pack/platform/test/api_integration/apis/lens/visualizations/delete/main.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/update/main.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/delete/index.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/create/index.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/update/index.ts
  • x-pack/platform/test/tsconfig.json
  • x-pack/platform/test/api_integration/apis/lens/config.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/get/main.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/create/validation.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/create/main.ts
  • x-pack/platform/test/api_integration/apis/lens/examples.ts
  • x-pack/platform/test/moon.yml
  • x-pack/platform/test/api_integration/apis/lens/visualizations/search/main.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/update/validation.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/search/validation.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/index.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/search/index.ts
  • x-pack/platform/test/api_integration/apis/lens/visualizations/get/index.ts
  • .buildkite/ftr_platform_stateful_configs.yml
  • .github/CODEOWNERS

📝 Walkthrough

Walkthrough

This PR migrates Lens API tests from the FTR framework to Scout. New Scout-based test suites are added under x-pack/platform/plugins/shared/lens/test/scout/api/ with shared fixtures and constants, covering visualization create, read, update, delete, and search operations. The old FTR tests in x-pack/platform/test/api_integration/apis/lens/ are removed. Build configuration files are updated to remove FTR references, reassign CODEOWNERS, and drop the @kbn/lens-common dependency from the test project.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@jbudz jbudz left a comment

Choose a reason for hiding this comment

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

.buildkite/ftr_platform_stateful_configs.yml lgtm

Copy link
Copy Markdown
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

Looks great, just added one comment/question. Ran the tests locally too.

*/
export const COMMON_HEADERS = {
'kbn-xsrf': 'some-xsrf-token',
'x-elastic-internal-origin': 'kibana',
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.

As of 9.4 /api/visualizations is a public API - I wonder should we remove this header or maybe even do 2 runs to simulate internal and external API access?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. If it is public we should drop the header, as for the 2nd case it really depends if Kibana keeps calling it this way?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

checking if removal works 367ae4b

@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout Lane #6 - stateful-classic / default / local-stateful-classic - Hosts Page - Flyout - Dashboards Tab
  • [job] [logs] Scout Lane #6 - stateful-classic / default / local-stateful-classic - Hosts Page - Flyout - Logs Tab
  • [job] [logs] Scout Lane #6 - stateful-classic / default / local-stateful-classic - Hosts Page - Flyout - Metadata Tab
  • [job] [logs] Scout Lane #6 - stateful-classic / default / local-stateful-classic - Hosts Page - Flyout - Metrics Tab
  • [job] [logs] Scout Lane #6 - stateful-classic / default / local-stateful-classic - Hosts Page - Flyout - Open as page and return
  • [job] [logs] Scout Lane #6 - stateful-classic / default / local-stateful-classic - Hosts Page - Flyout - Overview Tab - KPI charts and collapsible sections
  • [job] [logs] Scout Lane #6 - stateful-classic / default / local-stateful-classic - Hosts Page - Flyout - Overview Tab - Services section
  • [job] [logs] Scout Lane #6 - stateful-classic / default / local-stateful-classic - Hosts Page - Flyout - Processes Tab

Metrics [docs]

✅ unchanged

History

@dmlemeshko dmlemeshko merged commit b99d043 into elastic:main May 8, 2026
45 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/25563268298

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 267993

Questions ?

Please refer to the Backport tool documentation

@dmlemeshko
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.4

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

Questions ?

Please refer to the Backport tool documentation

@dmlemeshko
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.3

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

Questions ?

Please refer to the Backport tool documentation

@dmlemeshko
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
8.19

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

Questions ?

Please refer to the Backport tool documentation

@dmlemeshko dmlemeshko added backport:version Backport to applied version labels and removed backport:all-open Backport to all branches that could still receive a release labels May 8, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.3, 9.4

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

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
9.3 Backport failed because of merge conflicts
9.4 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 267993

Questions ?

Please refer to the Backport tool documentation

@walterra
Copy link
Copy Markdown
Contributor

About the backports: The APIs tested are only available since 9.4 so the 9.3 backports isn't necessary.

dmlemeshko added a commit that referenced this pull request May 11, 2026
# Backport

This will backport the following commits from `main` to `9.4`:
- [[scout] migrate Lens API tests
(#267993)](#267993)

<!--- Backport version: 11.0.2 -->

### 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-08T15:10:42Z","message":"[scout]
migrate Lens API tests (#267993)\n\n## Summary\n\nThis PR migrates Lens
API tests to Scout:\n\nbefore:
`x-pack/platform/test/api_integration/apis/lens`\nafter:
`x-pack/platform/plugins/shared/lens/test/scout/api`\n\n<img
width=\"1954\" height=\"879\" alt=\"Screenshot 2026-05-07 at 17 42
01\"\nsrc=\"https://github.com/user-attachments/assets/38f27bbd-2078-4212-9076-02112aa1769b\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b99d043eaa2b88309d9c6c22502e7285d0193718","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.5.0"],"title":"[scout]
migrate Lens API
tests","number":267993,"url":"https://github.com/elastic/kibana/pull/267993","mergeCommit":{"message":"[scout]
migrate Lens API tests (#267993)\n\n## Summary\n\nThis PR migrates Lens
API tests to Scout:\n\nbefore:
`x-pack/platform/test/api_integration/apis/lens`\nafter:
`x-pack/platform/plugins/shared/lens/test/scout/api`\n\n<img
width=\"1954\" height=\"879\" alt=\"Screenshot 2026-05-07 at 17 42
01\"\nsrc=\"https://github.com/user-attachments/assets/38f27bbd-2078-4212-9076-02112aa1769b\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b99d043eaa2b88309d9c6c22502e7285d0193718"}},"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/267993","number":267993,"mergeCommit":{"message":"[scout]
migrate Lens API tests (#267993)\n\n## Summary\n\nThis PR migrates Lens
API tests to Scout:\n\nbefore:
`x-pack/platform/test/api_integration/apis/lens`\nafter:
`x-pack/platform/plugins/shared/lens/test/scout/api`\n\n<img
width=\"1954\" height=\"879\" alt=\"Screenshot 2026-05-07 at 17 42
01\"\nsrc=\"https://github.com/user-attachments/assets/38f27bbd-2078-4212-9076-02112aa1769b\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b99d043eaa2b88309d9c6c22502e7285d0193718"}}]}]
BACKPORT-->
dmlemeshko added a commit that referenced this pull request May 11, 2026
# Backport

This will backport the following commits from `main` to `9.3`:
- [[scout] migrate Lens API tests
(#267993)](#267993)

<!--- Backport version: 11.0.2 -->

### 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-08T15:10:42Z","message":"[scout]
migrate Lens API tests (#267993)\n\n## Summary\n\nThis PR migrates Lens
API tests to Scout:\n\nbefore:
`x-pack/platform/test/api_integration/apis/lens`\nafter:
`x-pack/platform/plugins/shared/lens/test/scout/api`\n\n<img
width=\"1954\" height=\"879\" alt=\"Screenshot 2026-05-07 at 17 42
01\"\nsrc=\"https://github.com/user-attachments/assets/38f27bbd-2078-4212-9076-02112aa1769b\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b99d043eaa2b88309d9c6c22502e7285d0193718","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.5.0"],"title":"[scout]
migrate Lens API
tests","number":267993,"url":"https://github.com/elastic/kibana/pull/267993","mergeCommit":{"message":"[scout]
migrate Lens API tests (#267993)\n\n## Summary\n\nThis PR migrates Lens
API tests to Scout:\n\nbefore:
`x-pack/platform/test/api_integration/apis/lens`\nafter:
`x-pack/platform/plugins/shared/lens/test/scout/api`\n\n<img
width=\"1954\" height=\"879\" alt=\"Screenshot 2026-05-07 at 17 42
01\"\nsrc=\"https://github.com/user-attachments/assets/38f27bbd-2078-4212-9076-02112aa1769b\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b99d043eaa2b88309d9c6c22502e7285d0193718"}},"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/267993","number":267993,"mergeCommit":{"message":"[scout]
migrate Lens API tests (#267993)\n\n## Summary\n\nThis PR migrates Lens
API tests to Scout:\n\nbefore:
`x-pack/platform/test/api_integration/apis/lens`\nafter:
`x-pack/platform/plugins/shared/lens/test/scout/api`\n\n<img
width=\"1954\" height=\"879\" alt=\"Screenshot 2026-05-07 at 17 42
01\"\nsrc=\"https://github.com/user-attachments/assets/38f27bbd-2078-4212-9076-02112aa1769b\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b99d043eaa2b88309d9c6c22502e7285d0193718"}},{"url":"https://github.com/elastic/kibana/pull/268499","number":268499,"branch":"9.4","state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
js-jankisalvi pushed a commit to js-jankisalvi/kibana that referenced this pull request May 12, 2026
## Summary

This PR migrates Lens API tests to Scout:

before: `x-pack/platform/test/api_integration/apis/lens`
after: `x-pack/platform/plugins/shared/lens/test/scout/api`

<img width="1954" height="879" alt="Screenshot 2026-05-07 at 17 42 01"
src="https://github.com/user-attachments/assets/38f27bbd-2078-4212-9076-02112aa1769b"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes test:scout v9.3.5 v9.4.1 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants