a11smiles
(Joshua Davis)
July 12, 2023, 9:50pm
1
ALM: Bitbucket Cloud
CI: Bitbucket Cloud
Languages: Javascript/Typescript
As so many others, Sensor JavaScript/TypeScript analysis [javascript]
, is taking incredibly long. It takes 3 minutes on an 87 line file.
Then, I end up getting:
INFO: 118 source files to be analyzed
INFO: 30/118 files analyzed, current file: /opt/atlassian/pipelines/agent/build/src/dto/Mode.ts
INFO: 31/118 files analyzed, current file: /opt/atlassian/pipelines/agent/build/src/dto/HealthState.ts
INFO: 32/118 files analyzed, current file: /opt/atlassian/pipelines/agent/build/src/components/Harvest/HarvestSetupDialog/styles.tsx
INFO: 38/118 files analyzed, current file: /opt/atlassian/pipelines/agent/build/src/services/api/vision/GatewayService.ts
INFO: 38/118 files analyzed, current file: /opt/atlassian/pipelines/agent/build/src/services/api/vision/GatewayService.ts
INFO: 38/118 files analyzed, current file: /opt/atlassian/pipelines/agent/build/src/services/api/vision/GatewayService.ts
INFO: Time spent writing ucfgs 930ms
ERROR: Failure during analysis, Node.js command to start eslint-bridge was: node --max-old-space-size=8192 /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/eslint-bridge-bundle/package/bin/server 43307 127.0.0.1 /opt/atlassian/pipelines/agent/build/.scannerwork true false /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/eslint-bridge-bundle/package/custom-rules14932366831793197581/package
java.lang.IllegalStateException: eslint-bridge server is not answering
I’ve seen so many people have issues with eslint-bridge
.
Has anyone actually gotten this working?!?!
Here are is my pipeline yaml:
image: node:18
clone:
depth: full
options:
size: 2x
definitions:
caches:
sonar: ~/.sonar/cache
steps:
- step: &test-ci
name: Run unit tests (linting - warnings allowed)
caches:
- node
- sonar
script:
- yarn install
- yarn lint:ci
- yarn test:ci
- pipe: sonarsource/sonarcloud-scan:1.4.0
variables:
SONAR_TOKEN: ${SONAR_TOKEN}
SONAR_SCANNER_OPTS: -Xmx256m
EXTRA_ARGS: '-Dsonar.sources=src -Dsonar.tests=src -Dsonar.test.inclusions="src/**/*.test.tsx" -Dsonar.typescript.lcov.reportPaths=coverage/lcov.info -Dsonar.eslint.reportPaths=result-lint.json -Dsonar.javascript.node.maxspace=8192'
- pipe: sonarsource/sonarcloud-quality-gate:0.1.6
- mkdir ./test-results && cp junit.xml ./test-results/junit.xml
artifacts:
- coverage/**
pipelines:
branches:
"feature/*":
- step: *test-ci
"hotfix/*":
- step: *test-ci
"main":
- step: *test-ci
Colin
(Colin)
July 13, 2023, 9:57am
2
Hey there.
We’re aware of performance issues impacting our Javascript/Typescript analyzer. A fix should be deployed soon (this week or early next week).
In the meantime, take a look at this post for a workaround:
ALM used - GitHub
CI system used - GH actions
Languages of the repository - ts
We have sonarCloud configured for our nx monorepo (sonar.typescript.tsconfigPath is pointing to tsconfig in the monorepo root)
We trigger the scan via our GitHub actions workflow using the action: SonarSource/sonarcloud-github-action@master.
Until a few days ago our setup was working as expected, we are now experiencing a huge performance degradation:
scans on PR (one line modified) takes hrs - the scan tries to…
1 Like
Hi Colin, do you have any news related to this fix? For me I’m not using the TypeScript, so this workaround don’t work for me.
Colin
(Colin)
August 8, 2023, 12:51pm
4
@andre_s_ferreira can you create a new topic describing your issue?
Yes I can, but it’s the same issue.
Hi Colin! I created here:
ALM: Bitbucket Cloud
CI: Bitbucket Cloud
Languages: Javascript
As so many others, Sensor JavaScript/TypeScript analysis [javascript], is taking incredibly long. It takes more than 120 minutes(timeout) on an 116 files to analyse.
Then, I end up getting:
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
INFO: Sensor JavaScript/TypeScript analysis [javascript]
INFO: Found 0 tsconfig.json file(s): []
INFO: Analyzing 116 files using tsconfig: /tmp/tmp-107-3E38jyIFnJeJ
INFO: 116 s…
a11smiles
(Joshua Davis)
October 3, 2023, 12:11pm
7
I have it working. The catch is to set a memory limit for docker. Otherwise, docker uses too much memory and the pipeline locks up. Since I’m using a 2x
machine (which will be required for this), I’ve set docker’s memory limit to 6MB.
See the updated script below:
image: node:18
clone:
depth: full
options:
size: 2x
definitions:
caches:
sonar: ~/.sonar/cache
services:
docker:
memory: 6144
steps:
- step: &test-ci
name: Run unit tests (linting - warnings allowed)
services:
- docker
caches:
- node
- sonar
script:
- yarn install
- yarn lint:ci
- yarn test:ci
- pipe: sonarsource/sonarcloud-scan:1.4.0
variables:
SONAR_TOKEN: ${SONAR_TOKEN}
SONAR_SCANNER_OPTS: -Xmx256m
EXTRA_ARGS: '-Dsonar.sources=src -Dsonar.tests=src -Dsonar.test.inclusions="src/**/*.test.tsx" -Dsonar.typescript.lcov.reportPaths=coverage/lcov.info -Dsonar.eslint.reportPaths=result-lint.json -Dsonar.javascript.node.maxspace=8192'
- pipe: sonarsource/sonarcloud-quality-gate:0.1.6
- mkdir ./test-results && cp junit.xml ./test-results/junit.xml
artifacts:
- coverage/**
pipelines:
branches:
"feature/*":
- step: *test-ci
"hotfix/*":
- step: *test-ci
"main":
- step: *test-ci
I tried, but is not worked for me(using the 1.4.0 and 2.0.0)
And in 2.0.0 bitbucket returns the 120 min timeout
system
(system)
Closed
October 11, 2023, 4:54pm
9
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.