← Back to issue list

fix: remove base.digest for bare-based rocks

View original Github issue

Metadata

Project
rockcraft
Number
#1131
Type
pull request
State
merged
Author
zhijie-yang
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #1131 (commit b3d29d12) by external contributor zhijie-yang: project.py now only emits base-digest metadata and the OCI org.opencontainers.image.base.digest annotation when base != 'bare'. Shipped in rockcraft 1.17.2.

Resolution: closed resolved

Reason: PR #1131 was approved and merged to main as commit b3d29d12, adding a `if self.base != "bare":` guard around both `metadata["base-digest"]` and `annotations["org.opencontainers.image.base.digest"]` in rockcraft/models/project.py, with a unit test asserting the annotation is absent. The 1.17 release notes confirm the change shipped in version 1.17.2.

Evaluated by: mr-cal-bot

No scores available.

Issue body

According to the [OCI spec](https://github.com/opencontainers/image-spec/blob/v1.1.1/annotations.md#pre-defined-annotation-keys), the key `org.opencontainers.image.base.digest` shouldn't be added to the annotations of a `bare`-based rock, as `bare`-based rocks don't have a valid "base" image. This annotation key is removed from the generated metadata for the `bare`-based rocks. Similarly, the key `base-digest` shouldn't be added to the rock's metadata for `bare`-based rocks either, and is removed in this PR. This PR targets at removing one of the hard blockers from [the PR in Docker official images](https://github.com/docker-library/official-images/pull/20937) --- - [x] I've followed the [contribution guidelines](https://github.com/canonical/rockcraft/blob/main/CONTRIBUTING.md). - [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [x] I've successfully run `make lint && make test`. - [x] I've added or updated any relevant documentation.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #1131 (commit b3d29d12) by external contributor zhijie-yang: project.py now only emits base-digest metadata and the OCI org.opencontainers.image.base.digest annotation when base != 'bare'. Shipped in rockcraft 1.17.2.
stealth/space-bunny-alpha — closed resolved Merged PR removed base.digest and base-digest annotations from bare-based rock metadata, aligning output with the OCI spec and unblocking Docker official-images PR #20937.
qwen/qwen3.6-35b-a3b — — Merged. Removes base.digest and base-digest annotations from bare-based rocks to comply with the OCI specification. Approved by three reviewers and passed CI checks, resolving a hard blocker for the Docker official images project.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Removes base.digest metadata from bare-based rocks to comply with the OCI spec, as they lack a valid base image. This fixes metadata generation and unblocks Docker official images integration.

Update history

No update history recorded yet.

Related work

  • Related To: official-images#20937 (confidence 85%)

    Docker official-images PR cited in the description as a downstream consumer that this change unblocks.

  • Likely Fixed By: canonical/rockcraft#1133 (confidence 60%)

    Commit 1a7cf6b8 is the 'chore(merge): 1.17.2 into main' merge that carried the fix into the release branch.

Related issues

Issue Project State Summary Similarity
#1401 fix: prefix base digest with sha256 in OCI annotation and rock metadata rockcraft open Prefixes base-image digests with sha256: in the OCI annotation and /.rock/metadata.yaml; tests are updated and the PR awaits maintainer review.
78%
#45 fix: missing base information in the .rock metadata file rockcraft closed Fixed in merged PR #46 (commit 24fb822f), adding base and base-digest fields and annotations to .rock metadata.
74%
#46 Issues/45/add base metadata rockcraft merged Merged PR #46 (commit 24fb822f), adding base name and digest to ROCK metadata and recording the digest in labels/annotations; fixes #45.
74%