-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Context:
In GetUntaggedManifests there is a code path controlled by the preserveAllOCIManifests flag, which is only used by the annotate command. The current logic makes this flag skip all OCI manifest images from being annotated, but the reason for this is not documented or clear. This means the annotate command will never annotate OCI manifests which may be in error.
Problem:
It is not clear why the annotate command should avoid annotating any OCI manifests at all. The code currently respects this behavior, but the motivation and intended use case are undocumented. This makes it difficult to reason about correctness, future maintenance, or potential improvements.
Questions:
What is the original intent behind skipping all OCI manifests in the annotate command?
Are there scenarios where annotating OCI index or artifact manifests would be valid or desirable?
Is this behavior required for compatibility, or is it a legacy decision?
Action Items:
Investigate the history and rationale for this logic.
Document the intended behavior and reasoning in the code.
If appropriate, consider relaxing or refactoring this restriction to allow annotation of OCI manifests where it makes sense.