-
Notifications
You must be signed in to change notification settings - Fork 51
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 support
in typescript
#4147
Conversation
Signed-off-by: Martin Zeithaml <[email protected]>
build 6798 FAILED. |
Signed-off-by: Martin Zeithaml <[email protected]>
build 6799 FAILED. |
Signed-off-by: Martin Zeithaml <[email protected]>
build 6800 FAILED. |
Signed-off-by: Martin Zeithaml <[email protected]>
build 6801 SUCCEEDED. |
Test workflow 5989 is started. |
Signed-off-by: Martin Zeithaml <[email protected]>
build 6802 SUCCEEDED. |
Test workflow 5990 is started. |
Signed-off-by: Martin Zeithaml <[email protected]>
build 6803 SUCCEEDED. |
Test workflow 5991 is started. |
Signed-off-by: Martin Zeithaml <[email protected]>
build 6805 SUCCEEDED. |
Test workflow 5993 is started. |
Signed-off-by: Martin Zeithaml <[email protected]>
build 6810 SUCCEEDED. |
Test workflow 5998 is started. |
Signed-off-by: Martin Zeithaml <[email protected]>
Testing of ! [misc.unExportEnv]: ZWE_CLI_PARAMETER_CONFIG=
[1/3]: /zowe/bin/zwe support verify-fingerprints -vv
! [misc.exportEnv]: JAVA_HOME=/sys/java64bt/v8r0m0/usr/lpp/java/current_64
! [Output]:
===============================================================================
>> VERIFY ZOWE FILE FINGERPRINTS
ERROR: Java 1.8.0_411 is less than the minimum level required of Java 17.
ERROR: Error ZWEL0122E Cannot find java. Please define JAVA_HOME environment variable.
+ [1/3][expected rc=122, result rc=122 ]: /zowe/bin/zwe support verify-fingerprints -vv
[ ][Description ]: Java 8 -> not supported for v3
+ [ ]['is less than the minimum level required of Java' found]
! [misc.unExportEnv]: JAVA_HOME=
[1/3]: --------------------------------
[2/3]: /zowe/bin/zwe support verify-fingerprints -vv
! [misc.exportEnv]: JAVA_HOME=/sys/java64bt/v11r0m0/usr/lpp/java/current_64
! [Output]:
===============================================================================
>> VERIFY ZOWE FILE FINGERPRINTS
ERROR: Java 11.0.22 2024-01-16 is less than the minimum level required of Java 17.
ERROR: Error ZWEL0122E Cannot find java. Please define JAVA_HOME environment variable.
+ [2/3][expected rc=122, result rc=122 ]: /zowe/bin/zwe support verify-fingerprints -vv
[ ][Description ]: Java 11 -> not supported for v3
+ [ ]['is less than the minimum level required of Java' found]
! [misc.unExportEnv]: JAVA_HOME=
[2/3]: --------------------------------
[3/3]: /zowe/bin/zwe support verify-fingerprints --trace
! [misc.exportEnv]: JAVA_HOME=/sys/java64bt/v17r0m0/usr/lpp/java/current_64
! [misc.shellCmd]: cp ./run_test.sh /zowe/
! [misc.shellCmd]: 0
! [misc.shellCmd]: ----------------------------------------------------------------
! [Output]:
===============================================================================
>> VERIFY ZOWE FILE FINGERPRINTS
Java 17.0.10 2024-01-16 is supported.
Java check is successful.
- Create Zowe directory file list
> Check if either TMPDIR or TMP points to writable directory, else try '/tmp' directory
> create_tmp_file on /tmp
- test /tmp/zwe-support-verify-fingerprints-5277
- good
* File list created as /tmp/zwe-support-verify-fingerprints-5277
- Calculate hashes of Zowe files
> Check if either TMPDIR or TMP points to writable directory, else try '/tmp' directory
> create_tmp_file on /tmp
- test /tmp/zwe-support-verify-fingerprints-6228
- good
fs.fileSize path="/tmp/zwe-support-verify-fingerprints-6228"
fs.fileSize result="[{"dev":594,"ino":61318,"mode":50332068,"nlink":1,"uid":110000020,"gid":1,"rdev":0,"size":1377881,"blocks":1360,"atime":1738236753000,"mtime":1738236760000,"ctime":1738236760000,"extattrs":0,"isText":true,"ccsid":1047},0]"
* Zowe file hashes created as /tmp/zwe-support-verify-fingerprints-6228
- Find different files
* Number of different files: 1
* All different files:
./run_test.sh
- Find extra files
* Number of extra files: 1
* All extra files:
./run_test.sh
- Find missing files
ERROR: Error ZWEL0181E: Failed to verify Zowe file fingerprints.
+ [3/3][expected rc=181, result rc=181 ]: /zowe/bin/zwe support verify-fingerprints --trace
[ ][Description ]: Copy file to runtime and verify fingerprints with trace
! [misc.unExportEnv]: JAVA_HOME=
! [misc.shellCmd]: rm /zowe/run_test.sh
! [misc.shellCmd]: 0
! [misc.shellCmd]: ----------------------------------------------------------------
[3/3]: --------------------------------
! [Time elapsed]: 00:00:57
..::|[ T E S T O V E R V I E W ]|::..
-----------------------------------------
+ [1/3][expected rc=122, result rc=122 ]: /zowe/bin/zwe support verify-fingerprints -vv
[ ][Description ]: Java 8 -> not supported for v3
+ [ ]['is less than the minimum level required of Java' found]
+ [2/3][expected rc=122, result rc=122 ]: /zowe/bin/zwe support verify-fingerprints -vv
[ ][Description ]: Java 11 -> not supported for v3
+ [ ]['is less than the minimum level required of Java' found]
+ [3/3][expected rc=181, result rc=181 ]: /zowe/bin/zwe support verify-fingerprints --trace
[ ][Description ]: Copy file to runtime and verify fingerprints with trace |
export function execute(doNotExit: Boolean): void { | ||
|
||
common.printLevel0Message('Verify Zowe file fingerprints'); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got to the bottom of the build failures. The require_java
from the shell script was removed so the dependency on a Zowe config file could be removed. Our tests used the Zowe config file and pulled JAVA_HOME from there...can we optionally re-implement that behavior when config exists?
i.e.
if (std.getEnv('ZWE_CLI_PARAMETER_CONFIG')) {
requireJava()
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a problem of zwe support verify-fingerprints
. This command ignores the config at all. We need to differ between zwe support
and zwe support verify-fingerprints
.
If the verify-fingerprints
is
- Called from
support
, we can check the config. - Standalone command, we have to rely on
JAVA_HOME
.
Signed-off-by: Martin Zeithaml <[email protected]>
build 6895 SUCCEEDED. |
Test workflow 6055 is started. |
build 6921 SUCCEEDED. |
Test workflow 6075 is started. |
Signed-off-by: MarkAckert <[email protected]>
build 6936 SUCCEEDED. |
Test workflow 6078 is started. |
Signed-off-by: MarkAckert <[email protected]>
build 6937 SUCCEEDED. |
Test workflow 6079 is started. |
Signed-off-by: MarkAckert <[email protected]>
build 6938 SUCCEEDED. |
I tried to lazily load the I also added a note to the CHANGELOG indicating zowe.yaml isn't required for verify-fingerprints. This is ready to merge. |
Test workflow 6080 is started. |
Signed-off-by: Martin Zeithaml <[email protected]>
build 6941 SUCCEEDED. |
Test workflow 6083 is started. |
Part of the NodeJS removal: the command
zwe support
is depending on NodeJS via popular functionread_yaml
.This PR is using typescript/javascript and
configmgr
features to eliminate the NodeJS dependency.Following is updated:
zwe support
zwe support verify-fingerprints
Changes comparing to current state:
requireNode
is accepting a parameter to do a node check, but without error if node it not found => node is optionalFSUM2051I | FSUM2052I
ps
output without me (see comments in the code)keytool showinfo -tls
node
anddiscovery
, checkzOSMF
zowe.runtimeDirectory
is) flagszssServer | zssServer64
PC extended attributeExample of environment output (ciphers and cee shortened, otherwise there is usually more):
Test results
Simple testing framework was used (using QuickJS via configmgr), output omitted (a lot of CEE & TLS lines).