@@ -25,6 +25,7 @@ import (
2525 "go.podman.io/common/libnetwork/pasta"
2626 "go.podman.io/common/libnetwork/slirp4netns"
2727 "go.podman.io/common/pkg/libartifact/store"
28+ libartTypes "go.podman.io/common/pkg/libartifact/types"
2829 "tags.cncf.io/container-device-interface/pkg/parser"
2930)
3031
@@ -234,7 +235,7 @@ func MakeContainer(ctx context.Context, rt *libpod.Runtime, s *specgen.SpecGener
234235 command := makeCommand (s , imageData )
235236
236237 infraVol := len (compatibleOptions .Mounts ) > 0 || len (compatibleOptions .Volumes ) > 0 || len (compatibleOptions .ImageVolumes ) > 0 || len (compatibleOptions .OverlayVolumes ) > 0
237- opts , err := createContainerOptions (rt , s , pod , finalVolumes , finalOverlays , imageData , command , infraVol , * compatibleOptions )
238+ opts , err := createContainerOptions (ctx , rt , s , pod , finalVolumes , finalOverlays , imageData , command , infraVol , * compatibleOptions )
238239 if err != nil {
239240 return nil , nil , nil , err
240241 }
@@ -352,7 +353,7 @@ func isCDIDevice(device string) bool {
352353 return parser .IsQualifiedName (device )
353354}
354355
355- func createContainerOptions (rt * libpod.Runtime , s * specgen.SpecGenerator , pod * libpod.Pod , volumes []* specgen.NamedVolume , overlays []* specgen.OverlayVolume , imageData * libimage.ImageData , command []string , infraVolumes bool , compatibleOptions libpod.InfraInherit ) ([]libpod.CtrCreateOption , error ) {
356+ func createContainerOptions (ctx context. Context , rt * libpod.Runtime , s * specgen.SpecGenerator , pod * libpod.Pod , volumes []* specgen.NamedVolume , overlays []* specgen.OverlayVolume , imageData * libimage.ImageData , command []string , infraVolumes bool , compatibleOptions libpod.InfraInherit ) ([]libpod.CtrCreateOption , error ) {
356357 var options []libpod.CtrCreateOption
357358 var err error
358359
@@ -512,7 +513,7 @@ func createContainerOptions(rt *libpod.Runtime, s *specgen.SpecGenerator, pod *l
512513 if len (s .ArtifactVolumes ) != 0 {
513514 // Validate artifacts exist before creating the container
514515 if err := validateArtifactVolumes (ctx , rt , s .ArtifactVolumes ); err != nil {
515- return nil , nil , nil , err
516+ return nil , err
516517 }
517518
518519 vols := make ([]* libpod.ContainerArtifactVolume , 0 , len (s .ArtifactVolumes ))
@@ -777,15 +778,15 @@ func validateArtifactVolumes(ctx context.Context, rt *libpod.Runtime, artifactVo
777778 for _ , artifactMount := range artifactVolumes {
778779 // Use the same artifact store resolution logic as at start time
779780 // to ensure consistent validation behavior
780- asr , err := artStore .NewArtifactStorageReference (artifactMount .Source )
781+ asr , err := store .NewArtifactStorageReference (artifactMount .Source )
781782 if err != nil {
782783 return fmt .Errorf ("invalid artifact reference %q: %w" , artifactMount .Source , err )
783784 }
784785
785786 // Validate artifact exists using the same logic as container start.
786787 // This ensures consistent behavior between creation and start time.
787- _ /*paths*/ , err = artStore .BlobMountPaths (ctx , asr , & store .BlobMountPathOptions {
788- FilterBlobOptions : store .FilterBlobOptions {
788+ _ /*paths*/ , err = artStore .BlobMountPaths (ctx , asr , & libartTypes .BlobMountPathOptions {
789+ FilterBlobOptions : libartTypes .FilterBlobOptions {
789790 Title : artifactMount .Title ,
790791 Digest : artifactMount .Digest ,
791792 },
0 commit comments