Skip to content

Conversation

@elezar
Copy link
Member

@elezar elezar commented Oct 31, 2024

As implemented GFD will not fail if no resources are detected -- even if fail-on-init-error is set. This change ensures that fail-on-init-error is honored if no resources are detected.

manager := resource.NewManager(infolib, nvmllib, devicelib, config)
manager, err := resource.NewManager(infolib, nvmllib, devicelib, config)
if err != nil {
return err
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return err
return fmt.Errorf("error instantiating resource manager: %w", err)

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.

@elezar elezar force-pushed the main-fix-fail-on-init-error branch from 32dd969 to 6efde2f Compare November 26, 2024 13:08
As implemented GFD will not fail if no resources are detected -- even
if fail-on-init-error is set. This change ensures that fail-on-init-error
is honored if no resources are detected.

Signed-off-by: Evan Lezar <[email protected]>
@elezar elezar force-pushed the main-fix-fail-on-init-error branch from 6efde2f to e1f1504 Compare November 28, 2024 13:09
@elezar elezar merged commit a82acf0 into NVIDIA:main Nov 29, 2024
8 checks passed
@elezar elezar deleted the main-fix-fail-on-init-error branch November 29, 2024 10:53
@elezar elezar restored the main-fix-fail-on-init-error branch November 29, 2024 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants