Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kbn-scout] Custom event-oriented test reporter & persistence #202906

Merged
merged 14 commits into from
Dec 9, 2024

Conversation

dolaru
Copy link
Member

@dolaru dolaru commented Dec 4, 2024

Summary

These changes introduce an event-oriented test reporter which should aid with analysis of test runs over time.

Scout CLI

All Scout related CLI commands are now consolidated to a single script: ./scripts/scout.js.

Scout report

This is essentially a tool for logging events that occur during a test run and save them to an ndjson file for later consumption.

Scout report events are best consumed when indexed in an ES datastream. Initializing the datastream and uploading events should be fairly simple to do using the newly added CLI commands initialize-report-datastream and upload-events.

Reporters

Easy to use reporters that produce a Scout report have been added for Playwright and FTR (Mocha).

When these are used, you can expect the reports to be saved automatically under .scout/reports relative to the Kibana repository root.

Reporters have been attached to FTR and Scout Playwright configs. For FTR, a report will only be produced if the environment variable ENABLE_SCOUT_REPORTER=true is set.

@dolaru dolaru added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting v9.0.0 test:scout labels Dec 4, 2024
@dolaru dolaru self-assigned this Dec 4, 2024
@dolaru dolaru marked this pull request as ready for review December 5, 2024 13:51
@dolaru dolaru requested review from a team as code owners December 5, 2024 13:51
packages/kbn-scout-info/README.md Outdated Show resolved Hide resolved
packages/kbn-scout/src/cli/run_tests.ts Outdated Show resolved Hide resolved
packages/kbn-scout/src/cli/start_server.ts Outdated Show resolved Hide resolved
packages/kbn-scout-reporting/src/datasources/buildkite.ts Outdated Show resolved Hide resolved
Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

Next batch of comments - still reviewing more.

Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

Two more comments

@dolaru dolaru requested a review from pheyos December 9, 2024 12:00
@dolaru
Copy link
Member Author

dolaru commented Dec 9, 2024

@pheyos Review comments addressed. Changes since you've last reviewed are here.

Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

LGTM 🚀
Also went through a number of scenarios locally (including skipped and failed tests) and uploaded results to a cloud cluster. That all worked fine for me.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/scout-info - 6 +6
@kbn/scout-reporting - 53 +53
@kbn/test 303 305 +2
total +61

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/scout-reporting - 3 +3
Unknown metric groups

API count

id before after diff
@kbn/scout 119 117 -2
@kbn/scout-info - 6 +6
@kbn/scout-reporting - 68 +68
@kbn/test 358 360 +2
total +74

ESLint disabled line counts

id before after diff
@kbn/scout-reporting - 2 +2

Total ESLint disabled count

id before after diff
@kbn/scout-reporting - 2 +2

History

cc @dolaru

@dolaru dolaru merged commit ad4e8ef into elastic:main Dec 9, 2024
9 checks passed
@dolaru dolaru deleted the scout-reporting branch December 9, 2024 15:11
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
Samiul-TheSoccerFan pushed a commit to Samiul-TheSoccerFan/kibana that referenced this pull request Dec 10, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
@dolaru dolaru added backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) and removed backport:skip This commit does not require backporting labels Dec 17, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 202906

Questions ?

Please refer to the Backport tool documentation

1 similar comment
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 202906

Questions ?

Please refer to the Backport tool documentation

dmlemeshko pushed a commit to dmlemeshko/kibana that referenced this pull request Dec 18, 2024
…c#202906)

(cherry picked from commit ad4e8ef)

# Conflicts:
#	.github/CODEOWNERS
@dmlemeshko
Copy link
Member

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

dmlemeshko added a commit that referenced this pull request Dec 18, 2024
…202906) (#204696)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[kbn-scout] Custom event-oriented test reporter & persistence
(#202906)](#202906)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"David
Olaru","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-09T14:34:25Z","message":"[kbn-scout]
Custom event-oriented test reporter & persistence
(#202906)","sha":"ad4e8efd0f07f8f682709efce271493a4872e331","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","test:scout"],"number":202906,"url":"https://github.com/elastic/kibana/pull/202906","mergeCommit":{"message":"[kbn-scout]
Custom event-oriented test reporter & persistence
(#202906)","sha":"ad4e8efd0f07f8f682709efce271493a4872e331"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202906","number":202906,"mergeCommit":{"message":"[kbn-scout]
Custom event-oriented test reporter & persistence
(#202906)","sha":"ad4e8efd0f07f8f682709efce271493a4872e331"}}]}]
BACKPORT-->

---------

Co-authored-by: David Olaru <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes test:scout v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants