Skip to content

taskgraph load-task should cache docker images #788

Open

Description

@matt-boris

Currently, if you run, say taskgraph load-task Ww-q-IvVTfed8xepUhNWaw twice, you'll see:

2025-09-26 15:54:49,487 - INFO - Downloading from https://community-tc.services.mozilla.com/api/queue/v1/task/MUvi2npBRue4VmksTmsdEw/artifacts/public/image.tar.zst
Loaded image: ci:latest

each time in the logs. It would be useful to cache this downloaded image, as some of these images are large and this takes up a good portion of the time when running load-task.

Subsequent runs would be much faster and help the local debugging/development process.

Activity

  1. changed the title [-]`taskgraph load-task` should cache downloaded artifact images[/-] [+]`taskgraph load-task` should cache docker images[/+] on Dec 22, 2025
  2. matt-boris commented on Dec 22, 2025

    @matt-boris
    ContributorAuthor

    Another instance would be making changes to an in-tree Dockerfile and testing against multiple different taskIDs. Each run of taskgraph load-task --image <in-tree image name> <taskID> rebuilds the same image.

  3. ahal commented on Dec 22, 2025

    @ahal
    Contributor

    Implementation note:

    We probably need to extract the digest hashes that Taskgraph computes as part of the cached_task transforms. Then upon building the image, we apply a tag containing this hash to the image in the local registry. On subsequent calls to build_image, we then check whether an image with the same digest tag exists and return that if so.

    We'll probably also want to add a --force flag to force a rebuild even if there's a locally cached option.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions