IBM / zowe-cli-cics-deploy-plugin

Provides the cics-deploy plug-in for Zowe CLI https://github.com/zowe/zowe-cli to deploy Node.js and other applications from a workstation to IBM CICS Transaction Server within a CICS bundle. Documentation is available at https://ibm.github.io/zowe-cli-cics-deploy-plugin/
Eclipse Public License 2.0
13 stars 12 forks source link

Should we suppress output if the bundle goes DISABLED ? #206

Closed ChrisAtkinson1 closed 5 years ago

ChrisAtkinson1 commented 5 years ago

In the test plan there is this.

Make sure output is suppressed if there is nothing valuable in it eg. BUNDLE failed to install or enable

On DISABLE it currently does - However I think this is acceptable.

C:\Users\CHRISTOPHERAtkinson\Documents\ZoweStuff\ZOWEDEV\PUSH1\tests\Cicsjson\CICSJSON>zowe cics-deploy push bundle --name CICSJS02 --targetdir /u/atkinc/pushtest --zosmf-profile zosmf2c --cics-deploy-profile deploy --ssh-profile ssh2Ckey --ow --targetState DISABLED CICS Regions in Scope 'CALMAS1' of CICSplex 'CAPLEX': CICS Regions in Scope 'CALMAS1' of CICSplex 'CAPLEX': Applid: CALMAS1 jobname: CALMAS1 jobid: JOB73879 CICS Regions in Scope 'CALMAS1' of CICSplex 'CAPLEX': Applid: CALMAS1 jobname: CALMAS1 jobid: JOB73879

NODEJSAPP resources for Bundle 'CICSJS02' in Scope 'CALMAS1': CICS Regions in Scope 'CALMAS1' of CICSplex 'CAPLEX': Applid: CALMAS1 jobname: CALMAS1 jobid: JOB73879

NODEJSAPP resources for Bundle 'CICSJS02' in Scope 'CALMAS1': CICS NODEJSAPP resource 'CICSJSON' is in 'DISABLED' state in region 'CALMAS1' with process id '0'. stdout: stderr: CICS Regions in Scope 'CALMAS1' of CICSplex 'CAPLEX': Applid: CALMAS1 jobname: CALMAS1 jobid: JOB73879

NODEJSAPP resources for Bundle 'CICSJS02' in Scope 'CALMAS1': CICS NODEJSAPP resource 'CICSJSON' is in 'DISABLED' state in region 'CALMAS1' with process id '0'. stdout: stderr: PUSH operation completed.

pcoop commented 5 years ago

It's possible that the output files exist and have useful information in them even if the Bundle does end up disabled. For example, a Node.js application could start and almost instantly run to completion writing something to stdout in the process.

If the filenames aren't set then yeah, we could perhaps suppress the output (whilst tolerating the possibility that they're set in one region and not in another); but doing so based only on the state of the Bundle would be wrong.

markcocker commented 5 years ago

Perhaps suppress "stdout:" and "stderr:" lines when there are no values?

pcoop commented 5 years ago

What is our preferred output in this scenario:

  1. Just suppress the stdout/stderr lines:

    Regions in scope 'CALMAS1' of CICSplex 'CAPLEX': Applid: CALMAS1 jobname: CALMAS1 jobid: JOB73879

    NODEJSAPP resources for bundle 'CICSJS02' in scope 'CALMAS1': NODEJSAPP resource 'CICSJSON' is in 'DISABLED' state in region 'CALMAS1' with process id '0'.

  2. Add a suffix to explain why the output is missing:

    Regions in scope 'CALMAS1' of CICSplex 'CAPLEX': Applid: CALMAS1 jobname: CALMAS1 jobid: JOB73879

    NODEJSAPP resources for bundle 'CICSJS02' in scope 'CALMAS1': NODEJSAPP resource 'CICSJSON' is in 'DISABLED' state in region 'CALMAS1' with process id '0'. Stdout/Stderr are not available.

  3. The current behaviour:

    Regions in scope 'CALMAS1' of CICSplex 'CAPLEX': Applid: CALMAS1 jobname: CALMAS1 jobid: JOB73879

    NODEJSAPP resources for bundle 'CICSJS02' in scope 'CALMAS1': NODEJSAPP resource 'CICSJSON' is in 'DISABLED' state in region 'CALMAS1' with process id '0'. Stdout: <not available> Stderr: <not available>

  4. Something else?

ChrisAtkinson1 commented 5 years ago

I'd vote for option 3.

matthewpwilson commented 5 years ago

I believe this is fixed

ChrisAtkinson1 commented 5 years ago

Done