zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
108 stars 85 forks source link

Progress bars do not display in Zowe vNext #2071

Closed gejohnston closed 4 months ago

gejohnston commented 4 months ago

Describe the bug

Progress bars do not display on long running commands. This occurs on Windows and Linux.

Expected and actual results

The following command displayed no progress bar. It takes a few seconds and I would have expected a progress bar.

> zowe files download data-set "SYS1.PARMLIB.OLD" --file t:\sys1.parmlib
Data set downloaded successfully.
Destination: t:\sys1.parmlib

Describe your environment

Also, the zowe config report-env command always displays a progress bar while gathering NPM information (it is a slow process). The report-env command displays no progress bar in vNext.

$ zowe config report-env
______________________________________________
Zowe CLI version = 8.0.0-next.202402261705
Node.js version = 20.10.0
Node Version Manager version = nvm failed to display any output.
Reason = /bin/sh: 1: nvm: not found
O.S. platform = linux
O.S. architecture = x64

O.S. PATH = /home/stduser/.cargo/bin:./:/home/stduser/.nvm/versions/node/v20.10.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

ZOWE_CLI_HOME = undefined
    Default = /home/stduser/.zowe
ZOWE_APP_LOG_LEVEL = undefined
ZOWE_IMPERATIVE_LOG_LEVEL = undefined
No other 'ZOWE_' variables have been set.

______________________________________________
NPM information:

    NPM version = 10.2.3
    Shell = /bin/bash
    Global prefix = /home/stduser/.nvm/versions/node/v20.10.0
        The directory above contains the Zowe Node.js command script.
    Global root node modules = /home/stduser/.nvm/versions/node/v20.10.0/lib/node_modules
    Global config = /home/stduser/.nvm/versions/node/v20.10.0/etc/npmrc
    Local prefix = /home/stduser/temp
    Local root node modules = /home/stduser/temp/node_modules
    User config = /home/stduser/.npmrc

    node bin location = /home/stduser/.nvm/versions/node/v20.10.0/bin/node
    cwd = /home/stduser/temp
    HOME = /home/stduser

______________________________________________
Zowe CLI configuration information:

    Zowe daemon mode = off
    Zowe config type = V2 Team Config
    Team config files in effect:
        /home/stduser/temp/zowe.config.json
        /home/stduser/.zowe/zowe.config.json
    Default profile names: 
        zosmf =    zosmf
        tso =      tso
        ssh =      ssh
        base =     base_apiml
        jclcheck = jclcheck_de20_jck_gene
    Available profile names:
        zosmf
        tso
        ssh
        base
        base_apiml
        jclcheck_ca32_jck_gene
        jclcheck_de20_jck_gene
        tso_ca32_tso_gene
        tso_de20_tso_gene
        tso_tso1_tso_gene
        zosmf_ca32_zosmf_gene
        zosmf_de20_zosmf_gene
        zosmf_tso1_zosmf_gene

______________________________________________
Installed plugins:
______________________________________________

This information contains site-specific data. Redact anything required
by your organization before sending this information to outside companies.

Additional context

github-actions[bot] commented 4 months ago

Thank you for creating a bug report. We will investigate the bug and evaluate its impact on the product. If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

adam-wolfe commented 4 months ago

I'm seeing different behavior on Linux and Windows. With version 8.0.0-next.202402261705 from npm, in Windows Powershell I still see a progress bar, on Linux (MX Linux using Konsole) the progress bar is not shown.

I'm not running in daemon mode and neither FORCE_COLOR nor CI environment variables are set.

Actually, I lose colors on Linux when running vnext.

(edit, I had FORCE_COLOR set to 1 in my .zowe.env.json on Windows, removing the variable causes colors and progress bars to not be shown)

gejohnston commented 4 months ago

With Zowe 8.0.0-next.202402261705, Windows never displays a progress bar for me. I tried the native Powershell terminal with Powershell version 5.1.19041.3930. I also tried Powershell version 7.4.1 in a native Powershell terminal and also within ConEmu.

I saw Zowe V2 display a progress bar in both Windows and Linux. Zowe 8.0.0-next.202402261705 does not display the progress bar for me in either Windows or Linux.

awharn commented 4 months ago

I have confirmed I broke this with the dependency upgrades. Chalk removed the .enabled property, and I thought I fixed this, but the change may have been on my branch that broke so spectacularly that I started over. I am opening a PR momentarily to fix this behavior.

awharn commented 4 months ago

We also may need to warn extenders who were using that property, because we were exporting Chalk in TextUtils for ease of use.