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

Feature: Add Include/Exclude Class regular expression matcher #4937

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ying-jeanne
Copy link

@ying-jeanne ying-jeanne commented May 15, 2024

What's being changed:

/claim #2481

Never used bounty before, just for fun, thank you for building this nice project.

This PR aims to address issue #2481.

I think it is just a bad idea trying to guess whether users intend to use an exact match or a regular expression. So in order to distinguish the intention and give more flexibility on settings, whether we could change include list to a list of struct:

{
  "include": [
      {
          "expression": "foo",
          "is_regex": false
      }
  ]
}

This approach offers clarity in distinguishing between exact matches and regular expressions. However, it may increase verbosity.

or adding a new array:

{
    "include_patterns": []{}
}

This alternative maintains backward compatibility with existing APIs and reduces verbosity. This PR use the second approach, if the direction seems ok, i would update docs and examples accordingly, please let me know.

Review checklist

  • Documentation has been updated, if necessary. Link to changed documentation:
  • Chaos pipeline run or not necessary. Link to pipeline:
  • All new code is covered by tests where it is reasonable.
  • Performance tests have been run or not necessary.

@ying-jeanne ying-jeanne marked this pull request as ready for review May 15, 2024 23:33
Signed-off-by: Ying WANG <ying.wang@grafana.com>
Copy link

algora-pbc bot commented May 15, 2024

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe/Alipay.

Signed-off-by: Ying WANG <ying.wang@grafana.com>
Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
2.6% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant