zowe / zowe-install-packaging

Packaging repository for the Zowe install scripts and files
Eclipse Public License 2.0
27 stars 52 forks source link

zwe internal config get not working in v3 #4005

Open pablocarle opened 4 weeks ago

pablocarle commented 4 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago
  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 commented 2 weeks ago

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.