Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote: fix manifest add --annotation #15988

Merged

Conversation

sstosh
Copy link
Contributor

@sstosh sstosh commented Sep 29, 2022

  • manifest add --annotation option adds annotations field on remote environment.
  • manifest inspect prints annotations field on remote environment.

Fixes: #15952

Signed-off-by: Toshiki Sonoda [email protected]

Does this PR introduce a user-facing change?

Now manifest add --annotation option adds annotations field and
manifest inspect prints annotations field on remote environment.

@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label Sep 29, 2022
* `manifest add --annotation option` adds annotations
  field on remote environment.
* `manifest inspect` prints annotations field
  on remote environment.

Fixes: containers#15952

Signed-off-by: Toshiki Sonoda <[email protected]>
@sstosh sstosh force-pushed the manifest-annotate-remote branch from 7250433 to 32f54a8 Compare September 29, 2022 09:14
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
@Luap99 PTAL

@rhatdan
Copy link
Member

rhatdan commented Sep 29, 2022

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 29, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 29, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan, sstosh

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 Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 29, 2022
@openshift-merge-robot openshift-merge-robot merged commit f52fede into containers:main Sep 29, 2022
@sstosh sstosh deleted the manifest-annotate-remote branch September 29, 2022 11:34
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry but we cannot break external bindings users

@@ -71,7 +71,7 @@ func Exists(ctx context.Context, name string, options *ExistsOptions) (bool, err
}

// Inspect returns a manifest list for a given name.
func Inspect(ctx context.Context, name string, _ *InspectOptions) (*manifest.Schema2List, error) {
func Inspect(ctx context.Context, name string, _ *InspectOptions) (*libimage.ManifestListData, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry but we have to revert this, we cannot allow any breaking changes in pkg/bindings since this is supported for external uses as well

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for not catching that during the review, @sstosh.

What we probably need to do is to create a new function (and new option type). func InspectListData for instance.

@@ -22,7 +22,7 @@ type ExistsOptions struct {
// AddOptions are optional options for adding manifest lists
type AddOptions struct {
All *bool
Annotation map[string]string
Annotation []string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could keep the map and translate it to a slice if needed.

Images []string // Images is an optional list of images to add/remove to/from manifest list depending on operation
OS *string // OS overrides the operating system for the image
All *bool // All when true, operate on all images in a manifest list that may be included in Images
Annotations []string // Annotations to add to manifest list
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking change

@Luap99
Copy link
Member

Luap99 commented Sep 29, 2022

#15992 to revert it for now, if you want to fix again please make sure to not change any public API in pkg/bindings.

@sstosh
Copy link
Contributor Author

sstosh commented Sep 30, 2022

Thank you for your review.
I'll reopen the issue and fix it.

@sstosh sstosh restored the manifest-annotate-remote branch September 30, 2022 00:21
@sstosh sstosh deleted the manifest-annotate-remote branch November 16, 2022 08:38
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/api-change Change to remote API; merits scrutiny lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remote: manifest add --annotation failed to add annotations field
5 participants