kibana/packages/kbn-failed-test-reporter-cli/failed_tests_reporter
Alex Szabo e40b17aa22
Disable allowAbsoluteUrls for axios (#215138)
## Summary
After https://github.com/elastic/kibana/pull/214843, `axios` client
usages need to set a flag to prevent the vulnerable behavior.

To reviewers: if you think it's a mistake, and you created a client to
request for absolute URLs, consider unsetting the `baseURL` to
communicate intent.
2025-03-25 09:52:36 +01:00
..
__fixtures__ SKA: Relocate "platform" packages that remain on /packages (#208704) 2025-02-24 11:03:30 +00:00
add_messages_to_report.test.ts SKA: Relocate "platform" packages that remain on /packages (#208704) 2025-02-24 11:03:30 +00:00
add_messages_to_report.ts Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
buildkite_metadata.ts Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
es_config
existing_failed_test_issues.test.ts Disable allowAbsoluteUrls for axios (#215138) 2025-03-25 09:52:36 +01:00
existing_failed_test_issues.ts Disable allowAbsoluteUrls for axios (#215138) 2025-03-25 09:52:36 +01:00
failed_tests_reporter_cli.ts [kbn-scout-reporting] add failed test reporter (#205096) 2025-01-15 18:40:34 +00:00
generate_scout_test_failure_artifacts.ts [kbn-scout-reporting] add failed test reporter (#205096) 2025-01-15 18:40:34 +00:00
get_failures.test.ts SKA: Relocate "platform" packages that remain on /packages (#208704) 2025-02-24 11:03:30 +00:00
get_failures.ts [Ownership] Add code owner to ftr failure report (#203076) 2024-12-16 17:05:20 +00:00
github_api.ts Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
issue_metadata.test.ts Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
issue_metadata.ts
README.md
report_failure.test.ts [Security Solution][Serverless] Github tickets / notifications (#197265) 2024-11-07 15:17:54 +02:00
report_failure.ts [Security Solution][Serverless] Github tickets / notifications (#197265) 2024-11-07 15:17:54 +02:00
report_failures_to_es.ts [CI tools] Use ES 8.x (#213056) 2025-03-05 20:26:57 +01:00
report_failures_to_file.ts SKA: Relocate /test to /src/platform/test (#210956) 2025-03-14 16:57:23 +00:00
report_failures_to_file_html_template.html
report_metadata.test.ts Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
report_metadata.ts Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
test_report.ts [Ownership] Add code owner to ftr failure report (#203076) 2024-12-16 17:05:20 +00:00

failed tests reporter

A little CLI that runs in CI to find the failed tests in the JUnit reports, then create/update github issues for each failure.

Test this script locally

To fetch some JUnit reports from a recent build on CI, visit its Google Cloud Storage Upload Report and execute the following in the JS Console:

copy(`wget -x -nH --cut-dirs 5 -P "target/downloaded_junit" "${Array.from($$('a[href$=".xml"]')).filter(a => a.innerText === 'Download').map(a => a.href.replace('https://storage.cloud.google.com/', 'https://storage.googleapis.com/')).join('" "')}"`)

This copies a script to download the reports, which you should execute in the root of the Kibana repository.

Next, run the CLI in --no-github-update mode so that it doesn't actually communicate with Github and --no-report-update to prevent the script from mutating the reports on disk and instead log the updated report.

node scripts/report_failed_tests.js --verbose --no-github-update --no-report-update target/downloaded_junit/**/*.xml

Unless you specify the GITHUB_TOKEN environment variable requests to read existing issues will use anonymous access which is limited to 60 requests per hour.