Skip to content

Activate source field on PackageSettings/VariantInfo and add source_resolver PBI property #1291

Description

@smoparth

Context

The new SourceResolver data model is complete in _resolver.py (PRs #1228, #1235), but the source field is still commented out on PackageSettings and VariantInfo in _models.py, and PackageBuildInfo has no source_resolver property. This is the foundation that all other wiring work depends on.

Parent epic: #1254 (Phase 1 — critical path, blocks all other phases)

Problem

The new resolver config cannot be used at runtime because the source field isn't active on the settings models and there's no way to access it through PackageBuildInfo.

Acceptance criteria

  • source: SourceResolver | None field is active on both PackageSettings and VariantInfo
  • SourceResolver is importable from fromager.packagesettings
  • PackageBuildInfo has a source_resolver property that returns variant-level source if set, else package-level source, else None
  • Loading YAML with source: config produces the correct SourceResolver instance
  • pbi.source_resolver returns None when no source: is configured (legacy config unchanged)
  • All existing tests pass (no legacy behavior change)

Files

  • src/fromager/packagesettings/_models.py
  • src/fromager/packagesettings/_pbi.py
  • src/fromager/packagesettings/__init__.py

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions