Azure / Azure/acr-cli

Unclear Rationale for Skipping All OCI Manifests in Annotate Command

Open
#468 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
70
Forks
52
Avg merge
3d 2h
Merged PRs (30d)
12

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.