builder-next: fix cdi manager · moby/moby@1fde8c4

Original file line numberDiff line numberDiff line change

@@ -549,10 +549,7 @@ func getCDIManager(specDirs []string) (*cdidevices.Manager, error) {

549549

return nil, nil

550550

}

551551

cdiCache, err := func() (*cdi.Cache, error) {

552-

cdiCache, err := cdi.NewCache(

553-

cdi.WithSpecDirs(specDirs...),

554-

cdi.WithAutoRefresh(false),

555-

)

552+

cdiCache, err := cdi.NewCache(cdi.WithSpecDirs(specDirs...))

556553

if err != nil {

557554

return nil, err

558555

}

@@ -564,5 +561,6 @@ func getCDIManager(specDirs []string) (*cdidevices.Manager, error) {

564561

if err != nil {

565562

return nil, errors.Wrapf(err, "CDI registry initialization failure")

566563

}

567-

return cdidevices.NewManager(cdiCache), nil

564+

// TODO: add support for auto-allowed devices from config

565+

return cdidevices.NewManager(cdiCache, nil), nil

568566

}