Skip to content

Commit

Permalink
Merge pull request #22731 from nalind/defined-constant
Browse files Browse the repository at this point in the history
Use a defined constant instead of a hard-coded magic value
  • Loading branch information
openshift-merge-bot[bot] authored May 17, 2024
2 parents 349ef31 + 8afa06e commit 77db54a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/machine/ocipull/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ func GetDiskArtifactReference(ctx context.Context, imgSrc types.ImageSource, opt
// podman-machine-images should have a original file name
// stored in the annotations under org.opencontainers.image.title
// i.e. fedora-coreos-39.20240128.2.2-qemu.x86_64.qcow2.xz
originalFileName, ok := v1MannyFest.Layers[0].Annotations["org.opencontainers.image.title"]
originalFileName, ok := v1MannyFest.Layers[0].Annotations[specV1.AnnotationTitle]
if !ok {
return "", fmt.Errorf("unable to determine original artifact name: missing required annotation 'org.opencontainers.image.title'")
return "", fmt.Errorf("unable to determine original artifact name: missing required annotation '%s'", specV1.AnnotationTitle)
}
logrus.Debugf("original artifact file name: %s", originalFileName)
return artifactDigest, err
Expand Down

1 comment on commit 77db54a

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

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

podman-next COPR build failed. @containers/packit-build please check.

Please sign in to comment.