-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Handle DependencyFileNotParseable error on Updater.run #11288
Conversation
1ad0c6a
to
94d2bed
Compare
php
to 8.2
(#6506)94d2bed
to
1906bda
Compare
1906bda
to
3b8bd40
Compare
d921dfd
to
f226cef
Compare
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.
LGTM, I would update the test assertion as I mentioned above but approving in the meantime.
6f84548
to
94e1003
Compare
return unless Experiments.enabled?(:record_update_job_unknown_error) | ||
|
||
service.record_update_job_unknown_error( | ||
error_type: T.must(error_details).fetch(:"error-type"), |
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.
any reason to record this as an unknown error again?
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.
Mostly because that's what's being done with the same error in this same file a few lines earlier. I'm not completely sure what the rules are for this categorisation so I just went with the precedent.
94e1003
to
1a21d40
Compare
1a21d40
to
5038fd5
Compare
What are you trying to accomplish?
Handle a DependencyFileNotParseable error when running the Updater so that this error doesn't get propagated up the chain as an unknown error. It also won't appear in Sentry once it's been handled correctly.
We are already handling the exception on line https://github.com/dependabot/dependabot-core/blob/main/updater/lib/dependabot/update_files_command.rb#L27 and this just reapplies the same logic.
How will you know you've accomplished your goal?
The Sentry issue specified above should cease to appear.
Checklist