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

[8.x] [ftr] Speed up FTR code owner check (#205093) #205415

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

Switch to one matcher w/ all code owner patterns rather than separate
matchers for each code owner pattern. Reduces the run time of
`scripts/check_ftr_code_owners.js` by ~10x.

### Before
```console
▶ node scripts/check_ftr_code_owners.js
 info Reading CODEOWNERS file
 info Checking ownership for 8653 test files (this will take a while)
 info Ownership check complete (took 18.89 s)
 succ All test files have a code owner. 🥳
```

#### After
```console
▶ node scripts/check_ftr_code_owners.js
 info Checked 8653 test files in 1.59s
 succ All test files have a code owner 🥳
```

(cherry picked from commit a0eebb8)
@kibanamachine kibanamachine merged commit 59a6cf6 into elastic:8.x Jan 2, 2025
11 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @dolaru

nreese pushed a commit to nreese/kibana that referenced this pull request Jan 2, 2025
…05415)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ftr] Speed up FTR code owner check
(elastic#205093)](elastic#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":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-02T17:10:20Z","message":"[ftr]
Speed up FTR code owner check (elastic#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 (elastic#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 (elastic#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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants