-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix panic in manifest annotate --index
#24776
Fix panic in manifest annotate --index
#24776
Conversation
test/e2e/manifest_test.go
Outdated
Expect(session.OutputToString()).To(ContainSubstring(`"hello": "world,withcomma"`)) | ||
Expect(session.OutputToString()).To(ContainSubstring(`"left": "right"`)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't both annotation are set on different levels? I feel like such a test must make sure they are set in the correct places not just that they exists anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they are. Reworked the comparison logic.
03eea16
to
45a4edf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, test looks really good with that but one nit where we should resuse the digest var to avoid duplicating that
test/e2e/manifest_test.go
Outdated
{ | ||
// from imageListInstance | ||
MediaType: manifest.DockerV2Schema2MediaType, | ||
Digest: digest.Digest("sha256:1385ce282f3a959d0d6baf45636efe686c1e14c3e7240eb31907436f7bc531fa"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to not duplicate this needs to use imageListARM64InstanceDigest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to parse it from the name that we use when adding it to the index.
45a4edf
to
a28d167
Compare
Looks like --index doesn't work with podman-remote at all. At least tests seem failing and I cannot see any use of opts.IndexAnnotations in the remote client bindings. |
a44a559
to
f1204b7
Compare
When the --index flag is used, `manifest annotate` shouldn't be expecting a second non-flag argument. Signed-off-by: Nalin Dahyabhai <[email protected]>
Add the connective logic so that annotating the manifest as a whole will succeed as intended, and we don't mix up annotations for an entry and annotations which are meant for the manifest as a whole. Make consistent the names which are used when encoding values of certain fields. Signed-off-by: Nalin Dahyabhai <[email protected]>
fcbeb1e
to
0a48856
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, nalind, rhatdan 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 |
When the --index flag is used,
manifest annotate
shouldn't be expecting a second non-flag argument.Fixes #24750.
Does this PR introduce a user-facing change?