Convert SOCI indexes on the native build runners
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by tracing publish() stage 1, SociConvertWorkflow, the per-platform build workflow, and clean.yml; inspect the existing build metadata and temporary registry tags. First determine what single-platform soci convert --standalone emits and whether its image manifest digest matches buildx's output. Done means build runners publish reusable SOCI indexes, publish assembles a valid multi-platform index with the required descriptor fields, missing indexes use the existing path, and cleanup removes the new tags.
Written by the indexing model from the issue text.
Description
SOCI conversion is the slowest part of bakery ci publish, so move it onto the per-platform build runners and only assemble the converted indexes at publish time.
Today, stage 1 of publish() runs per target on the single merge runner with 4 workers: create the multi-platform index, pull every layer of both platforms into an OCI layout, run soci convert --standalone --all-platforms, and push the result back to the temp registry. Stage 2 (the ordered copy to Docker Hub and GHCR) cannot start until every target finishes stage 1.
Estimated from the latest scheduled production runs (stage boundaries are not logged yet, so these are approximate):
| Image | Publish | Stage 1 (index + SOCI) | Stage 2 (copy) |
|---|---|---|---|
| workbench (16 targets, 46 GB) | 30 min | ~26 min | ~2.5 min |
| connect (18) | 21 min | ~11.5 min | ~8.5 min |
| package-manager (18) | 7.5 min | ~2.5 min | ~4.75 min |
Published images already contain one SOCI index per platform, each tied only to its own platform's image manifest. Nothing requires converting both platforms together, so each build runner can convert the image it just built, in parallel across the whole build matrix.
What the published layout shows (ghcr.io/posit-dev/connect:latest):
- The platform image manifests are plain image manifests with no SOCI annotations; conversion does not rewrite them.
- Each SOCI index is a separate manifest (config media type
application/vnd.amazon.soci.index.v2+json) whose layers are the per-layer zTOCs. - The two are linked only by annotations on the descriptors in the multi-platform index:
com.amazon.soci.index-digeston the image descriptor, andcom.amazon.soci.image-manifest-digestplusartifactTypeon the SOCI index descriptor. - So a build runner only uploads the SOCI index manifest and its zTOC blobs; the image layers are already in the temp registry.
Proposal:
- Build runner: when the workflow is pushing and SOCI is enabled for the target, convert the per-platform image after the build and push the converted result to the temp registry. Skip it entirely when not pushing.
- Discovery: tag the converted result by its source digest (e.g.
tmp:soci-<source-digest-hex>) so publish can find it without changing the build metadata, and fall back to today's path when it is missing. - Publish: when every platform of a target has a pre-converted index, write the multi-platform index JSON directly from their descriptors (preserving
platform,artifactType, and the SOCI annotations), push it withoras manifest push, and skipSociConvertWorkflow.oras manifest index createis likely to drop those descriptor fields. - First iteration pulls the image from the temp registry on the build runner to reuse the existing workflow. A follow-up can write a local OCI layout instead (a second buildx
type=ocioutput, ordocker savefrom the containerd store) to skip the pull; both should cost seconds per image, so conversion itself is likely the dominant cost. - Log pull/convert/push durations on the build runner so the gain is measurable.
- Interim, no code: run publish on a larger
merge-builderand raise--jobs. This only helps if conversion is bound by CPU, disk, or network on that one runner, so pair it with the duration logging. In progress in #858.
Open questions to answer first:
- What does
soci convert --standaloneemit for a single-platform input: an index wrapping the image and SOCI index, or something else? - Is the platform manifest in the published index byte-identical to the digest buildx pushed?
- Does
clean.ymlremove the newsoci-*tags from the temp repo?
Risks:
- Assembling an index from separately converted children is the riskiest part. #793 showed that a child without
platformbreakssoci convert. - Digest-keyed discovery reuses a stale SOCI index if
socioptions change without the image changing. - Conversion moves onto each build job's critical path; total wall-clock should still drop because it runs across all runners at once.
- Likely supersedes #772, since publish would no longer hold a local converted layout.
Related:
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 25
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/images-shared
-
Add max-parallel input to bakery-build-native.yml to cap matrix build concurrencyPossibly taken A pull request linked to this issue is open or already merged. Opencvp:0 docker tdp:1
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
posit-dev/images-shared#757 · 2 comments ·
Maintainers usually reply within 1 day
-
slack-build-notify: no persisted alert state — causes suppressed repeat-failure and recovery alertsOpenbug cicd cvp:0 docker needs discussion observability tdp:2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
posit-dev/images-shared#677 ·
Maintainers usually reply within 1 day
-
2026.11: 🏗️ Drop Ubuntu 22.04 image builds in favor of Ubuntu 24.04 and 26.04Possibly taken @ianpittwood claimed this 2 days ago. Opencvp:0 docker epic tdp:2
posit-dev/images-shared#861 · 1 assignee ·
Maintainers usually reply within 1 day
-
lualatex fails for non-root users: shared TinyTeX in `/opt/.TinyTeX` has no writable `TEXMFVAR`Possibly taken A pull request linked to this issue is open or already merged. Opencvp:2 docker tdp:1
Difficulty 3/5 1-2 days Newbie friendliness 72/100
posit-dev/images-shared#855 · 3 comments ·
Maintainers usually reply within 1 day
-
cicd docker security
Difficulty 4/5 3-5 days Newbie friendliness 42/100
posit-dev/images-shared#852 ·
Maintainers usually reply within 1 day
All issues in posit-dev/images-shared
Similar issues
-
Context/namespace resources fail in-cluster: "Invalid kube-config file. No configuration found."Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug documentation
Difficulty 1/5 Under an hour Newbie friendliness 88/100
awslabs/visual-asset-management-system#880 ·
Maintainers usually reply within 1 day
-
netbox status: needs owner type: documentation
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
netbox-community/netbox#23533 ·
Maintainers usually reply within 1 day
-
app: scripts status: backlog type: documentation
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
netbox-community/netbox-scripts#68 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
marin-community/marin#10765 ·
Maintainers usually reply within 1 day