question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

zowe.config.user.json not being leveraged properly

See original GitHub issue

Describe the bug

Properties in zowe.config.user.json are not being merged with like-named profiles in zowe.config.json. In this situation, Zowe Explorer fails to start, and I receive the following error: image

To Reproduce

Steps to reproduce the behavior:

  1. Add this content to your global zowe.config.json:
{
    "$schema": "./zowe.schema.json",
    "profiles": {
        "zosmf": {
            "profiles": {
                "lpar1": {"type": "zosmf","properties": {"host": "myhost.com"}}
            },
            "properties": {
                "port": 443
            }
        },
        "base": {
            "type": "base",
            "properties": {
                "rejectUnauthorized": false
            }
        }
    },
    "defaults": {
        "zosmf": "zosmf.lpar1",
        "base": "base"
        },
    "autoStore": false
}
  1. Add this content to your global zowe.config.user.json:
{
    "$schema": "./zowe.schema.json",
    "profiles": {
        "zosmf-working": {
            "profiles": {
                "lpar1": {"type": "zosmf","properties": {"user": "myuser"}}
            },
            "properties": {
            }
        }
    },
    "defaults": {
        "zosmf": "zosmf.lpar1"
    },
    "autoStore": false
}
  1. Launch VSCode and note that everything loads properly
  2. In your global zowe.config.user.json, change zosmf-working to just zosmf
  3. Relaunch VS Code and note this error on startup: image

Expected behavior

Zowe Explorer starts up and properties of like-named profiles in zowe.config.user.json override values in the zowe.config.json.

Desktop (please complete the following information):

  • OS: Windows 10
  • Zowe Explorer Version: v2.0.0-next.202112161700

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
zFernand0commented, Mar 29, 2022

That’s right. One could also pull that branch and run the extension from the debugger in order to verify the functionality 😋

1reaction
crawrcommented, Mar 16, 2022

Upon further investigation, I found what seems like a bug in loadSchema in these lines:

Since the profile.profLoc.osLoc contains an array of 2 items, the schemaMapKey looks like: image

and because mProfileSchemaCache looks like:

it is not able to find the correct schema and returns null. This causes the error message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Global Profile Configuration (Technical Preview)
You can generate a user-specific configuration file that overrides the values defined in the global zowe.config.json file.
Read more >
Zowe CLI V2 - zowe profiles create deprecated? · Issue #1404
Hi,. Apparently with the move to Zowe CLI V2, the profile management commands are deprecated... You can no longer / must create a...
Read more >
Zowe CLI — Getting Started, Made Easy! | by Michael Bauer
You can make use of zowe.config.user.json . To get started, issue zowe config init -g --user and open the generated file. Notice that...
Read more >
Setting property groups - IBM
They can also be used to specify language-specific compiler options. To define a property group, you can use the following JSON snippet as...
Read more >
Zowe Client Python SDK's documentation!
The Zowe Client Python SDK, is a set of Python packages designed to allow ... Python developers can leverage the Zowe SDK in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found