Fix globstar expansion in CI Vis code owners - #9045
Conversation
| rx = rx.Replace("/\\*\\*/", "/(?:.*/)?"); | ||
|
|
||
| // A leading globstar followed by a slash also matches at the repository root. | ||
| rx = rx.Replace("\\*\\*/", "(?:.*/)?"); |
There was a problem hiding this comment.
I don't think we want . because that matches / as well
| rx = rx.Replace("/\\*\\*/", "/(?:.*/)?"); | |
| // A leading globstar followed by a slash also matches at the repository root. | |
| rx = rx.Replace("\\*\\*/", "(?:.*/)?"); | |
| rx = rx.Replace("/\\*\\*/", "/(?:[^/]*/)?"); | |
| // A leading globstar followed by a slash also matches at the repository root. | |
| rx = rx.Replace("\\*\\*/", "(?:[^/]*/)?"); |
|
Will re-raise this next week-ish |
BenchmarksBenchmark execution time: 2026-08-13 16:35:09 Comparing candidate commit 92d59f0 in PR branch Found 1 performance improvements and 1 performance regressions! Performance is the same for 70 metrics, 0 unstable metrics, 66 known flaky benchmarks, 60 flaky benchmarks without significant changes.
|
## Summary of changes Tweak codeowners to work around a bug in our testlogger ## Reason for change Currently there's a bug in the CODEOWNERS parser with the pattern `something/**/here` which means it recognizes `/something/else/here` but not `/something/else`. This is a workaround, until we fix the test logger ## Implementation details Add the extra entry ## Test coverage errr ## Other details See #9045 for the real fix #incident-57303
Summary of changes
Makes it so that
/**/patterns when expanded/computed/regexed by CI Visibility will handle cases where there are zero matches.Reason for change
We ran into this issue with
/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/**/DataStreamsMonitoring*in our CODEOWNERs where this specific testDatadog.Trace.ClrProfiler.IntegrationTests.DataStreamsMonitoringHttpClientTestsat the top level ofDatadog.Trace.ClrProfiler.IntegrationTestswasn't being matched to the correct teams in CI Visibility.This was because
/**/was being interpreted as/.*/for the cases with no directory (works fine for cases where there are directories though)/.*/-> match 0 to N characters but if no matches becomes//exactly.Implementation details
This changes
/.*/to/(?:.*/)?Test coverage
some basic tests added
Also played around with it in regex101 to see if it works and it seems like it does
Other details