Skip to content
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

Pauldorsch/reconcile dependency graph logic #1183

Merged
merged 13 commits into from
Jun 21, 2024

Conversation

pauld-msft
Copy link
Member

@pauld-msft pauld-msft commented Jun 20, 2024

This PR has a few improvements:

  • reconciles the dependency graph creation between the 2 pip detectors. They now use a shared method for determining valid parents. E.g. we were ignoring extra requirements for the legacy pip, but not for PipReport, but now we treat both the same.
  • legacy detection was dropping packages that had non lowercase letters in their METADATA file path, so added case insensitive fallback logic
  • handle null or empty conditional env vars gracefully by allowing the package through rather than erroring
  • noticed some local parallelization issues, so only enabling for pip report for right now

The test/Microsoft.ComponentDetection.VerificationTests/resources/pip/roots/requirements.txt file added in this PR has 30 diffs in main at the moment, all in the AddedRootId section of the experiment results. Now, it has 0 diffs.

@pauld-msft pauld-msft requested a review from a team as a code owner June 20, 2024 19:51
@pauld-msft pauld-msft requested a review from JamieMagee June 20, 2024 19:51
Copy link

github-actions bot commented Jun 20, 2024

👋 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:

  • The detector detects more or fewer components than before
  • The detector generates different parent/child graph relationships than before
  • The detector generates different devDependencies values than before

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

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 63.41463% with 15 lines in your changes missing coverage. Please review.

Project coverage is 76.2%. Comparing base (2284e06) to head (84f4eac).

Files Patch % Lines
...ection.Detectors/pip/PipReportComponentDetector.cs 68.1% 5 Missing and 2 partials ⚠️
...entDetection.Detectors/pip/PythonCommandService.cs 0.0% 5 Missing ⚠️
...ft.ComponentDetection.Detectors/pip/IPyPiClient.cs 0.0% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1183     +/-   ##
=======================================
- Coverage   76.2%   76.2%   -0.1%     
=======================================
  Files        257     257             
  Lines      11440   11467     +27     
  Branches    1147    1151      +4     
=======================================
+ Hits        8723    8741     +18     
- Misses      2384    2394     +10     
+ Partials     333     332      -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pauld-msft
Copy link
Member Author

Verify snapshots are failing due to new validation test cases being added. However, if you see the checks that ran for d70d94072e9a452b0cf5d294acfb76df025a2fa0 you can view the actual diffs, which just involve changing the dependency graph as expected

@cobya cobya added type:bug Bug fix of existing functionality type:refactor Refactoring or improving of existing code detector:pip The pip detector version:minor labels Jun 21, 2024
@pauld-msft pauld-msft merged commit c20c3b0 into main Jun 21, 2024
22 of 26 checks passed
@pauld-msft pauld-msft deleted the pauldorsch/reconcile-dependency-graph-logic branch June 21, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detector:pip The pip detector type:bug Bug fix of existing functionality type:refactor Refactoring or improving of existing code version:minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants