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

Function to validate that credential manager will load successfully after ProfilesInfo constructor called #2111

Open
rudyflores opened this issue Apr 4, 2024 · 1 comment
Labels
enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits

Comments

@rudyflores
Copy link

rudyflores commented Apr 4, 2024

Is your feature or enhancement request related to a problem or limitation? Please describe

In Zowe Explorer, we utilize the ProfilesInfo API for loading our default and custom credential managers. Our issue is that when calling the constructor we expect the credential manager to be loaded during initialization, but instead the credential manager is loaded until readProfilesFromDisk is called.

Describe your enhancement idea

For this issue, I would like for the ProfilesInfo API to provide a way to check early whether or not the credential manager will fail when loading, so that way we won't rely on the readProfilesFromDisk function that can be called in multiple locations and can be harder to trace.

Describe alternatives you've considered

My current alternative is to call await profileInfo.readProfilesFromDisk() after the constructor in a try/catch that will catch error and handle accordingly, although not great since it uses the entire part of the readProfilesFromDisk code if successful, it currently is the only way to catch this error early, which is not conventional.

Provide any additional context

Imperative code screenshots:

image

image

image

@rudyflores rudyflores added enhancement New feature or request new The issue wasn't triaged yet labels Apr 4, 2024
Copy link

github-actions bot commented Apr 4, 2024

Thank you for raising this enhancement request.
The community has 90 days to vote on it.
If the enhancement receives at least 5 upvotes, it is added to our development backlog.
If it receives fewer votes, the issue is closed.

@zFernand0 zFernand0 added priority-medium Not functioning - next quarter if capacity permits and removed new The issue wasn't triaged yet labels Apr 8, 2024
@adam-wolfe adam-wolfe mentioned this issue Apr 19, 2024
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits
Projects
Status: Medium Priority
Development

No branches or pull requests

2 participants