kibana/scripts/check_ftr_code_owners.js
Kibana Machine 59a6cf6d4d
[8.x] [ftr] Speed up FTR code owner check (#205093) (#205415)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ftr] Speed up FTR code owner check
(#205093)](https://github.com/elastic/kibana/pull/205093)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"David
Olaru","email":"dolaru@elastic.co"},"sourceCommit":{"committedDate":"2025-01-02T17:10:20Z","message":"[ftr]
Speed up FTR code owner check (#205093)\n\n## Summary\r\n\r\nSwitch to
one matcher w/ all code owner patterns rather than separate\r\nmatchers
for each code owner pattern. Reduces the run time
of\r\n`scripts/check_ftr_code_owners.js` by ~10x.\r\n\r\n###
Before\r\n```console\r\n▶ node scripts/check_ftr_code_owners.js\r\n info
Reading CODEOWNERS file\r\n info Checking ownership for 8653 test files
(this will take a while)\r\n info Ownership check complete (took 18.89
s)\r\n succ All test files have a code owner. 🥳\r\n```\r\n\r\n####
After\r\n```console\r\n▶ node scripts/check_ftr_code_owners.js\r\n info
Checked 8653 test files in 1.59s\r\n succ All test files have a code
owner
🥳\r\n```","sha":"a0eebb82c9ef8385cecd4a5f6c0d1ebd22561789","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","v8.18.0"],"title":"[ftr]
Speed up FTR code owner
check","number":205093,"url":"https://github.com/elastic/kibana/pull/205093","mergeCommit":{"message":"[ftr]
Speed up FTR code owner check (#205093)\n\n## Summary\r\n\r\nSwitch to
one matcher w/ all code owner patterns rather than separate\r\nmatchers
for each code owner pattern. Reduces the run time
of\r\n`scripts/check_ftr_code_owners.js` by ~10x.\r\n\r\n###
Before\r\n```console\r\n▶ node scripts/check_ftr_code_owners.js\r\n info
Reading CODEOWNERS file\r\n info Checking ownership for 8653 test files
(this will take a while)\r\n info Ownership check complete (took 18.89
s)\r\n succ All test files have a code owner. 🥳\r\n```\r\n\r\n####
After\r\n```console\r\n▶ node scripts/check_ftr_code_owners.js\r\n info
Checked 8653 test files in 1.59s\r\n succ All test files have a code
owner
🥳\r\n```","sha":"a0eebb82c9ef8385cecd4a5f6c0d1ebd22561789"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205093","number":205093,"mergeCommit":{"message":"[ftr]
Speed up FTR code owner check (#205093)\n\n## Summary\r\n\r\nSwitch to
one matcher w/ all code owner patterns rather than separate\r\nmatchers
for each code owner pattern. Reduces the run time
of\r\n`scripts/check_ftr_code_owners.js` by ~10x.\r\n\r\n###
Before\r\n```console\r\n▶ node scripts/check_ftr_code_owners.js\r\n info
Reading CODEOWNERS file\r\n info Checking ownership for 8653 test files
(this will take a while)\r\n info Ownership check complete (took 18.89
s)\r\n succ All test files have a code owner. 🥳\r\n```\r\n\r\n####
After\r\n```console\r\n▶ node scripts/check_ftr_code_owners.js\r\n info
Checked 8653 test files in 1.59s\r\n succ All test files have a code
owner
🥳\r\n```","sha":"a0eebb82c9ef8385cecd4a5f6c0d1ebd22561789"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: David Olaru <dolaru@elastic.co>
2025-01-02 12:53:22 -06:00

11 lines
554 B
JavaScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/
require('../src/setup_node_env');
void require('@kbn/test').checkFTRCodeOwnersCLI();