-
Notifications
You must be signed in to change notification settings - Fork 377
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
Check that regexps match in linear time #3042
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great test!
This is a nice change -- maybe worth pushing over the line? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3042 +/- ##
=======================================
Coverage 97.72% 97.72%
=======================================
Files 1356 1356
Lines 82494 82494
Branches 4221 4221
=======================================
+ Hits 80614 80615 +1
+ Misses 1880 1879 -1 ☔ View full report in Codecov by Sentry. |
BenchmarksBenchmark execution time: 2025-01-15 21:44:33 Comparing candidate commit ff08e5c in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 30 metrics, 2 unstable metrics. scenario:profiler - stack collector
|
Something seems weird about this PR in CI -- see my note on #3042 (comment) |
* master: (161 commits) Bump to version 2.9.0 (#4293) Increase type checking coverage (#4290) DEBUG-3329 rename datadog/di/init to datadog/di/preload (#4288) update supported versions workflow (#4289) DEBUG-3182 DI railtie (#4272) DEBUG-3328 report DI status in environment logger summary (#4285) Move out ostruct gem from test group for Ruby 3.5 DEBUG-3316 verify code tracking works in forked processes (#4284) Fix rebase issue in Rack::RequestMiddleware Improve code style in AppSec rack middlewares Improve variable naming in Rack::RequestBodyMiddleware Improve variable naming in Rack::RequestMiddleware Simplify Rack::RequestMiddleware Switch AppSec rack blocking to throw Extract to .gitlab/scripts Implement polling vaccine Update RBS signatures Add new RSpec negate matcher not_change Replace direct AppSec::Processor::Context calls Change AppSec::Context exposed interface ...
Datadog ReportBranch report: ✅ 0 Failed, 22577 Passed, 1482 Skipped, 5m 47.76s Total Time New Flaky Tests (1)
|
What does this PR do?
Check that various regexps we include match in linear time.
Motivation
Some regexps used to not match in linear time, we fixed some, but have not audited all of them. In addition, this will help prevent regressions.
Additional Notes
Hinges on Regexp.linear_time?, introduced in Ruby 3.3.
How to test the change?
Specs