[Inference] regex worker for anonymization#227113
Conversation
|
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
| // eslint-disable-next-line @kbn/imports/no_boundary_crossing | ||
| require('../../../../../../../../src/setup_node_env'); |
There was a problem hiding this comment.
🙈 we really have zero supports for workers today
| ], | ||
| "kbn_references": [ | ||
| { | ||
| "path": "../../../../../src/setup_node_env/tsconfig.json" |
There was a problem hiding this comment.
setup_node_env causes type errors without it.
…nian/kibana into anonymization-regex-worker
...platform/plugins/shared/inference/server/chat_complete/anonymization/regex_worker_wrapper.js
Outdated
Show resolved
Hide resolved
…nian/kibana into anonymization-regex-worker
...platform/plugins/shared/inference/server/chat_complete/anonymization/regex_worker_wrapper.js
Outdated
Show resolved
Hide resolved
...platform/plugins/shared/inference/server/chat_complete/anonymization/regex_worker_wrapper.js
Outdated
Show resolved
Hide resolved
...platform/plugins/shared/inference/server/chat_complete/anonymization/regex_worker_wrapper.js
Outdated
Show resolved
Hide resolved
dgieselaar
left a comment
There was a problem hiding this comment.
approving ahead of time, but please take a look at x-pack/platform/plugins/shared/inference/server/chat_complete/anonymization/regex_worker_wrapper.js - specifically the /dist import. thanks for getting this done so quickly!
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Public APIs missing comments
Unknown metric groupsAPI count
ESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
|
|
Starting backport for target branches: 8.19, 9.1 https://github.com/elastic/kibana/actions/runs/16229533879 |
## Summary Followup to elastic#225539 Adds an anonymization-regex worker pool to run user-defined regex patterns out-of-process, protecting the Node event-loop from catastrophic back-tracking. For internal use we have config to adjust or turn off the worker: • `enabled` – turn worker on/off • `minThreads` / `maxThreads` – worker size • `idleTimeout` – how long a worker thread is allowed to be idle • `taskTimeout` – per-regex task limit Contributions by windsurf(o3). (cherry picked from commit 1b9063a)
## Summary Followup to elastic#225539 Adds an anonymization-regex worker pool to run user-defined regex patterns out-of-process, protecting the Node event-loop from catastrophic back-tracking. For internal use we have config to adjust or turn off the worker: • `enabled` – turn worker on/off • `minThreads` / `maxThreads` – worker size • `idleTimeout` – how long a worker thread is allowed to be idle • `taskTimeout` – per-regex task limit Contributions by windsurf(o3). (cherry picked from commit 1b9063a)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `9.1`: - [[Inference] regex worker for anonymization (#227113)](#227113) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Sandra G","email":"neptunian@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-11T20:52:28Z","message":"[Inference] regex worker for anonymization (#227113)\n\n## Summary\n\nFollowup to https://github.com/elastic/kibana/pull/225539\n\nAdds an anonymization-regex worker pool to run user-defined regex\npatterns out-of-process, protecting the Node event-loop from\ncatastrophic back-tracking.\n\nFor internal use we have config to adjust or turn off the worker:\n• `enabled` – turn worker on/off\n• `minThreads` / `maxThreads` – worker size\n• `idleTimeout` – how long a worker thread is allowed to be idle\n• `taskTimeout` – per-regex task limit\n\nContributions by windsurf(o3).","sha":"1b9063a61e2deaa56fae1f89cfce020a99f733d5","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Obs AI Assistant","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Inference] regex worker for anonymization","number":227113,"url":"https://github.com/elastic/kibana/pull/227113","mergeCommit":{"message":"[Inference] regex worker for anonymization (#227113)\n\n## Summary\n\nFollowup to https://github.com/elastic/kibana/pull/225539\n\nAdds an anonymization-regex worker pool to run user-defined regex\npatterns out-of-process, protecting the Node event-loop from\ncatastrophic back-tracking.\n\nFor internal use we have config to adjust or turn off the worker:\n• `enabled` – turn worker on/off\n• `minThreads` / `maxThreads` – worker size\n• `idleTimeout` – how long a worker thread is allowed to be idle\n• `taskTimeout` – per-regex task limit\n\nContributions by windsurf(o3).","sha":"1b9063a61e2deaa56fae1f89cfce020a99f733d5"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227113","number":227113,"mergeCommit":{"message":"[Inference] regex worker for anonymization (#227113)\n\n## Summary\n\nFollowup to https://github.com/elastic/kibana/pull/225539\n\nAdds an anonymization-regex worker pool to run user-defined regex\npatterns out-of-process, protecting the Node event-loop from\ncatastrophic back-tracking.\n\nFor internal use we have config to adjust or turn off the worker:\n• `enabled` – turn worker on/off\n• `minThreads` / `maxThreads` – worker size\n• `idleTimeout` – how long a worker thread is allowed to be idle\n• `taskTimeout` – per-regex task limit\n\nContributions by windsurf(o3).","sha":"1b9063a61e2deaa56fae1f89cfce020a99f733d5"}}]}] BACKPORT--> Co-authored-by: Sandra G <neptunian@users.noreply.github.com>
# Backport This will backport the following commits from `main` to `8.19`: - [[Inference] regex worker for anonymization (#227113)](#227113) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Sandra G","email":"neptunian@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-11T20:52:28Z","message":"[Inference] regex worker for anonymization (#227113)\n\n## Summary\n\nFollowup to https://github.com/elastic/kibana/pull/225539\n\nAdds an anonymization-regex worker pool to run user-defined regex\npatterns out-of-process, protecting the Node event-loop from\ncatastrophic back-tracking.\n\nFor internal use we have config to adjust or turn off the worker:\n• `enabled` – turn worker on/off\n• `minThreads` / `maxThreads` – worker size\n• `idleTimeout` – how long a worker thread is allowed to be idle\n• `taskTimeout` – per-regex task limit\n\nContributions by windsurf(o3).","sha":"1b9063a61e2deaa56fae1f89cfce020a99f733d5","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Obs AI Assistant","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Inference] regex worker for anonymization","number":227113,"url":"https://github.com/elastic/kibana/pull/227113","mergeCommit":{"message":"[Inference] regex worker for anonymization (#227113)\n\n## Summary\n\nFollowup to https://github.com/elastic/kibana/pull/225539\n\nAdds an anonymization-regex worker pool to run user-defined regex\npatterns out-of-process, protecting the Node event-loop from\ncatastrophic back-tracking.\n\nFor internal use we have config to adjust or turn off the worker:\n• `enabled` – turn worker on/off\n• `minThreads` / `maxThreads` – worker size\n• `idleTimeout` – how long a worker thread is allowed to be idle\n• `taskTimeout` – per-regex task limit\n\nContributions by windsurf(o3).","sha":"1b9063a61e2deaa56fae1f89cfce020a99f733d5"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227113","number":227113,"mergeCommit":{"message":"[Inference] regex worker for anonymization (#227113)\n\n## Summary\n\nFollowup to https://github.com/elastic/kibana/pull/225539\n\nAdds an anonymization-regex worker pool to run user-defined regex\npatterns out-of-process, protecting the Node event-loop from\ncatastrophic back-tracking.\n\nFor internal use we have config to adjust or turn off the worker:\n• `enabled` – turn worker on/off\n• `minThreads` / `maxThreads` – worker size\n• `idleTimeout` – how long a worker thread is allowed to be idle\n• `taskTimeout` – per-regex task limit\n\nContributions by windsurf(o3).","sha":"1b9063a61e2deaa56fae1f89cfce020a99f733d5"}}]}] BACKPORT--> Co-authored-by: Sandra G <neptunian@users.noreply.github.com>
## Summary Followup to elastic#225539 Adds an anonymization-regex worker pool to run user-defined regex patterns out-of-process, protecting the Node event-loop from catastrophic back-tracking. For internal use we have config to adjust or turn off the worker: • `enabled` – turn worker on/off • `minThreads` / `maxThreads` – worker size • `idleTimeout` – how long a worker thread is allowed to be idle • `taskTimeout` – per-regex task limit Contributions by windsurf(o3).
Summary
Followup to #225539
Adds an anonymization-regex worker pool to run user-defined regex patterns out-of-process, protecting the Node event-loop from catastrophic back-tracking.
For internal use we have config to adjust or turn off the worker:
•
enabled– turn worker on/off•
minThreads/maxThreads– worker size•
idleTimeout– how long a worker thread is allowed to be idle•
taskTimeout– per-regex task limitContributions by windsurf(o3).