Skip to content

Commit

Permalink
builder-next: fix cdi manager
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
  • Loading branch information
crazy-max authored and vvoland committed Feb 18, 2025
1 parent cde9f07 commit 1fde8c4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions builder/builder-next/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,7 @@ func getCDIManager(specDirs []string) (*cdidevices.Manager, error) {
return nil, nil
}
cdiCache, err := func() (*cdi.Cache, error) {
cdiCache, err := cdi.NewCache(
cdi.WithSpecDirs(specDirs...),
cdi.WithAutoRefresh(false),
)
cdiCache, err := cdi.NewCache(cdi.WithSpecDirs(specDirs...))
if err != nil {
return nil, err
}
Expand All @@ -564,5 +561,6 @@ func getCDIManager(specDirs []string) (*cdidevices.Manager, error) {
if err != nil {
return nil, errors.Wrapf(err, "CDI registry initialization failure")
}
return cdidevices.NewManager(cdiCache), nil
// TODO: add support for auto-allowed devices from config
return cdidevices.NewManager(cdiCache, nil), nil
}

0 comments on commit 1fde8c4

Please sign in to comment.