Skip to content

Update get_source_type() to report correct source type for new source resolver config #1209

Description

@smoparth

Context

The get_source_type() function classifies where a package's source came from, and this classification is written to build-order.json as "source_url_type" for reporting and auditing.

Parent epic: #936
Parent issue: #1048

Problem

When a package uses a git-clone-based source resolver (e.g. provider: github-tag-git):

req.url is None (it's a normal requirement, not a direct URL)
No plugin exists (that's the point of the new config)
No download_source.url is set
The function returns SourceType.SDIST even though the source was cloned from git. build-order.json will show:

{
"source_url": "git+https://github.com/org/repo@v1.0",
"source_url_type": "sdist"
}
This is misleading for users reviewing build output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions