Skip to content

fetch: download the locked tools in parallel, and skip ones the host provides #2

Closed

Description

@zackees

Every tool is an independent, small archive (see the root manifest.json), so fetch --lock can download them concurrently instead of one after another, each still checked against its sha256 before extraction. A lock entry may also say a tool is optional when the host provides it (e.g. a distro's own Qt or FFmpeg at a suitable version), in which case fetch skips it. Measure the image build before and after.

Activity

  1. added
    P3
    size:M
    on Oct 25, 2026
  2. zackees commented on Oct 25, 2026

    @zackees
    MemberAuthor

    /ready

    Triage: two independent changes with a clear scope: (1) concurrent downloads in fetch --lock, each verified by sha256 before extraction; (2) an optional/host-provided flag in lock entries that fetch skips. Acceptance: the lock resolves to identical extracted trees serially and in parallel, a corrupted download still fails before extraction, a host-provided tool is skipped only when its version meets the lock, and image build times are posted from before and after. The two can be separate PRs. P3, size:M.

  3. zackees commented on Oct 25, 2026

    @zackees
    MemberAuthor

    /ready

  4. added
    ready
    on Oct 25, 2026
  5. zackees commented on Oct 25, 2026

    @zackees
    MemberAuthor

    Claiming: #2 part 1 (concurrent downloads in fetch --lock, each sha256-checked before extraction, with the extracted trees the same as a serial fetch). Part 2 (the optional, host-provided flag) is left open.

  6. zackees commented on Oct 25, 2026

    @zackees
    MemberAuthor

    Correction: dropping my claim. Part 1 already merged in #12 (b918bf3): fetch --lock goes through install_all, which fetches the root manifest once and then downloads, sha256-checks and extracts each pin in a bounded pool (WORKERS = 4). test_downloads_overlap covers it. Left: part 2 (an optional, host-provided entry that fetch skips) and the before/after image-build measurement. Part 2 needs a decision first: how fetch decides that the host provides a tool at a suitable version (a probe per tool, such as pkg-config for Qt or FFmpeg, or a flag the caller passes).

  7. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Claiming: #2 part 2 — an optional / host-provided flag on a lock entry that fetch skips.

    Plan (one PR):

    1. RED: tests/test_fetch.py — parse_lock accepts a "optional": true entry with no sha256/install (and still rejects a missing sha256 without the flag), and obs-studio-libs fetch --lock installs the ordinary pins while never requesting the host-provided one's archive.
    2. GREEN: LockedTool.optional in model.py (strict bool field) + the skip in cli.py's fetch path, with the reasons printed.

    Part 1 (concurrent downloads) already merged in #12.

  8. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Part 2 is up: #19

    An entry with "optional": true pins no bytes/install path and fetch skips it (printing the reason), while an entry without the flag still requires both fields. RED 03cbb10 fails on the unknown field (deps.lock.json.tools[1].sha256: missing); GREEN 61fef3d is pytest 23 passed, ruff check and ruff format --check clean. Both parts of #2 are now covered (part 1 merged in #12).

  9. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Both parts are done, so closing.

    Nothing is left on this issue. Tests: uv run --group dev pytest 23 passed, ruff check / ruff format --check clean. A consumer that wants the flag sets it on its own lock entry (obs-studio's deps.lock.json` is unchanged and unaffected).

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

    P3readysize:M

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions