Add more helpful error messaging when a vulnerable dependency cannot be upgraded#5542
Add more helpful error messaging when a vulnerable dependency cannot be upgraded#5542
Conversation
npm_and_yarn/lib/dependabot/npm_and_yarn/update_checker/vulnerability_auditor.rb
Outdated
Show resolved
Hide resolved
npm_and_yarn/lib/dependabot/npm_and_yarn/update_checker/vulnerability_auditor.rb
Outdated
Show resolved
Hide resolved
c3df4e5 to
425c391
Compare
|
🙃 I'm pretty sure the For I think the best course of action for the Does anyone have other suggestions? |
Can you represent the error message in the |
npm_and_yarn/lib/dependabot/npm_and_yarn/update_checker/vulnerability_auditor.rb
Outdated
Show resolved
Hide resolved
b51fc84 to
13258dd
Compare
deivid-rodriguez
left a comment
There was a problem hiding this comment.
I'm not really well versed into how npm updates work, but this looks good to me!
npm_and_yarn/lib/dependabot/npm_and_yarn/update_checker/vulnerability_auditor.rb
Outdated
Show resolved
Hide resolved
npm_and_yarn/lib/dependabot/npm_and_yarn/update_checker/vulnerability_auditor.rb
Outdated
Show resolved
Hide resolved
npm_and_yarn/spec/dependabot/npm_and_yarn/update_checker/vulnerability_auditor_spec.rb
Outdated
Show resolved
Hide resolved
npm_and_yarn/lib/dependabot/npm_and_yarn/update_checker/vulnerability_auditor.rb
Outdated
Show resolved
Hide resolved
… instead of raising
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
23bdd59 to
6204913
Compare
|
Reverting this in #5613 because of a TypeError. Will fix, add tests, and re-deploy. |
This PR adds a new method,
#explain_fix_unavailable, which adds anexplanationkey to thefix_unavailableobject when the UpdateChecker returns anupdate_not_possibleerror.This
explanationkey is also used in the ConflictingDependencies check which is printed out after a failed job run and also shows up in the Dependabot security alert view.The UpdateChecker should always raise with an
:update_not_possibleby this point since the call from#latest_version_resolvable_with_full_unlock?will not have anyviable audit resultsand thus nofix available