-
Notifications
You must be signed in to change notification settings - Fork 3
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
do not hard fail on failure to parse codeowners file #83
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.
I'm not a crab, but this looks good to me
✅ 21 passed ⋅ (learn more) |
cli/src/scanner.rs
Outdated
return Some(owners); | ||
} | ||
log::debug!( | ||
"Found CODEOWNERS file `{}`, but couldn't parse it.", |
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.
Should be error!
?
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.
Also, let's log the parsing error.
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.
I'm fine with that. Do we want to show this error to the users though? We plan to follow up by uploading the CODEOWNERS file regardless so that we can eventually post-process
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.
Also, the parsing error isn't useful—it's just a PatternError
from the glob
crate. That won't help anyone understand why their file isn't correct.
You may need to update workflows to use new paths. Specifically |
I'll double-check the |
65385a2
to
c0aa112
Compare
I updated the log to look like this:
Also, I updated the code to use |
codeowners
usesunwrap
, so we need to fork the library to allow us to handle errors. If we cannot parse a codeowners file a debug log will be emitted: