Don't report Pip for conda component - #1879
Merged
Ryan Brandenburg (ryanbrandenburg) merged 3 commits intoSep 25, 2026
Merged
Conversation
Ryan Brandenburg (ryanbrandenburg)
requested a review
from a team
as a code owner
September 25, 2026 00:20
Ryan Brandenburg (ryanbrandenburg)
requested review from
Greg Villicana (grvillic)
and
a lite review from Copilot
September 25, 2026 00:20
Copilot started reviewing on behalf of
Ryan Brandenburg (ryanbrandenburg)
September 25, 2026 00:20
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The remaining XML summary issue is a minor documentation nit and does not block approval.
Review effort: Lite
Findings: 1
What changed in this PR
Updates Conda lockfile classification to use the explicit manager field, preventing Conda packages with Python dependencies from being reported as Pip components.
Changes:
- Classifies only
manager: pipentries asPipComponent. - Bumps the detector version to 4.
- Updates regression tests and circular-dependency coverage.
| File | Description |
|---|---|
test/Microsoft.ComponentDetection.Detectors.Tests/CondaLockComponentDetectorTests.cs |
Updates classification and regression tests. |
src/Microsoft.ComponentDetection.Detectors/conda/CondaLockComponentDetector.cs |
Bumps the detector version. |
src/Microsoft.ComponentDetection.Detectors/conda/CondaDependencyResolver.cs |
Uses package manager metadata for component selection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Jeff Mendoza (jeffmendoza)
approved these changes
Sep 25, 2026
|
👋 Hi! It looks like you modified some files in the
If none of the above scenarios apply, feel free to ignore this comment 🙂 |
Copilot started reviewing on behalf of
Ryan Brandenburg (ryanbrandenburg)
September 25, 2026 17:15
View session
Jeff Mendoza (jeffmendoza)
approved these changes
Sep 25, 2026
Ryan Brandenburg (ryanbrandenburg)
merged commit Sep 25, 2026
6321ef1
into
main
15 of 16 checks passed
Ryan Brandenburg (ryanbrandenburg)
deleted the
users/rybrande/CondaNotPip
branch
September 25, 2026 18:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

I noticed that when I was testing things out I wasn't getting as many CondaComponents reported as I expected and realized that was because they were being reported as PipComponents. When I looked into why that was I gave this code snippet some deeper thought and decided that I don't believe it makes sense anymore.
The presence of Python as a dependency can't tell us what kind of package manager is used for a component, we already have the "manager" field for that. The current code leads to weird stuff like:
where we've got a component which reported itself in the lockfile as "conda", is downloaded from the conda forge, and has a conda extension, but that we're reporting as pip. After my change this same dependency looks like this:
It's still supported for the Condalock to have pip components in it, they're just identified by
"manager": "pip".