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

Don't require extenders to call registerCustomProfilesType #2868

Open
t1m0thyj opened this issue Apr 22, 2024 · 2 comments
Open

Don't require extenders to call registerCustomProfilesType #2868

t1m0thyj opened this issue Apr 22, 2024 · 2 comments
Labels
enhancement New feature or request priority-low Legit issue but cosmetic or nice-to-have V4

Comments

@t1m0thyj
Copy link
Member

I believe the second block of code you posted would be the right approach with the current state of the ProfilesCache. In initForZowe we do a refresh of the profiles cache, and during that refresh, we get all the types using ProfilesCache.getAllProfileTypes. If you do not call registerCustomProfilesType beforehand, it will not consider that type unless it has already been registered under one of the APIs (MVS, USS, or JES).

That was my assumption too since it makes total sense to have an external profile type registered before the attempt of refreshing the cache. I think, before that extra reloadProfiles() call was actually protecting us from the problems by refreshing one more time, when all the parameters are actually set.

Ideally, I'd like to register those custom types as a part of the logic in initForZowe so that extenders don't have to call registerCustomProfilesType - rather, we can do it ourselves during initialization if the type doesn't already exist. I don't think this would be breaking since allExternalTypes is already a set, so continuing to call the registerCustomProfilesType function from an extender's perspective shouldn't affect anything.

Those were my thoughts exactly! Moreover, if the order of those calls is crucial to make it work right, I would expect it to be called internally by initForZowe() and at the right time to avoid making a mistake as the extender.

Originally posted by @roman-kupriyanov in #2838 (comment)

@t1m0thyj t1m0thyj added enhancement New feature or request v3 labels Apr 22, 2024
Copy link

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

@roman-kupriyanov
Copy link
Contributor

Thanks @t1m0thyj for the follow up 🙏 It would be nice to have the ZE API init process even more simplified and less error prone for the extenders 👍

@JTonda JTonda added V4 priority-low Legit issue but cosmetic or nice-to-have and removed v3 labels May 30, 2024
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-low Legit issue but cosmetic or nice-to-have V4
Projects
Status: Low Priority
Development

No branches or pull requests

3 participants