getsentry / sentry-cli

A command line utility to work with Sentry.
https://docs.sentry.io/cli/
BSD 3-Clause "New" or "Revised" License
899 stars 221 forks source link

How to avoid fetching progress in Github Actions? #1101

Closed landsman closed 2 years ago

landsman commented 2 years ago

Environment

How do you use Sentry? ➡️ Sentry SaaS Which SDK and version? ➡️ Javascript, Next.js project, packages:

"@sentry/browser": "^6.16.1",
"@sentry/integrations": "^6.16.1",
"@sentry/nextjs": "^6.16.1",
"@sentry/node": "^6.2.5",
"@sentry/tracing": "^6.16.1",
"@sentry/webpack-plugin": "^1.18.3",

Steps to Reproduce

Configuration of the webpack in next.config.js:

webpack: (config, { isServer }) => {
    // Fixes npm packages that depend on `fs` module
    if (!isServer) {
        config.resolve.alias['@sentry/node'] = '@sentry/browser';
    }

    if (isRelease) {
        // Push Sentry release configuration
        config.plugins.push(
            new SentryWebpackPlugin({
                include: '.next',
                ignore: ['node_modules', '*.css.map'],
                // stripPrefix: ['webpack://_N_E/'],
                urlPrefix: '~/_next',
                silent: true,

                // Release number is number of GitHub workflow build
                release: process.env.APP_VERSION,
                authToken: process.env.SENTRY_AUTH_TOKEN,

                org: 'trisbee',
                project: process.env.SENTRY_PROJECT,
                url: 'https://sentry.io/',
            }),
        );
    }

    return config;
},

Expected Result

Basically, I expected that silent will hide all unnecessary info/warn logs. I want to know just about errors, fail builds.

Actual Result

Interactive log about downloading sentry-cli spamming each build log. It's not necessary at all.

2022-01-19T10:04:00.3919402Z > @sentry/cli@1.71.0 install /usr/src/node_modules/@sentry/cli
2022-01-19T10:04:00.3919839Z > node scripts/install.js
2022-01-19T10:04:00.3920060Z 
2022-01-19T10:04:00.5701862Z info sentry-cli Downloading from https://downloads.sentry-cdn.com/sentry-cli/1.71.0/sentry-cli-Linux-x86_64
2022-01-19T10:04:00.6342279Z fetching sentry-cli-Linux-x86_64 1%
2022-01-19T10:04:00.6377338Z fetching sentry-cli-Linux-x86_64 2%
2022-01-19T10:04:00.6433228Z fetching sentry-cli-Linux-x86_64 3%
2022-01-19T10:04:00.6464340Z fetching sentry-cli-Linux-x86_64 4%
2022-01-19T10:04:00.6526191Z fetching sentry-cli-Linux-x86_64 5%
2022-01-19T10:04:00.6548137Z fetching sentry-cli-Linux-x86_64 6%
2022-01-19T10:04:00.6571045Z fetching sentry-cli-Linux-x86_64 7%
2022-01-19T10:04:00.6614483Z fetching sentry-cli-Linux-x86_64 8%
2022-01-19T10:04:00.6637777Z fetching sentry-cli-Linux-x86_64 9%
2022-01-19T10:04:00.6659868Z fetching sentry-cli-Linux-x86_64 10%
2022-01-19T10:04:00.6681800Z fetching sentry-cli-Linux-x86_64 11%
2022-01-19T10:04:00.6708266Z fetching sentry-cli-Linux-x86_64 12%
2022-01-19T10:04:00.6729146Z fetching sentry-cli-Linux-x86_64 13%
2022-01-19T10:04:00.6748145Z fetching sentry-cli-Linux-x86_64 14%
2022-01-19T10:04:00.6768489Z fetching sentry-cli-Linux-x86_64 15%
2022-01-19T10:04:00.6832012Z fetching sentry-cli-Linux-x86_64 16%
2022-01-19T10:04:00.6925906Z fetching sentry-cli-Linux-x86_64 17%
2022-01-19T10:04:00.6946255Z fetching sentry-cli-Linux-x86_64 18%
2022-01-19T10:04:00.6968290Z fetching sentry-cli-Linux-x86_64 19%
2022-01-19T10:04:00.6993814Z fetching sentry-cli-Linux-x86_64 20%
2022-01-19T10:04:00.7020797Z fetching sentry-cli-Linux-x86_64 21%
2022-01-19T10:04:00.7048747Z fetching sentry-cli-Linux-x86_64 22%
2022-01-19T10:04:00.7071770Z fetching sentry-cli-Linux-x86_64 23%
2022-01-19T10:04:00.7096145Z fetching sentry-cli-Linux-x86_64 24%
2022-01-19T10:04:00.7117869Z fetching sentry-cli-Linux-x86_64 25%
2022-01-19T10:04:00.7140338Z fetching sentry-cli-Linux-x86_64 26%
2022-01-19T10:04:00.7162655Z fetching sentry-cli-Linux-x86_64 27%
2022-01-19T10:04:00.7187969Z fetching sentry-cli-Linux-x86_64 28%
2022-01-19T10:04:00.7209339Z fetching sentry-cli-Linux-x86_64 29%
2022-01-19T10:04:00.7229871Z fetching sentry-cli-Linux-x86_64 30%
2022-01-19T10:04:00.7254372Z fetching sentry-cli-Linux-x86_64 31%
2022-01-19T10:04:00.7278949Z fetching sentry-cli-Linux-x86_64 32%
2022-01-19T10:04:00.7301149Z fetching sentry-cli-Linux-x86_64 33%
2022-01-19T10:04:00.7315417Z fetching sentry-cli-Linux-x86_64 34%
2022-01-19T10:04:00.7325481Z fetching sentry-cli-Linux-x86_64 35%
2022-01-19T10:04:00.7344243Z fetching sentry-cli-Linux-x86_64 36%
2022-01-19T10:04:00.7364789Z fetching sentry-cli-Linux-x86_64 37%
2022-01-19T10:04:00.7387200Z fetching sentry-cli-Linux-x86_64 38%
2022-01-19T10:04:00.7408655Z fetching sentry-cli-Linux-x86_64 39%
2022-01-19T10:04:00.7438047Z fetching sentry-cli-Linux-x86_64 40%
2022-01-19T10:04:00.7460407Z fetching sentry-cli-Linux-x86_64 41%
2022-01-19T10:04:00.7483079Z fetching sentry-cli-Linux-x86_64 42%
2022-01-19T10:04:00.7506640Z fetching sentry-cli-Linux-x86_64 43%
2022-01-19T10:04:00.7532555Z fetching sentry-cli-Linux-x86_64 44%
2022-01-19T10:04:00.7554522Z fetching sentry-cli-Linux-x86_64 45%
2022-01-19T10:04:00.7576350Z fetching sentry-cli-Linux-x86_64 46%
2022-01-19T10:04:00.7621344Z fetching sentry-cli-Linux-x86_64 47%
2022-01-19T10:04:00.7652905Z fetching sentry-cli-Linux-x86_64 48%
2022-01-19T10:04:00.7678661Z fetching sentry-cli-Linux-x86_64 49%
2022-01-19T10:04:00.7700285Z fetching sentry-cli-Linux-x86_64 50%
2022-01-19T10:04:00.7723117Z fetching sentry-cli-Linux-x86_64 51%
2022-01-19T10:04:00.7813458Z fetching sentry-cli-Linux-x86_64 52%
2022-01-19T10:04:00.7836920Z fetching sentry-cli-Linux-x86_64 53%
2022-01-19T10:04:00.7858467Z fetching sentry-cli-Linux-x86_64 54%
2022-01-19T10:04:00.7878915Z fetching sentry-cli-Linux-x86_64 55%
2022-01-19T10:04:00.7902033Z fetching sentry-cli-Linux-x86_64 56%
2022-01-19T10:04:00.7932129Z fetching sentry-cli-Linux-x86_64 57%
2022-01-19T10:04:00.7956905Z fetching sentry-cli-Linux-x86_64 58%
2022-01-19T10:04:00.7989020Z fetching sentry-cli-Linux-x86_64 59%
2022-01-19T10:04:00.8006264Z fetching sentry-cli-Linux-x86_64 60%
2022-01-19T10:04:00.8021962Z fetching sentry-cli-Linux-x86_64 61%
2022-01-19T10:04:00.8050666Z fetching sentry-cli-Linux-x86_64 62%
2022-01-19T10:04:00.8079184Z fetching sentry-cli-Linux-x86_64 63%
2022-01-19T10:04:00.8126623Z fetching sentry-cli-Linux-x86_64 64%
2022-01-19T10:04:00.8142406Z fetching sentry-cli-Linux-x86_64 65%
2022-01-19T10:04:00.8157776Z fetching sentry-cli-Linux-x86_64 66%
2022-01-19T10:04:00.8223417Z fetching sentry-cli-Linux-x86_64 67%
2022-01-19T10:04:00.8245819Z fetching sentry-cli-Linux-x86_64 68%
2022-01-19T10:04:00.8271214Z fetching sentry-cli-Linux-x86_64 69%
2022-01-19T10:04:00.8292747Z fetching sentry-cli-Linux-x86_64 70%
2022-01-19T10:04:00.8310834Z fetching sentry-cli-Linux-x86_64 71%
2022-01-19T10:04:00.8332637Z fetching sentry-cli-Linux-x86_64 72%
2022-01-19T10:04:00.8350386Z fetching sentry-cli-Linux-x86_64 73%
2022-01-19T10:04:00.8375357Z fetching sentry-cli-Linux-x86_64 74%
2022-01-19T10:04:00.8399544Z fetching sentry-cli-Linux-x86_64 75%
2022-01-19T10:04:00.8459390Z fetching sentry-cli-Linux-x86_64 76%
2022-01-19T10:04:00.8519513Z fetching sentry-cli-Linux-x86_64 77%
2022-01-19T10:04:00.8565329Z fetching sentry-cli-Linux-x86_64 78%
2022-01-19T10:04:00.8595408Z fetching sentry-cli-Linux-x86_64 79%
2022-01-19T10:04:00.8620099Z fetching sentry-cli-Linux-x86_64 80%
2022-01-19T10:04:00.8662611Z fetching sentry-cli-Linux-x86_64 81%
2022-01-19T10:04:00.8686836Z fetching sentry-cli-Linux-x86_64 82%
2022-01-19T10:04:00.8725549Z fetching sentry-cli-Linux-x86_64 83%
2022-01-19T10:04:00.8752316Z fetching sentry-cli-Linux-x86_64 84%
2022-01-19T10:04:00.8772810Z fetching sentry-cli-Linux-x86_64 85%
2022-01-19T10:04:00.8800888Z fetching sentry-cli-Linux-x86_64 86%
2022-01-19T10:04:00.8834535Z fetching sentry-cli-Linux-x86_64 87%
2022-01-19T10:04:00.8983199Z fetching sentry-cli-Linux-x86_64 88%
2022-01-19T10:04:00.9019629Z fetching sentry-cli-Linux-x86_64 89%
2022-01-19T10:04:00.9056909Z fetching sentry-cli-Linux-x86_64 90%
2022-01-19T10:04:00.9081760Z fetching sentry-cli-Linux-x86_64 91%
2022-01-19T10:04:00.9106444Z fetching sentry-cli-Linux-x86_64 92%
2022-01-19T10:04:00.9127335Z fetching sentry-cli-Linux-x86_64 93%
2022-01-19T10:04:00.9149758Z fetching sentry-cli-Linux-x86_64 94%
2022-01-19T10:04:00.9175638Z fetching sentry-cli-Linux-x86_64 95%
2022-01-19T10:04:00.9205468Z fetching sentry-cli-Linux-x86_64 96%
2022-01-19T10:04:00.9230610Z fetching sentry-cli-Linux-x86_64 97%
2022-01-19T10:04:00.9256914Z fetching sentry-cli-Linux-x86_64 98%
2022-01-19T10:04:00.9287042Z fetching sentry-cli-Linux-x86_64 99%
2022-01-19T10:04:00.9341949Z fetching sentry-cli-Linux-x86_64 100%
kamilogorek commented 2 years ago

Set SENTRY_NO_PROGRESS_BAR env variable, eg. SENTRY_NO_PROGRESS_BAR=1 npm install or use --silent flag in npm install.

See: https://github.com/getsentry/sentry-cli/blob/master/scripts/install.js#L47-L53