Skip to content

Validate source providers when build-parallel replays graph.json #1436

Open

Description

@smoparth

Summary

Record each package's source provider in graph.json and reject a graph when build-parallel would replay its saved download URL with a different provider.

Context

PR #1433 adds provider consistency checks for build-sequence and download-sequence, which read build-order.json. build-parallel instead reads graph.json.

Graph nodes save a download URL but not the provider that selected it. When build-parallel runs with different package settings, it can pass that saved URL to the currently selected provider without detecting the mismatch.

Relevant code: src/fromager/dependency_graph.py, src/fromager/bootstrapper/_bootstrapper.py, and src/fromager/commands/build.py.

Acceptance Criteria

Bootstrap records the effective source provider for each package node in graph.json, including prebuilt entries.

build-parallel checks every package node against current settings before starting any package builds. The synthetic root node is excluded.

A mismatch reports the package, recorded provider, and current provider, and tells the user to use matching settings or regenerate the graph.

Graphs without a recorded provider remain usable with legacy settings that select no provider; they fail when current settings select a provider.

Tests cover matching providers, mismatches for source and prebuilt nodes, and older graphs without the field.

The documented graph.json format describes the field and compatibility behavior

Activity

  1. changed the title [-][Bug] Validate source providers when build-parallel replays graph.json[/-] [+]Validate source providers when build-parallel replays graph.json[/+] on Nov 2, 2026
  2. LalatenduMohanty commented on Nov 3, 2026

    @LalatenduMohanty
    Member

    Another reason to record source_provider in graph.json.

    bootstrap --previous-bootstrap-file reuses download URLs from the old graph, including for source: packages. If a package's provider changed since then, the old URL is given to the new provider without any check.

    Here, bootstrap should probably ignore the old URL and resolve again instead of failing.

    Found while looking at #1414 (comment). Not a blocker for #1414.

  3. LalatenduMohanty commented on Nov 5, 2026

    @LalatenduMohanty
    Member

    This need a proposal as this is a design change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions