-
Notifications
You must be signed in to change notification settings - Fork 6
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
Enhance Installation Stage to Run 'zwe init mvs' #83
Conversation
…type. Added method to run zwe init mvs Signed-off-by: Timothy Gerstel <tim.gerstel@gmail.com>
Signed-off-by: Timothy Gerstel <tim.gerstel@gmail.com>
src/actions/InstallationHandler.ts
Outdated
} | ||
|
||
console.log("running zwe init mvs..."); | ||
const initMvs = await this.initMVS(connectionArgs, installationArgs.installationDir); |
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.
it looks to me like init mvs is run regardless of the status of install.
i think this file needs to be reorged a little bit to have a step only continue if the previous step succeeded.
because if you didnt upload, you cant unpax. if you didnt unpax, you cant install. if you didnt install, you cant init.
Signed-off-by: Timothy Gerstel <tim.gerstel@gmail.com>
src/actions/InstallationHandler.ts
Outdated
initMvs = await this.initMVS(connectionArgs, installationArgs.installationDir); | ||
ProgressStore.set('installation.initMVS', initMvs.status); | ||
} else { | ||
initMvs = {status: true} |
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.
if installMvs = false, initMvs = true?
unconditionally?
i can't think of why this wouldnt be false.
Signed-off-by: Timothy Gerstel <tim.gerstel@gmail.com>
…nitMvs Signed-off-by: Timothy Gerstel <tim.gerstel@gmail.com>
|
||
return {status: download.status && uploadYaml.status && upload.status && unpax.status && install.status, details: ''}; | ||
return {status: download.status && uploadYaml.status && upload.status && unpax.status && installation.status && initMvs.status, details: ''}; | ||
} catch (error) { | ||
return {status: false, details: error.message}; |
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.
This code does not properly present errors to users.
We have a try { } catch { } here, but not all failures go to the catch { } block.
If init mvs fails, there is no exception but the return would say {status: false, details: ''}
.
There would be no way to differentiate that from a zwe install
or extract
step failure.
You should set details
to what actually failed.
In fact, initMVS()
is returning a details, so it could be formatted.
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.
This return statement existed prior to this PR, I'd be happy to fix it but I think it should be a separate ticket to enhance the error detailing of this stage @1000TurquoisePogs
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.
@timgerstel @1000TurquoisePogs don't forget, if there are new errors in Zen the user needs to see, use this:
https://github.com/zowe/zen/pull/45/files#diff-6d106a102cd6a61731f4cb784b463952dd7e6c02a2f1ba3df3e4602e9a4e7e45R222
Signed-off-by: Timothy Gerstel <tim.gerstel@gmail.com>
Signed-off-by: Timothy Gerstel <tim.gerstel@gmail.com>
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.
It is an improvement so I will merge it but there still are situations that need to be caught:
![image](https://private-user-images.githubusercontent.com/30730276/286247952-aa3f8370-28cd-4a08-9f44-fee7fe3cc780.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyODE1MzEsIm5iZiI6MTcyMzI4MTIzMSwicGF0aCI6Ii8zMDczMDI3Ni8yODYyNDc5NTItYWEzZjgzNzAtMjhjZC00YTA4LTlmNDQtZmVlN2ZlM2NjNzgwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODEwVDA5MTM1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJhMTYxNjdlMjU1Mzc0NDMyZDUyOGZlMDY0YjgxYWJiYWFjYmFkYTIyNDMzMDA3YThmN2QxZGEyZTRmNDlkZWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.dIpF6yslHL6eNqdiUAUmQRPSzpmkSwv7d-4NfDdDWc0)
If you run it twice, because "--allow-overwrite" is not used, technically init
does nothing the second time.
It prints out warnings and then says success.
Those warnings should be propagated to the UI, which can be done in a follow-up PR.
Proposed changes
This PR addresses Issue: [Link to Github issue within https://github.com/zowe/zen/issues if any]
This PR depends upon the following PRs:
Type of change
Please delete options that are not relevant.
PR Checklist
Please delete options that are not relevant.
Testing
Further comments