Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.FilterForCompatible doesnt propagate metadata or errors #330

Open
jacobweinstock opened this issue May 5, 2023 · 1 comment
Open

.FilterForCompatible doesnt propagate metadata or errors #330

jacobweinstock opened this issue May 5, 2023 · 1 comment

Comments

@jacobweinstock
Copy link
Member

If a user or password is incorrect .FilterForCompatible will remove all providers and there is no way to get any error messages or even metadata. This is an example output when i use an incorrect password and call cl.FilterForCompatible(ctx):

/home/tink/repos/bmc/bmclib/client_test.go:26: metadata: {SuccessfulProvider: ProvidersAttempted:[] SuccessfulOpenConns:[] SuccessfulCloseConns:[]}
/home/tink/repos/bmc/bmclib/client_test.go:30: 1 error occurred:
        * no Opener implementations found

This might certainly be an issue to resolve in https://github.com/jacobweinstock/registrar/.

@joelrebel
Copy link
Member

@jacobweinstock is it still worth keeping the FilterForCompatible() method around? Since you've added methods to filter on 'compatible' providers and drivers, and also that Open() will fail if the device is not compatible, this method seems redundant.

In practice using FilterForCompatible() ends up taking up twice the amount of time to connect to a BMC, instead of just using Open(). The compatibility check could instead be made part of Open() - where required, if the device needs to be filtered by model or other attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants