Skip to content

comp query fails for upstream-type components with "invalid spec source type: upstream" #19

@reubeno

Description

@reubeno

Issue Description

comp query fails for upstream-type components with "invalid spec source type: upstream"

Description

azldev comp query -p fails for any component using the default upstream spec source type (bare inline entries). It incorrectly rejects upstream as an invalid spec source type.

Repro

# Any bare upstream entry triggers this — not component-specific
azldev comp query -p coreutils

Error

ERR Error: failed to parse spec for component "coreutils":
component "coreutils" has invalid spec source type: upstream

Expected

comp query should resolve the upstream spec (clone from Fedora dist-git) and display spec details, the same way it works for local-spec components like azurelinux-release.

Workaround

Other commands handle upstream components correctly — comp list, comp prep-sources, and comp build all work fine. Only comp query is affected.

Evidence that upstream resolution works elsewhere

# All succeed for the same component:
azldev comp list -a | grep coreutils                       # Shows "Upstream: fedora 43"
azldev comp prep-sources -p coreutils -o "$(mktemp -d)"    # Clones and downloads sources
azldev comp build -p coreutils                              # Builds successfully

Likely Cause

comp query has a separate code path for resolving spec source types that doesn't handle the implicit/default upstream type, while the other subcommands use a shared resolution path that does.

Expected Changes

comp query should function correctly when querying basic components from https://github.com/microsoft/azurelinux/tree/tomls/base/main

--
Imported on behalf of @dmcilvaney

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: source managementPertains to source fetching, downloading, and/or preparing.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions