Skip to content

Conversation

nalind
Copy link
Member

@nalind nalind commented Aug 6, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add (some) annotation levels, where if an annotation name specified to either --annotation or --unsetannotation has a prefix of "manifest", "manifest-descriptor", or "index" (or a comma-separated list of any of them) followed by a colon, we take the annotation name as the part after the colon separator and add (or remove) the annotation from the image manifest (as before), or the image's entry in an image index that we're building (if we're building one), or the image index that we're building (if we're building one).

How to verify it

New integration tests!

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

docker build also recognizes "index-descriptor", so if we ever get an API for setting it in the top-level index.json when committing directly to an "oci:" or "oci-archive:", we'll want to handle that, too, but that's not available as of now.

Does this PR introduce a user-facing change?

The `buildah build` and `buildah commit` `--annotation` and `--unsetannotation` flags now accept and discard "manifest:" as a prefix.
The `buildah build` command's  `--annotation` flag, when `--manifest` is used, now accepts "manifest-descriptor:" and "index:" prefixes indicating that annotations should be added to entries added to the image index or to the image index itself, rather than to the built image.

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress kind/feature Categorizes issue or PR as related to a new feature. labels Aug 6, 2025
Copy link
Contributor

openshift-ci bot commented Aug 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nalind

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Aug 6, 2025
@nalind nalind force-pushed the annotation-levels branch 3 times, most recently from a561201 to c194158 Compare August 6, 2025 21:25
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 9, 2025
Add (some) annotation levels, where if an annotation name specified to
either --annotation or --unsetannotation has a prefix of "manifest",
"manifest-descriptor", or "index" (or a comma-separated list of any of
them) followed by a colon, we take the annotation name as the part after
the colon separator and add (or remove) the annotation from the image
manifest (as before), or the image's entry in an image index that we're
building (if we're building one), or the image index that we're building
(if we're building one).

`docker build` also recognizes "index-descriptor", so if we ever get an
API for setting it in the top-level index.json when committing directly
to an "oci:" or "oci-archive:", we'll want to handle that, too, but
that's not available as of now.

Signed-off-by: Nalin Dahyabhai <[email protected]>
@nalind nalind force-pushed the annotation-levels branch from c194158 to 3a68c73 Compare August 12, 2025 13:52
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Aug 12, 2025
@openshift-merge-robot
Copy link
Collaborator

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

A friendly reminder that this PR had no activity for 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved do-not-merge/work-in-progress kind/feature Categorizes issue or PR as related to a new feature. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. stale-pr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants