Skip to content

Remove re2 as a dependency #3901

Closed
@AMoo-Miki

Description

Apparently, re2 is only used to replace patterns in the series labels of Timeline:

if (config.regex) {
// not using a standard `import` so that if there's an issue with the re2 native module
// that it doesn't prevent OpenSearch Dashboards from starting up and we only have an issue using Timeline labels
const RE2 = require('re2');
eachSeries.label = eachSeries.label.replace(new RE2(config.regex), config.label);
} else {

Since re2 doesn't release binaries for all the Node.js versions and architectures that OSD supports, we have been forced to maintain binary releases of our own and all that effort for this task feels unreasonable to me.

I feel like using the native RegExp would be sufficient here.

Metadata

Assignees

Labels

NODE 18 ⚙enhancementNew feature or requesttechnical debtIf not paid, jeapardizes long-term success and maintainability of the repository.v2.8.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions