You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tested #144 with the sample config and profiles that we've been using. For the my_zosmf profile it is failing to load user and password:
Python SDK: {'host': 'example.com', 'rejectUnauthorized': True, 'port': 443}
Node.js SDK: {"port":443,"host":"example.com","rejectUnauthorized":true,"user":"admin","password":"password"}
The ProfileManager.load method loops through config files in the following order:
Project User Config (./zowe.config.user.json)
Project Config (./zowe.config.json)
Global User Config (~/zowe.config.user.json)
Global Config (~/zowe.config.json)
In the current implementation, profile properties are first loaded from each layer of the config individually, and merged together afterwards.
For the case of our sample config:
The user and password properties are stored in the my_base profile of Project User Config (./zowe.config.user.json).
This my_base profile is defined as the default base profile in Project Config (./zowe.config.json).
At the time when we load Project User Config, we do not yet know that my_base is the default base profile, so the current logic will skip loading its properties. 😢
To fix this, I believe refactoring ProfileManager.load will be necessary. We should first merge all the config layers together, and then load profile properties as a single operation from the resulting merged object.
For a detailed explanation of how config layers should be merged together, see Zowe docs.
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.
Tested #144 with the sample config and profiles that we've been using. For the
my_zosmf
profile it is failing to load user and password:Python SDK:
{'host': 'example.com', 'rejectUnauthorized': True, 'port': 443}
Node.js SDK:
{"port":443,"host":"example.com","rejectUnauthorized":true,"user":"admin","password":"password"}
The
ProfileManager.load
method loops through config files in the following order:./zowe.config.user.json
)./zowe.config.json
)~/zowe.config.user.json
)~/zowe.config.json
)In the current implementation, profile properties are first loaded from each layer of the config individually, and merged together afterwards.
For the case of our sample config:
user
andpassword
properties are stored in themy_base
profile of Project User Config (./zowe.config.user.json
).my_base
profile is defined as the default base profile in Project Config (./zowe.config.json
).my_base
is the default base profile, so the current logic will skip loading its properties. 😢To fix this, I believe refactoring
ProfileManager.load
will be necessary. We should first merge all the config layers together, and then load profile properties as a single operation from the resulting merged object.For a detailed explanation of how config layers should be merged together, see Zowe docs.
Originally posted by @t1m0thyj in #144 (comment)
The text was updated successfully, but these errors were encountered: