Our BB pipeline:
- step: &sonar
size: 4x
name: SonarCloud
script:
- npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
- npm ci --no-audit
- npm run lint:json --silent > eslint.json || true
- export PROJECT_VERSION=node -e 'console.log(require("./lerna.json").version)'
- pipe: sonarsource/sonarcloud-scan:2.0.0
variables:
DEBUG: “true”
EXTRA_ARGS: -Dsonar.projectVersion=$PROJECT_VERSION
- pipe: sonarsource/sonarcloud-quality-gate:0.1.6
Size is experimental, tried with different sizes. Did not need it with Node14 thou. And it was working there perfectly. We’re struggling cause we just change Node version - everything else is working but Sonar. It is not temporary problem, we’re seeing this on Node20 branch for months
logs:
14:45:53.789 DEBUG: Analyzing file "/opt/atlassian/pipelines/agent/build/packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts" with linterId "default"
14:45:58.821 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:46:08.840 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:46:18.907 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:46:28.985 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:46:39.113 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:46:43.467 DEBUG: Shutting down the worker
14:46:49.365 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:47:00.334 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:47:13.463 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:47:24.954 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:47:39.456 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:47:55.523 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:48:07.594 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:48:20.053 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:48:32.307 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:48:47.650 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:49:02.035 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:49:24.465 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:49:43.406 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:50:02.726 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:50:17.281 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:50:36.611 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:50:54.342 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:51:11.753 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:51:32.050 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:51:56.560 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:52:19.823 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:52:55.347 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:53:21.431 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:53:58.533 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:54:27.786 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:54:54.330 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:55:25.761 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:55:59.936 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:56:30.098 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:57:03.339 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:57:35.907 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:58:09.400 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:58:41.451 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:59:13.268 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
14:59:42.125 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:00:04.960 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:00:37.699 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:02:08.698 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:02:29.767 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:03:00.781 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:06:41.026 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:07:06.301 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:07:27.786 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:07:43.151 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:07:58.687 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:08:17.101 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:08:35.018 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:08:54.622 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:09:13.697 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:09:33.795 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:09:56.269 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:10:19.160 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:10:43.281 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:11:03.521 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:11:14.060 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:11:24.571 INFO: 91/2302 files analyzed, current file: packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts
15:11:32.451 ERROR: Failure during analysis
java.lang.IllegalStateException: The bridge server is unresponsive
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:415)
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.analyzeTypeScript(BridgeServerImpl.java:375)
at org.sonar.plugins.javascript.analysis.AbstractAnalysis.analyzeFile(AbstractAnalysis.java:110)
at org.sonar.plugins.javascript.analysis.AnalysisWithProgram.analyzeProgram(AnalysisWithProgram.java:137)
at org.sonar.plugins.javascript.analysis.AnalysisWithProgram.analyzeFiles(AnalysisWithProgram.java:90)
at org.sonar.plugins.javascript.analysis.JsTsSensor.analyzeFiles(JsTsSensor.java:128)
at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:77)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:63)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:192)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:188)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:159)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:416)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.net.http.HttpTimeoutException: request timed out
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:571)
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:406)
... 39 common frames omitted
15:11:32.452 INFO: Hit the cache for 0 out of 91
15:11:32.480 INFO: Miss the cache for 91 out of 91: ANALYSIS_MODE_INELIGIBLE [91/91]
15:11:32.515 ERROR: isAlive was interrupted
java.lang.InterruptedException: null
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:386)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:553)
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.isAlive(BridgeServerImpl.java:453)
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.heartbeat(BridgeServerImpl.java:142)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
15:11:32.565 DEBUG: Shutting down the worker
15:11:32.719 DEBUG: Parsing /opt/atlassian/pipelines/agent/build/packages/api-healthcheck/tests/PostgreSqlHealthCheck.test.ts with @typescript-eslint/parser
...
15:11:35.075 INFO: EXECUTION FAILURE
15:11:35.075 INFO: ------------------------------------------------------------------------
15:11:35.076 INFO: Total time: 28:08.618s
15:11:35.124 INFO: Final Memory: 19M/74M
15:11:35.124 INFO: ------------------------------------------------------------------------
15:11:35.124 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Analysis of JS/TS files failed
at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:102)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:63)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:192)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:188)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:159)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:416)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.lang.IllegalStateException: The bridge server is unresponsive
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:415)
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.analyzeTypeScript(BridgeServerImpl.java:375)
at org.sonar.plugins.javascript.analysis.AbstractAnalysis.analyzeFile(AbstractAnalysis.java:110)
at org.sonar.plugins.javascript.analysis.AnalysisWithProgram.analyzeProgram(AnalysisWithProgram.java:137)
at org.sonar.plugins.javascript.analysis.AnalysisWithProgram.analyzeFiles(AnalysisWithProgram.java:90)
at org.sonar.plugins.javascript.analysis.JsTsSensor.analyzeFiles(JsTsSensor.java:128)
at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:77)
... 33 more
Caused by: java.net.http.HttpTimeoutException: request timed out
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:571)
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
at org.sonar.plugins.javascript.bridge.BridgeServerImpl.request(BridgeServerImpl.java:406)
... 39 more
15:11:35.126 ERROR:
15:11:35.126 ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
15:11:35.132 DEBUG: Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$290/0x00007f455c2fa400@c6634d during JVM shutdown