Skip to content

Support efficient manifest packing with tagging #947

@Wwwsylvia

Description

@Wwwsylvia

Packing, pushing, and tagging a manifest using the current approach like the following is not efficient enough.
When the push target is a remote repository, the Push() call inside PackManifest generates one request and repo.Tag() generates another.

desc, err := oras.PackManifest(ctx, repo, oras.PackManifestVersion1_1, artifactType, packOpts)
if err != nil {
	panic(err)
}
tag := "quickstart"
err = repo.Tag(ctx, desc, tag)
if err != nil {
	panic(err)
}
fmt.Println("Pushed and tagged manifest")

To improve performance, we should provide a more efficient way for packing manifests with tagging that can combine Push() and Tag() into a single call for remote repositories.

Original PR comment: #939 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions