moby / moby/buildkit

exporter: allow exporting OCI archive per blob

Open
#2,863 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted kind/enhancement
Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 23h
Merged PRs (30d)
48

Description

Currently, we support OCI archive via exporting a tar archive. When doing incremental builds/exports this means that we need to create a big tar file every time, even when most of the blobs didn't change.

We should also support exporter where instead of downloading the full tar, the session API would use the content API https://pkg.go.dev/github.com/moby/buildkit@v0.10.3/session/content and pull in blobs one by one, skipping the ones it already previously had.

A digest is returned with the build metadata. Client will pull in the JSON object matching this digest, parse it and then optionally pull its children. While this is going on the build call itself has not returned and released the references/blobs.

Initially, we should just support it in Go API. Maybe we can provide some cli options for this as well later.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Go API's OCI archive exporter and the session/content API described in the issue. Trace how the build metadata digest and matching JSON object are handled; done means clients can retrieve OCI blobs individually, skip blobs they already have, and keep references available during retrieval.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.