-
Notifications
You must be signed in to change notification settings - Fork 183
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
Bugfix: when looking for a match in CODEOWNERS
, do not emit error message for commented out paths
#5366
Conversation
CODEOWNERS
paths that are commented out.CODEOWNERS
paths that are commented out.
CODEOWNERS
paths that are commented out.CODEOWNERS
, do not emit error message for commented out paths
...code-owners-parser/Azure.Sdk.Tools.RetrieveCodeOwners.Tests/CodeownersManualAnalysisTests.cs
Outdated
Show resolved
Hide resolved
…sts/CodeownersManualAnalysisTests.cs
@@ -352,6 +352,7 @@ private void WriteLangRepoOwnersDiffToCsv(string langName) | |||
outputLines.AddRange(PathsWithMissingPrefixSlash(entries)); | |||
outputLines.AddRange(PathsWithMissingSuffixSlash(targetDir, entries, paths)); | |||
outputLines.AddRange(InvalidPaths(entries)); | |||
// TODO: add a check here for CODEOWNERS paths that do not match any dir or file. |
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.
Do we need an issue tracking this?
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.
@benbp not really. I put it here more as a reminder that this validation is currently missing, in the unlikely scenario I (or somebody else) will have to use it again. I forgot at first to include it. But I kind of expect for it to be actually picked up when working on:
This kind of validation is mentioned here:
Before this change, commented out paths in
CODEOWNERS
violated the rule that the paths should start with/
. As a result, theConsole.Err
was spammed with error messages, resulting inConsole.Out
truncation forazure-sdk-for-js
andazure-sdk-for-java
repos, making it impossible to deserialize the result written toConsole.Out
into valid json. This brokeCodeownersManualAnalysisTests
withOutOfMemoryException
upon getting value fromConsole.Err
.This bug was introduced by:
CODEOWNERS
matcher. #5330as that PR stopped prepending missing
/
and instead started outputting message toConsole.Err
if they were missing.Secondary fix
This PR also fixes a bug related to validating paths.