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

zwe internal config get not working in v3 #4005

Open
pablocarle opened this issue Sep 23, 2024 · 9 comments
Open

zwe internal config get not working in v3 #4005

pablocarle opened this issue Sep 23, 2024 · 9 comments
Assignees

Comments

@pablocarle
Copy link
Contributor

Describe the bug

Running zwe internal config get command yields an error:

bash-4.3$ zwe internal config get -p "zowe.setup.vsam.storageClass" -c zowe.yaml
bos extend currSize=0x0 dataSize=0x1255 chunk=0x1000 extend=0x1255

Expected behavior
It should reply with the assigned value in the property.

@Martin-Zeithaml Martin-Zeithaml self-assigned this Sep 24, 2024
@Martin-Zeithaml
Copy link
Contributor

Problems identified:

  1. bos extend currSize=0x0 dataSize=0x1255 chunk=0x1000 extend=0x1255 is a debug message from yaml2json, which is not respecting the zwe mode (none/debug/verbose).
  2. If you omit zowe.workspaceDirectory, the command will fail:
$ zwe internal config get -p "zowe.setup.vsam.storageClass" -c zowe.yaml
TypeError: cannot read property 'split' of undefined
    at mkdirp (/zowe/runtime/3000/bin/libs/fs:63)
    at writeMergedConfig (/zowe/runtime/3000/bin/libs/configmgr:267)
    at getZoweConfig (/zowe/runtime/3000/bin/libs/configmgr:486)
    at <anonymous> (/zowe/runtime/3000/bin/libs/configmgr:43)

@Martin-Zeithaml
Copy link
Contributor

  1. The trace level is not passed to configmgr, the PR just hides the debug message.
  2. zwe internal config get and output are expecting the zowe.workspaceDirectory is defined. The code will try to create a directory for undefined path.

@1000TurquoisePogs
Copy link
Member

not having zowe.workspaceDirectory sounds like user error. should focus on ensuring that is true first since a lot of zwe code depends upon it existing.

@Martin-Zeithaml
Copy link
Contributor

  • zowe.workspaceDirectory is not mandatory, this is not user error, but ours
  • It is even more complicated:
    • Without configmgr, it is not using merged config
    • Same config, 2 commands, different results (1st command returns nothing)
$ zwe internal config get --path '.zowe.setup' --config './zowe.no.cfg.yaml'

$ zwe internal config get --path '.zowe.setup' --config './zowe.no.cfg.yaml' --configmgr
{"dataset":{"parmlibMembers":{"zis":"ZWESIP00"}},"security":{"product":"RACF",...

@JoeNemo
Copy link
Contributor

JoeNemo commented Oct 23, 2024

I think we made a mistake in not making ConfigManager mandatory in V3. Can we retroactive fix this and not wait until V4?

@JoeNemo
Copy link
Contributor

JoeNemo commented Oct 23, 2024

And, at this point, should workspaceDirectory be mandatory?

@balhar-jakub
Copy link
Member

I actualy believed that we removed the alternative for V3 and that in V3 there is only configuration manager.

@Martin-Zeithaml
Copy link
Contributor

We might presenting this to customers, but reality is the code is full of non-configmgr/configmgr code paths. Which, as shown on this issue, is really a bug (and of course, some parts are pure non-configmgr and working fine).

@1000TurquoisePogs
Copy link
Member

The code in v3 indeed does only execute configmgr-powered code where they exist.
Not all commands have configmgr code yet. It's just a matter of time and effort.
This is one such case.

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

5 participants