-
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
base: v3.x/staging
Are you sure you want to change the base?
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]>
Test workflow 6023 is started. |
zwe support
in typescriptzwe support
in typescript
Signed-off-by: Martin Zeithaml <[email protected]>
build 6858 SUCCEEDED. |
Test workflow 6025 is started. |
zwe support
in typescriptzwe support
in typescript
} | ||
} | ||
} else { | ||
environment["node"] = `not found`; |
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.
should we add environment["zosmf_check"] = <url> => not checked
? Capturing the URL could still be useful when node is not available. Second question: is it useful to capture this when discovery is disabled?
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.
Following code was made based on internal start prepare
:
- If
discovery
, checkzOSMF
-> when we really needzOSMF
- Other possible cases not supported
- URL can be always recreated from
zowe.yaml
config
I am OK to change this to try to do a check in more cases.
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.
see comments
Signed-off-by: Martin Zeithaml <[email protected]>
build 6870 SUCCEEDED. |
Test workflow 6036 is started. |
Signed-off-by: Martin Zeithaml <[email protected]>
build 6876 SUCCEEDED. |
Test workflow 6041 is started. |
Signed-off-by: Martin Zeithaml <[email protected]>
Signed-off-by: Martin Zeithaml <[email protected]>
build 6889 SUCCEEDED. |
Test workflow 6048 is started. |
Signed-off-by: Martin Zeithaml <[email protected]>
build 6890 SUCCEEDED. |
Test workflow 6049 is started. |
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()
}
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).