mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
## 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. |
||
---|---|---|
.. | ||
__fixtures__ | ||
add_messages_to_report.test.ts | ||
add_messages_to_report.ts | ||
buildkite_metadata.ts | ||
es_config | ||
existing_failed_test_issues.test.ts | ||
existing_failed_test_issues.ts | ||
failed_tests_reporter_cli.ts | ||
generate_scout_test_failure_artifacts.ts | ||
get_failures.test.ts | ||
get_failures.ts | ||
github_api.ts | ||
issue_metadata.test.ts | ||
issue_metadata.ts | ||
README.md | ||
report_failure.test.ts | ||
report_failure.ts | ||
report_failures_to_es.ts | ||
report_failures_to_file.ts | ||
report_failures_to_file_html_template.html | ||
report_metadata.test.ts | ||
report_metadata.ts | ||
test_report.ts |
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.