microsoft / component-detection

Scans your project to determine what components you use
MIT License
396 stars 81 forks source link

Fix the `requested_extras` parsing for pip report #1154

Closed pauld-msft closed 3 weeks ago

pauld-msft commented 3 weeks ago

3.5% of all pipreport builds are failing to deserialize the pip report requested_extras section with an error similar to: "Deserialized JSON type 'Newtonsoft.Json.Linq.JArray' is not compatible with expected type 'Newtonsoft.Json.Linq.JObject'. Path 'install[101].requested_extras', line 5379, position 7."

This updates the type from JObject to JArray to resolve the deserialization error.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.3%. Comparing base (9f1e5a9) to head (8f30617).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1154 +/- ## ===================================== Coverage 76.3% 76.3% ===================================== Files 255 255 Lines 11303 11303 Branches 1134 1134 ===================================== + Hits 8625 8626 +1 + Misses 2346 2345 -1 Partials 332 332 ```

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

github-actions[bot] commented 3 weeks 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 🙂