proposal: publish build history bundle and verification summary
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 30/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- docker, github-actions, go, typescript
- Domaine
- backend-api-design, devops, security
Piste de recherche
Start with the build and bake workflows, especially their result and finalization steps, then read the referenced Buildx history bundle writer and docker/actions-toolkit history and summary helpers. The proposal spans workflow changes, offline bundle merging, artifact handling, signing evidence and shared report rendering; first identify a bounded milestone, such as testing whether exports from two builders can be merged and imported into Docker Desktop. Done means a combined .dockerbuild retains independently inspectable records and the report reflects missing or failed legs.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
A distributed build should leave the caller with one summary on the workflow run page and one downloadable .dockerbuild containing the records from all participating builders. If a caller invokes build.yml and bake.yml separately in the same run, each invocation should have its own summary and download.
This addresses two existing requests. https://github.com/docker/github-builder/issues/347 asks for the build records that regular Docker actions already produce. https://github.com/docker/github-builder/issues/11 asks for a summary that explains how to verify signed outputs. https://github.com/docker/github-builder/pull/315 added a switch for the underlying action summaries, and https://github.com/docker/github-builder/pull/319 removed it after distributed builds produced a separate summary for every matrix job. The nested actions should keep DOCKER_BUILD_SUMMARY=false. GitHub Builder has the information needed to report the result of the whole invocation.
What callers should see
For an image build, lead with the published image names, tags and immutable index digests. Under each image, show which attestation manifests the builder signed and verified, their digests, the signing workflow identity, and a copyable Cosign verification command. A reader should be able to tell which digest to deploy and which digest the signature covers. Those can be different digests.
For a local build, lead with the downloadable output artifact when one was uploaded. Show the signed provenance statement, the subject filenames and digests it covers, and the relative path to the Sigstore bundle. Include the commands to run after extracting the artifact. Label the GitHub artifact digest separately from the subject digests. If signing ran with upload disabled, say that the files were verified on the runner and omit the download instructions.
Below the output and verification details, show the build records. Each row should identify the target, platform or platforms, solve status, duration and cached/total steps. A distributed two-platform build normally has two rows. A single solve that built two platforms has one row covering both. Bake can contribute multiple target records from the same runner. A linked target can have a build record even when only the root target's output was published or signed.
Include one link to the combined .dockerbuild, its size and its record count. If a leg failed, show which leg failed and whether its record is available. Keep the overview readable and put verification commands in expandable details. This preserves the useful parts of the regular Docker build summary while giving publication and verification the space they need.
Capture each record while its builder is alive
Both regular actions resolve build refs during their main step, retain them in action state, then export history, optionally upload the file and render the summary in post. Build Push handles one ref. Bake passes all refs from that invocation to the exporter. Both have a builder- and time-scoped fallback when the metadata file lacks refs. Build Push implementation, Bake implementation.
GitHub Builder should capture history immediately after the nested build action, before that runner's BuildKit is torn down. Read buildx.build.ref from the action's metadata, preserving the target-to-ref mapping for Bake. Inspect the refs for the summary and export them together on the builder that produced them. Use explicit refs so an unrelated build on the same runner cannot enter the report. When metadata is missing on failure, prefer exposing the refs the nested action already resolved as an action output. Until those refs are available, report the failed leg with its record marked unavailable.
Reuse History.inspect and History.export from docker/actions-toolkit, which already supplies @docker/github-builder-runtime. The exporter selects the builder and node from the first ref and assumes the other refs belong there. Handing refs from several runners to a fresh finalize job therefore cannot recover the builds. The helper already handles the Buildx version differences: export requires Buildx 0.23 or later, and it uses --finalize from 0.24 so client traces can finish before capture. When only the summary is enabled, use inspect without exporting or staging record bytes. Toolkit history implementation, Buildx history export.
Merge exported files into one native .dockerbuild
The first implementation milestone should prove that two independent builders' exports can be combined offline and imported into Docker Desktop. Buildx already defines the desired output. A single-record export uses a history manifest. A multi-record export builds an OCI index, adds a vnd.buildkit.history.reference annotation to each record descriptor, and writes the content graph as a gzip-compressed OCI archive. This gives us a reference implementation and a native multi-record export to compare against. Buildx bundle writer.
I propose implementing offline merge in Buildx, alongside the bundle writer. It would take exported files as input, preserve the existing record manifests and referenced blobs, and produce the same index structure as a native multi-record export. It needs to handle both single-record inputs and inputs that already contain several records, as Bake can produce. Preserve ref annotations and recover the ref from the record for single-manifest inputs. Deduplicate identical content by digest, reject conflicting records with the same ref, and detect corrupt or missing content. A lone input can pass through unchanged. The goal is one file containing independently inspectable histories. Timings, logs and cache statistics still belong to their original solves.
Two existing commands are worth ruling out here. actions/upload-artifact/merge can put several files in one Actions artifact, but opening that download would still leave the user with several .dockerbuild files. docker buildx history import sends a bundle to Docker Desktop. It does not populate a fresh BuildKit daemon on a hosted Linux runner for a subsequent export. An offline merger also avoids keeping matrix runners alive or making their BuildKit endpoints reachable across jobs. Buildx history import.
Move records between jobs without changing release artifacts
Generate an invocation ID in prepare. Give each temporary history artifact a name containing that ID, matrix slot and run attempt. Upload the fragment while the runner still owns it, then include its artifact ID and a bounded summary in the existing result_N JSON for that leg. Both workflows currently parse every value in needs.build.outputs as JSON during finalization. Adding a separate scalar output there could break image publication. The result step also needs an explicit failure path because today it is skipped when an earlier step fails. Build workflow, Bake workflow.
Collect history fragments by artifact ID. The local-output merge currently matches ${{ inputs.artifact-name }}* and deletes the matches. A short caller-supplied prefix could select a history fragment or another invocation's artifact. Give temporary payload shards their own invocation-specific internal prefix as well, and restrict the payload merge to that prefix. Keep the caller's chosen name for the final release artifact. Its digest must continue to describe only the release payload. Current payload merge.
Use a reporting job that depends on prepare, the build matrix and finalize, and can run when a matrix leg fails or finalization is skipped. Compare the expected legs with the received records. Publish an explicitly partial report when some are missing. Keep reporting outside the signing and publishing path, with no registry credentials or signing permissions. A missing record, failed upload or unsupported exporter should produce a warning and preserve the original build conclusion.
Partial reruns need an explicit retention rule. If one leg succeeds and another fails, deleting the successful leg's fragment after writing the partial report would make it unavailable to “re-run failed jobs.” Keep fragments through partial collection, give them short retention, and qualify the final download by attempt so the next upload can succeed. Check cross-attempt retrieval on GitHub Actions before relying on it. If an older fragment has expired, identify the missing leg in the new report.
Report signing evidence from the steps that verified it
The existing signed output comes from the signing policy resolved in prepare. The summary should derive its claims from the results of the runtime's verification calls. For example, local signing can skip a provenance statement with no subjects. The summary should distinguish signing disabled, verified subjects, no subjects found, and verification failed. For image output, retain results per image name and attestation manifest. For Bake, associate that evidence with the root output that was actually signed.
Capture a small structured result at verification time: immutable subject reference or filename and digest, verification bundle or attestation manifest, issuer, identity constraint, Cosign version and verification arguments. Include the transparency-log entry when the signing result provides one. Reuse those arguments to render the same verification the workflow performed. Quote paths and regexes for the shell in the displayed command, and preserve the command contract consumed by verify.yml. Mention registry authentication for private images and the extraction directory for local files. Image signing, local signing, verification workflow.
Put the Builder-specific renderer in docker/actions-toolkit so Build and Bake share it. The existing renderer expects a single export result with one builder context. Reuse its summary fields and the existing GitHubArtifact.upload helper, which uploads a standalone file with skipArchive: true and returns its download URL. Escape build-derived text, avoid dumping build arguments or raw logs onto the run page, and bound the output to GitHub's 1 MiB per-step summary limit. Toolkit summary renderer, toolkit artifact uploader, GitHub job summaries.
Defaults and rollout
Enable both build-summary and build-record-upload by default, matching the regular Docker actions. With both enabled, each GitHub Builder invocation produces one summary and one combined .dockerbuild download. Setting build-summary: false disables both, regardless of build-record-upload. Setting only build-record-upload: false keeps the summary and skips staging and uploading history files. The existing artifact-upload input controls the local release payload independently.
Call out the new default in the release notes. Build records can include logs and build parameters. Document who can download them, how long they are retained, and how to disable record upload while keeping the summary. Include an example showing how callers that currently download all artifacts can select just their release payload.
Before enabling record upload, import a combined .dockerbuild into Docker Desktop using exports from two independent BuildKit instances. Include a Bake export that already contains multiple refs. Compare each imported record with its original export and check its name, logs, timings, cache information and attachments. Work on the summary and signing details can proceed independently of this test.
Exercise both reusable workflows with a single runner, distributed builds, linked Bake targets, signed and unsigned outputs, and publishing disabled. Test all four combinations of the two inputs, including build-summary: false with build-record-upload: true, which should produce neither a summary nor a history download. Cover failed solves with and without recoverable refs, fail-fast cancellation, partial reruns, and two Builder invocations in the same caller run. With default inputs, check that each successful invocation produces one summary and one importable history download, that the local release payload contains only its intended files, and that the displayed verification commands work against the exact manifests or extracted files named in the summary.
- Langage dominant
- Aucune donnée de langage
- Étoiles
- 94
- Forks
- 28
- Merge moyen
- 2 j 7 h
- PR mergées (30 j)
- 20
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de docker/github-builder
-
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
docker/github-builder#351 ·
Les mainteneurs répondent en général sous 1 jour
-
Generate `dockerbuild` FilesOuvertekind/enhancement status/triage
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
docker/github-builder#347 ·
Les mainteneurs répondent en général sous 1 jour
-
kind/enhancement status/triage
Difficulté 3/5 1-2 jours Accessibilité débutants 57/100
docker/github-builder#343 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
status/needs-investigation
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
docker/github-builder#328 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
kind/enhancement status/triage
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
docker/github-builder#203 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de docker/github-builder
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 65/100
facebookexperimental/reverie#193 ·
-
verified whatsapp
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
Les mainteneurs répondent en général sous 6 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
ClickHouse/clickhouse-connect#1266 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
focusreactive/payload-plugins#279 ·
Les mainteneurs répondent en général sous 1 jour