microsoft / component-detection

Scans your project to determine what components you use
MIT License
398 stars 83 forks source link

Catch version spec failures in Python detection #1006

Closed cobya closed 5 months ago

cobya commented 5 months ago

When an invalid version specification is returned from PyPi (i.e. Requires-Dist: c (>dev)) the current implementation of Python resolvers both throw the exception all the way out, leading to a complete failure of Python graph creation. In this case we should log the warning and continue executing to get as many dependencies as possible.

grvillic commented 5 months ago

Let's bump Pip detectors version Id, since we are picking up dependency graphs we didn't use to

github-actions[bot] commented 5 months ago

👋 Hi! It looks like you modified some files in the Detectors folder. You may need to bump the detector versions if any of the following scenarios apply:

If none of the above scenarios apply, feel free to ignore this comment 🙂

codecov-commenter commented 5 months ago

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (349ef7a) 75.3% compared to head (f86b9dc) 75.3%.

Files Patch % Lines
...ComponentDetection.Detectors/pip/PythonResolver.cs 68.5% 7 Missing and 4 partials :warning:
...entDetection.Detectors/pip/SimplePythonResolver.cs 83.3% 5 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1006 +/- ## ===================================== Coverage 75.3% 75.3% ===================================== Files 236 236 Lines 10339 10353 +14 Branches 1025 1025 ===================================== + Hits 7786 7800 +14 Misses 2269 2269 Partials 284 284 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.