Error with the sonarsource/sonarcloud-scan pipe usage: Exceeded build time limit of 120 minutes

Hi,

I am using with success on multiple projects the pipe built specifically by SonarSource to integrate on BitBucket Pipelines: sonarsource/sonarcloud-scan

But I am having issue on a single project built with TypeScript.

Here is the step:

    - step: &backend-sonar
        name: sonar backend (sst)
        size: 2x
        caches:
          - node
          - sonar
        script:
          - yarn
          - cd packages/functions/
          - yarn coverage
          - pipe: sonarsource/sonarcloud-scan:2.0.0
            variables:
              EXTRA_ARGS: >
                -Dsonar.organization=gbandsmith
                -Dsonar.projectKey=ec2-leaser-backend
                -Dsonar.javascript.node.maxspace=2048
                -Dsonar.sources=src
                -Dsonar.tests=test
                -Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
                -Dsonar.testExecutionReportPaths=./sonar-report.xml
              SONAR_SCANNER_OPTS: -Xmx2048m
          - yarn lint

With this configuration I am ending up with the following log for the pipe step:


+ docker container run \
   --volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
   --volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
   --volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \
   --volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
   --volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan \
   --workdir=$(pwd) \
   --label=org.bitbucket.pipelines.system=true \
   --env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \
   --env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \
   --env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \
   --env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \
   --env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \
   --env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \
   --env=BITBUCKET_SSH_KEY_FILE="$BITBUCKET_SSH_KEY_FILE" \
   --env=BITBUCKET_PR_DESTINATION_COMMIT="$BITBUCKET_PR_DESTINATION_COMMIT" \
   --env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \
   --env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \
   --env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \
   --env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \
   --env=BITBUCKET_PARALLEL_STEP_COUNT="$BITBUCKET_PARALLEL_STEP_COUNT" \
   --env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \
   --env=CI="$CI" \
   --env=BITBUCKET_PR_ID="$BITBUCKET_PR_ID" \
   --env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \
   --env=BITBUCKET_PARALLEL_STEP="$BITBUCKET_PARALLEL_STEP" \
   --env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \
   --env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \
   --env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \
   --env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \
   --env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \
   --env=BITBUCKET_PR_DESTINATION_BRANCH="$BITBUCKET_PR_DESTINATION_BRANCH" \
   --env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \
   --env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \
   --env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \
   --env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \
   --env=DOCKER_HOST="tcp://host.docker.internal:2375" \
   --env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
   --env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan" \
   --env=EXTRA_ARGS="-Dsonar.organization=gbandsmith -Dsonar.projectKey=ec2-leaser-backend -Dsonar.javascript.node.maxspace=2048 -Dsonar.sources=src -Dsonar.tests=test -Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info -Dsonar.testExecutionReportPaths=./sonar-report.xml
" \
   --env=SONAR_SCANNER_OPTS="-Xmx2048m" \
   --env=SONAR_TOKEN="${SONAR_TOKEN}" \
   --add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
   sonarsource/sonarcloud-scan:2.0.0
Unable to find image 'sonarsource/sonarcloud-scan:2.0.0' locally
2.0.0: Pulling from sonarsource/sonarcloud-scan
f87c7e5d5d08: Pulling fs layer
eb9a2dd6bdd2: Pulling fs layer
a2651bae792a: Pulling fs layer
ca68756027db: Pulling fs layer
d20b8c544d92: Pulling fs layer
af3b70d825df: Pulling fs layer
681e6b1e0f6c: Pulling fs layer
26236eeeddcc: Pulling fs layer
d20b8c544d92: Waiting
af3b70d825df: Waiting
681e6b1e0f6c: Waiting
26236eeeddcc: Waiting
ca68756027db: Waiting
f87c7e5d5d08: Verifying Checksum
f87c7e5d5d08: Download complete
d20b8c544d92: Verifying Checksum
d20b8c544d92: Download complete
ca68756027db: Verifying Checksum
ca68756027db: Download complete
af3b70d825df: Download complete
681e6b1e0f6c: Verifying Checksum
681e6b1e0f6c: Download complete
26236eeeddcc: Verifying Checksum
26236eeeddcc: Download complete
eb9a2dd6bdd2: Verifying Checksum
eb9a2dd6bdd2: Download complete
f87c7e5d5d08: Pull complete
eb9a2dd6bdd2: Pull complete
a2651bae792a: Pull complete
ca68756027db: Pull complete
d20b8c544d92: Pull complete
af3b70d825df: Pull complete
681e6b1e0f6c: Pull complete
26236eeeddcc: Pull complete
Digest: sha256:f51e3d7ac9c469dbb5d114c1ed680f28374af4889b32a18eb23a1a8aaad4a4a4
Status: Downloaded newer image for sonarsource/sonarcloud-scan:2.0.0
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 5.0.1.3006
INFO: Java 17.0.8 Amazon.com Inc. (64-bit)
INFO: Linux 5.15.0-1040-aws amd64
INFO: SONAR_SCANNER_OPTS=-Xmx2048m
INFO: Bitbucket Cloud Pipelines detected, no host variable set. Defaulting to sonarcloud.io.
INFO: User cache: /root/.sonar/cache
INFO: Analyzing on SonarQube server 8.0.0.45575
INFO: Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=296ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=348ms
INFO: Load/download plugins (done) | time=2205ms
INFO: Loaded core extensions: developer-scanner
INFO: Found an active CI vendor: 'Bitbucket Pipelines'
INFO: No project and organization key detected from Bitbucket Cloud Pipelines because it is a monorepo.
INFO: Load project settings for component key: 'ec2-leaser-backend'
INFO: Load project settings for component key: 'ec2-leaser-backend' (done) | time=223ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=1ms
INFO: Project key: ec2-leaser-backend
INFO: Base dir: /opt/atlassian/pipelines/agent/build/packages/functions
INFO: Working dir: /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork
INFO: Load project branches
INFO: Load project branches (done) | time=263ms
INFO: Check ALM binding of project 'ec2-leaser-backend'
INFO: Detected project binding: BOUND
INFO: Check ALM binding of project 'ec2-leaser-backend' (done) | time=203ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=362ms
INFO: Load branch configuration
INFO: Detected analysis for pull request '158' targeting 'main'
INFO: Auto-configuring pull request 158
INFO: Load branch configuration (done) | time=380ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=307ms
INFO: Load active rules
INFO: Load active rules (done) | time=10880ms
INFO: Organization key: gbandsmith
INFO: Pull request 158 for merge into main from feature/LAB-590/switch-sonarcloud-scan-pipe
INFO: Load project repositories
INFO: Load project repositories (done) | time=268ms
INFO: SCM collecting changed files in the branch
INFO: SCM collecting changed files in the branch (done) | time=223ms
INFO: Indexing files...
INFO: Project configuration:
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO: 14 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for ts: Wiiisdom way
INFO: ------------- Run sensors on module ec2-leaser-backend
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=228ms
INFO: Sensor cache enabled
INFO: Load sensor cache
INFO: Load sensor cache (404) | time=312ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=1ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=10ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor HTML [web]
INFO: Sensor HTML is restricted to changed files only
INFO: Sensor HTML [web] (done) | time=2ms
INFO: Sensor TextAndSecretsSensor [text]
INFO: Sensor TextAndSecretsSensor is restricted to changed files only
INFO: Sensor TextAndSecretsSensor [text] (done) | time=284ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms
INFO: Sensor VB.NET Analysis Log [vbnet]
INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=11ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
INFO: Sensor JavaScript/TypeScript analysis [javascript]
INFO: Found 1 https://bitbucket.org/wiiisdom/ec2-leaser/src/0a29cde00080/tsconfig.json file(s): [/opt/atlassian/pipelines/agent/build/packages/functions/tsconfig.json]
INFO: Creating TypeScript program
INFO: TypeScript configuration file /opt/atlassian/pipelines/agent/build/packages/functions/tsconfig.json
INFO: 14 source files to be analyzed
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts

The pipeline is failing with the error: Exceeded build time limit of 120 minutes.

The previous step (yarn coverage) is working well.

How can I play with memory? I want to try to provide more memory to the pipe but I am failing on this. When I am adding more memory on SONAR_SCANNER_OPTS then I end with a different error: Container 'docker' exceeded memory limit. (tested with 3072m).

I found this topic which seems to be more or less the same issue but no response is provided in the thread :nerd_face::

Thanks for your help!

Hey there.

Thanks for the report.

Can you provide your tsconfig.json file here?

Hi :wave:

Thanks for the feedback, here is the link to the tsconfig.json file on the github repo:

The github repo main branch is synced from private bitbucket main branch.

Hello @julbrs,

can you try the solution proposed in this post?

Please let me know if that helps.

Cheers,
Victor

Hello victor, thanks a lot for the suggestion and the time spent on the subject!

I have tested the configuration.

I have created a tsconfig.sonar.json with the following:

{
  "compilerOptions": {
    "module": "ESNext",
    "target": "ESNext",
    "lib": ["DOM", "ESNext"],
    "strict": true,
    "noImplicitAny": false,
    "esModuleInterop": true,
    "jsx": "preserve",
    "skipLibCheck": true,
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "noUnusedLocals": true,
    "strictNullChecks": true,
    "allowJs": true
  },
  "include": ["src/**/*", "src/**/*.ts"]
}

Then I have modified a bit my Bitbucket Pipeline configuration:

    - step: &backend-sonar
        name: sonar backend (sst)
        size: 2x
        caches:
          - node
          - sonar
        script:
          - yarn
          - cd packages/functions/
          - yarn coverage
          - pipe: sonarsource/sonarcloud-scan:2.0.0
            variables:
              EXTRA_ARGS: >
                -Dsonar.organization=gbandsmith
                -Dsonar.projectKey=ec2-leaser-backend
                -Dsonar.javascript.node.maxspace=2048
                -Dsonar.typescript.tsconfigPaths=tsconfig.sonar.json
                -Dsonar.sources=src
                -Dsonar.tests=test
                -Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
                -Dsonar.testExecutionReportPaths=./sonar-report.xml
              SONAR_SCANNER_OPTS: -Xmx2048m
          - yarn lint

The log seems promising, but it fail with Container 'docker' exceeded memory limit.

+ umask 000

+ GIT_LFS_SKIP_SMUDGE=1 retry 6 git clone --branch="feature/LAB-590/switch-sonarcloud-scan-pipe" https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into '/opt/atlassian/pipelines/agent/build'...

+ git reset --hard 9926020c4be4
HEAD is now at 9926020 testing suggested change for sonar backend

+ git config user.name bitbucket-pipelines

+ git config user.email commits-noreply@bitbucket.org

+ git config push.default current

+ git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/

+ git remote set-url origin http://bitbucket.org/$BITBUCKET_REPO_FULL_NAME

+ git reflog expire --expire=all --all

+ echo ".bitbucket/pipelines/generated" >> .git/info/exclude

+ CONFLICT_EXIT_CODE=3

+ git merge 1a58e5a97dd7 --no-edit || exit $CONFLICT_EXIT_CODE
Auto-merging https://bitbucket.org/wiiisdom/ec2-leaser/src/9926020c4be4/yarn.lock
Merge made by the 'ort' strategy.
 https://bitbucket.org/wiiisdom/ec2-leaser/src/9926020c4be4/yarn.lock | 2176 +++++++++++++++++++++++++++++++------------------------------
 1 file changed, 1112 insertions(+), 1064 deletions(-)

+ chmod 777 $BUILD_DIR


Cache "node: node_modules": Downloading
Cache "node: node_modules": Downloaded 179.8 MiB in 7 seconds
Cache "node: node_modules": Extracting
Cache "node: node_modules": Extracted in 13 seconds
Cache "sonar: ~/.sonar/cache": Downloading
Cache "sonar: ~/.sonar/cache": Downloaded 289 MiB in 7 seconds
Cache "sonar: ~/.sonar/cache": Extracting
Cache "sonar: ~/.sonar/cache": Extracted in 3 seconds

Default variables:
    BITBUCKET_BRANCH
    BITBUCKET_BUILD_NUMBER
    BITBUCKET_CLONE_DIR
    BITBUCKET_COMMIT
    BITBUCKET_GIT_HTTP_ORIGIN
    BITBUCKET_GIT_SSH_ORIGIN
    BITBUCKET_PARALLEL_STEP
    BITBUCKET_PARALLEL_STEP_COUNT
    BITBUCKET_PIPELINE_UUID
    BITBUCKET_PROJECT_KEY
    BITBUCKET_PROJECT_UUID
    BITBUCKET_PR_DESTINATION_BRANCH
    BITBUCKET_PR_DESTINATION_COMMIT
    BITBUCKET_PR_ID
    BITBUCKET_REPO_FULL_NAME
    BITBUCKET_REPO_IS_PRIVATE
    BITBUCKET_REPO_OWNER
    BITBUCKET_REPO_OWNER_UUID
    BITBUCKET_REPO_SLUG
    BITBUCKET_REPO_UUID
    BITBUCKET_SSH_KEY_FILE
    BITBUCKET_STEP_RUN_NUMBER
    BITBUCKET_STEP_TRIGGERER_UUID
    BITBUCKET_STEP_UUID
    BITBUCKET_WORKSPACE
    CI
    DOCKER_HOST
    PIPELINES_JWT_TOKEN

Workspace variables:
    ART_PASSWORD
    ART_USERNAME
    DTRACK_API_KEY
    DTRACK_URL
    REPORT_PORTAL_ENDPOINT
    REPORT_PORTAL_TOKEN
    SONAR_HOST_URL
    SONAR_ORGANIZATION

Repository variables:
    DTRACK_BACKEND_ID
    DTRACK_FRONTEND_ID
    SONAR_TOKEN

Images used:
    build : docker.io/library/node@sha256:11e9c297fc51f6f65f7d0c7c8a8581e5721f2f16de43ceff1a199fd3ef609f95
+ yarn
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "workspace-aggregator-575a6a64-54be-44bb-8083-d46944ef15a6 > @ec2-leaser/functions > @typescript-eslint/eslint-plugin@6.4.1" has unmet peer dependency "@typescript-eslint/parser@^6.0.0 || ^6.0.0-alpha".
warning "workspace-aggregator-575a6a64-54be-44bb-8083-d46944ef15a6 > @ec2-leaser/functions > eslint-config-standard-with-typescript@37.0.0" has incorrect peer dependency "@typescript-eslint/eslint-plugin@^5.52.0".
warning "workspace-aggregator-575a6a64-54be-44bb-8083-d46944ef15a6 > @ec2-leaser/frontend > @testing-library/user-event@14.4.3" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning "workspace-aggregator-575a6a64-54be-44bb-8083-d46944ef15a6 > @ec2-leaser/frontend > aws-amplify > @aws-amplify/core > react-native-url-polyfill@1.3.0" has unmet peer dependency "react-native@*".
warning "workspace-aggregator-575a6a64-54be-44bb-8083-d46944ef15a6 > @ec2-leaser/frontend > aws-amplify > @aws-amplify/analytics > @aws-sdk/client-firehose > @aws-sdk/middleware-retry > react-native-get-random-values@1.9.0" has unmet peer dependency "react-native@>=0.56".
[4/4] Building fresh packages...
Done in 176.63s.

+ cd packages/functions/

+ yarn coverage
yarn run v1.22.19
warning package.json: No license field
$ vitest run --reporter vitest-sonar-reporter --coverage
SonarQube report written to /opt/atlassian/pipelines/agent/build/packages/functions/sonar-report.xml
e[34m % e[39me[2mCoverage report from e[22me[33mv8e[39m
----------------|---------|----------|---------|---------|-------------------
File            | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
----------------|---------|----------|---------|---------|-------------------
All files       |   66.15 |    96.42 |    62.5 |   66.15 |                   
 bot            |   34.56 |    88.88 |   66.66 |   34.56 |                   
  googleChat.ts |   34.56 |    88.88 |   66.66 |   34.56 | 12-59,62-66       
 bot/ec2        |     100 |      100 |     100 |     100 |                   
  restore.ts    |     100 |      100 |     100 |     100 |                   
  snapshot.ts   |     100 |      100 |     100 |     100 |                   
 bot/google     |      20 |      100 |       0 |      20 |                   
  auth.ts       |      20 |      100 |       0 |      20 | 8-13,16-45        
 errors         |     100 |      100 |     100 |     100 |                   
  index.ts      |     100 |      100 |     100 |     100 |                   
----------------|---------|----------|---------|---------|-------------------
Done in 2.69s.

+ docker container run \
   --volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
   --volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
   --volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \
   --volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
   --volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan \
   --workdir=$(pwd) \
   --label=org.bitbucket.pipelines.system=true \
   --env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \
   --env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \
   --env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \
   --env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \
   --env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \
   --env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \
   --env=BITBUCKET_SSH_KEY_FILE="$BITBUCKET_SSH_KEY_FILE" \
   --env=BITBUCKET_PR_DESTINATION_COMMIT="$BITBUCKET_PR_DESTINATION_COMMIT" \
   --env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \
   --env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \
   --env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \
   --env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \
   --env=BITBUCKET_PARALLEL_STEP_COUNT="$BITBUCKET_PARALLEL_STEP_COUNT" \
   --env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \
   --env=CI="$CI" \
   --env=BITBUCKET_PR_ID="$BITBUCKET_PR_ID" \
   --env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \
   --env=BITBUCKET_PARALLEL_STEP="$BITBUCKET_PARALLEL_STEP" \
   --env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \
   --env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \
   --env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \
   --env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \
   --env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \
   --env=BITBUCKET_PR_DESTINATION_BRANCH="$BITBUCKET_PR_DESTINATION_BRANCH" \
   --env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \
   --env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \
   --env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \
   --env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \
   --env=DOCKER_HOST="tcp://host.docker.internal:2375" \
   --env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
   --env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan" \
   --env=EXTRA_ARGS="-Dsonar.organization=gbandsmith -Dsonar.projectKey=ec2-leaser-backend -Dsonar.javascript.node.maxspace=2048 -Dsonar.typescript.tsconfigPaths=tsconfig.sonar.json -Dsonar.sources=src -Dsonar.tests=test -Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info -Dsonar.testExecutionReportPaths=./sonar-report.xml
" \
   --env=SONAR_SCANNER_OPTS="-Xmx2048m" \
   --env=SONAR_TOKEN="${SONAR_TOKEN}" \
   --add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
   sonarsource/sonarcloud-scan:2.0.0
Unable to find image 'sonarsource/sonarcloud-scan:2.0.0' locally
2.0.0: Pulling from sonarsource/sonarcloud-scan
f87c7e5d5d08: Pulling fs layer
eb9a2dd6bdd2: Pulling fs layer
a2651bae792a: Pulling fs layer
ca68756027db: Pulling fs layer
d20b8c544d92: Pulling fs layer
af3b70d825df: Pulling fs layer
681e6b1e0f6c: Pulling fs layer
26236eeeddcc: Pulling fs layer
d20b8c544d92: Waiting
af3b70d825df: Waiting
681e6b1e0f6c: Waiting
26236eeeddcc: Waiting
a2651bae792a: Verifying Checksum
a2651bae792a: Download complete
f87c7e5d5d08: Download complete
d20b8c544d92: Verifying Checksum
d20b8c544d92: Download complete
ca68756027db: Verifying Checksum
ca68756027db: Download complete
681e6b1e0f6c: Verifying Checksum
681e6b1e0f6c: Download complete
af3b70d825df: Verifying Checksum
af3b70d825df: Download complete
26236eeeddcc: Verifying Checksum
26236eeeddcc: Download complete
eb9a2dd6bdd2: Verifying Checksum
eb9a2dd6bdd2: Download complete
f87c7e5d5d08: Pull complete
eb9a2dd6bdd2: Pull complete
a2651bae792a: Pull complete
ca68756027db: Pull complete
d20b8c544d92: Pull complete
af3b70d825df: Pull complete
681e6b1e0f6c: Pull complete
26236eeeddcc: Pull complete
Digest: sha256:f51e3d7ac9c469dbb5d114c1ed680f28374af4889b32a18eb23a1a8aaad4a4a4
Status: Downloaded newer image for sonarsource/sonarcloud-scan:2.0.0
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 5.0.1.3006
INFO: Java 17.0.8 Amazon.com Inc. (64-bit)
INFO: Linux 5.15.0-1040-aws amd64
INFO: SONAR_SCANNER_OPTS=-Xmx2048m
INFO: Bitbucket Cloud Pipelines detected, no host variable set. Defaulting to sonarcloud.io.
INFO: User cache: /root/.sonar/cache
INFO: Analyzing on SonarQube server 8.0.0.45690
INFO: Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=317ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=288ms
INFO: Load/download plugins (done) | time=2721ms
INFO: Loaded core extensions: developer-scanner
INFO: Found an active CI vendor: 'Bitbucket Pipelines'
INFO: No project and organization key detected from Bitbucket Cloud Pipelines because it is a monorepo.
INFO: Load project settings for component key: 'ec2-leaser-backend'
INFO: Load project settings for component key: 'ec2-leaser-backend' (done) | time=277ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=2ms
INFO: Project key: ec2-leaser-backend
INFO: Base dir: /opt/atlassian/pipelines/agent/build/packages/functions
INFO: Working dir: /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork
INFO: Load project branches
INFO: Load project branches (done) | time=246ms
INFO: Check ALM binding of project 'ec2-leaser-backend'
INFO: Detected project binding: BOUND
INFO: Check ALM binding of project 'ec2-leaser-backend' (done) | time=249ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=431ms
INFO: Load branch configuration
INFO: Detected analysis for pull request '158' targeting 'main'
INFO: Auto-configuring pull request 158
INFO: Load branch configuration (done) | time=394ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=350ms
INFO: Load active rules
INFO: Load active rules (done) | time=13900ms
INFO: Organization key: gbandsmith
INFO: Pull request 158 for merge into main from feature/LAB-590/switch-sonarcloud-scan-pipe
INFO: Load project repositories
INFO: Load project repositories (done) | time=247ms
INFO: SCM collecting changed files in the branch
INFO: SCM collecting changed files in the branch (done) | time=267ms
INFO: Indexing files...
INFO: Project configuration:
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO: 14 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for ts: Wiiisdom way
INFO: ------------- Run sensors on module ec2-leaser-backend
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=245ms
INFO: Sensor cache enabled
INFO: Load sensor cache
INFO: Load sensor cache (404) | time=543ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=10ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor HTML [web]
INFO: Sensor HTML is restricted to changed files only
INFO: Sensor HTML [web] (done) | time=2ms
INFO: Sensor TextAndSecretsSensor [text]
INFO: Sensor TextAndSecretsSensor is restricted to changed files only
INFO: Sensor TextAndSecretsSensor [text] (done) | time=317ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms
INFO: Sensor VB.NET Analysis Log [vbnet]
INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=13ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
INFO: Sensor JavaScript/TypeScript analysis [javascript]
INFO: Resolving TSConfig files using 'tsconfig.sonar.json' from property sonar.typescript.tsconfigPaths
INFO: Found 1 TSConfig file(s): [/opt/atlassian/pipelines/agent/build/packages/functions/tsconfig.sonar.json]
INFO: Creating TypeScript program
INFO: TypeScript configuration file /opt/atlassian/pipelines/agent/build/packages/functions/tsconfig.sonar.json
INFO: 14 source files to be analyzed
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
time="2023-08-29T14:11:44Z" level=error msg="error waiting for container: unexpected EOF"

I don’t understand why it tries multiple time to scan the same LaunchTemplate.ts file?

Thanks!!

Hi @julbrs,

seems your folder structure does not match the includes on the tsconfig.sonar.json. If I understood correctly, it should point to the packages folder:

{
  "compilerOptions": {
    "module": "ESNext",
    "target": "ESNext",
    "lib": ["DOM", "ESNext"],
    "strict": true,
    "noImplicitAny": false,
    "esModuleInterop": true,
    "jsx": "preserve",
    "skipLibCheck": true,
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "noUnusedLocals": true,
    "strictNullChecks": true,
    "allowJs": true
  },
  "include": ["packages/**/*", "packages/**/*.ts"]
}

About the logs, it’s not that it’s trying to analyze multiple times the same file, but that the background node process which is actually analyzing the file has probably crashed due to lack of memory, and the scanner is trying to get an answer from it.

Please let me know if fixing the paths works.

Cheers,
Victor

Hi,

My tsconfig.sonar.json is located in /packages/functions next to the actual tsconfig.json so I think it’s the correct one :wink:

Oh, then you are right.

Can you please enable debug logs (sonar.verbose=true) and share them?

Sure! here is the result after enabling debug (only the last lines to avoid hitting the forum post limit)

17:08:17.566 DEBUG: file=/root/.config/jgit/config.lock, create new FileSnapshot: lastRead=2023-08-29 17:08:17.566049206, lastModified=2023-08-29 17:08:17.559829287, size=127, fileKey=(dev=100035,ino=9456595)
17:08:20.143 DEBUG: Added 277 checks for language='ts', repository='typescript'
17:08:20.149 DEBUG: Added 15 checks for language='ts', repository='tssecurity'
17:08:20.156 DEBUG: Added 282 checks for language='js', repository='javascript'
17:08:20.157 DEBUG: Added 15 checks for language='js', repository='jssecurity'
17:08:20.791 DEBUG: 'JavaSensor' skipped because there is no related file in current project
17:08:20.792 DEBUG: 'CobolSquidSensor' skipped because there is no related file in current project
17:08:20.792 DEBUG: 'Import external issues report' skipped because one of the required properties is missing
17:08:20.793 DEBUG: 'IaC Terraform Sensor' skipped because there is no related file in current project
17:08:20.795 DEBUG: 'IaC CloudFormation Sensor' skipped because there is no related file in current project
17:08:20.795 DEBUG: 'IaC Kubernetes Sensor' skipped because there is no related file in current project
17:08:20.795 DEBUG: 'IaC AzureResourceManager Sensor' skipped because there is no related file in current project
17:08:20.796 DEBUG: 'PL/SQL Sensor' skipped because there is no related file in current project
17:08:20.796 DEBUG: 'Scala Sensor' skipped because there is no related file in current project
17:08:20.797 DEBUG: 'Scoverage sensor for Scala coverage' skipped because there is no related file in current project
17:08:20.797 DEBUG: 'Import of Scalastyle issues' skipped because there is no related file in current project
17:08:20.797 DEBUG: 'Import of Scapegoat issues' skipped because there is no related file in current project
17:08:20.798 DEBUG: 'Import of Checkstyle issues' skipped because there is no related file in current project
17:08:20.798 DEBUG: 'Import of PMD issues' skipped because there is no related file in current project
17:08:20.798 DEBUG: 'Import of SpotBugs issues' skipped because there is no related file in current project
17:08:20.798 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
17:08:20.799 DEBUG: 'Removed properties sensor' skipped because there is no related file in current project
17:08:20.799 DEBUG: 'Flex' skipped because there is no related file in current project
17:08:20.799 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
17:08:20.800 DEBUG: 'XML Sensor' skipped because there is no related file in current project
17:08:20.800 DEBUG: 'Swift Code Quality and Security' skipped because there is no related file in current project
17:08:20.801 DEBUG: 'Import of SwiftLint issues' skipped because there is no related file in current project
17:08:20.801 DEBUG: 'gcov' skipped because there is no related file in current project
17:08:20.802 DEBUG: 'llvm-cov' skipped because there is no related file in current project
17:08:20.802 DEBUG: 'cppunit' skipped because there is no related file in current project
17:08:20.802 DEBUG: 'VisualStudioCoverage' skipped because there is no related file in current project
17:08:20.803 DEBUG: 'bullseye' skipped because there is no related file in current project
17:08:20.803 DEBUG: 'cobertura' skipped because there is no related file in current project
17:08:20.803 DEBUG: 'Valgrind' skipped because there is no related file in current project
17:08:20.804 DEBUG: 'Python Sensor' skipped because there is no related file in current project
17:08:20.804 DEBUG: 'Cobertura Sensor for Python coverage' skipped because there is no related file in current project
17:08:20.804 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
17:08:20.805 DEBUG: 'Import of Pylint issues' skipped because there is no related file in current project
17:08:20.805 DEBUG: 'Import of Bandit issues' skipped because there is no related file in current project
17:08:20.805 DEBUG: 'Import of Flake8 issues' skipped because there is no related file in current project
17:08:20.805 DEBUG: 'Import of Mypy issues' skipped because there is no related file in current project
17:08:20.805 DEBUG: 'Import of Ruff issues' skipped because there is no related file in current project
17:08:20.805 DEBUG: 'Code Quality and Security for Go' skipped because there is no related file in current project
17:08:20.805 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project
17:08:20.806 DEBUG: 'Go Cover sensor for Go coverage' skipped because one of the required properties is missing
17:08:20.807 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project
17:08:20.807 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project
17:08:20.807 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project
17:08:20.807 DEBUG: 'Import of GolangCI-Lint issues' skipped because there is no related file in current project
17:08:20.810 DEBUG: 'Kotlin Sensor' skipped because there is no related file in current project
17:08:20.810 DEBUG: 'KotlinSurefireSensor' skipped because there is no related file in current project
17:08:20.810 DEBUG: 'Import of detekt issues' skipped because there is no related file in current project
17:08:20.812 DEBUG: 'Import of Android Lint issues' skipped because one of the required properties is missing
17:08:20.812 DEBUG: 'Import of ktlint issues' skipped because there is no related file in current project
17:08:20.812 DEBUG: 'T-SQL Sensor' skipped because there is no related file in current project
17:08:20.812 DEBUG: 'Apex Sensor' skipped because there is no related file in current project
17:08:20.812 DEBUG: 'Test coverage Sensor for Apex' skipped because there is no related file in current project
17:08:20.813 DEBUG: 'Import of PMD issues' skipped because there is no related file in current project
17:08:20.813 DEBUG: 'JavaScript inside YAML analysis' skipped because there is no related file in current project
17:08:20.815 DEBUG: 'JavaScript inside HTML analysis' skipped because there is no related file in current project
17:08:20.816 DEBUG: 'Import of ESLint issues' skipped because one of the required properties is missing
17:08:20.816 DEBUG: 'Import of TSLint issues' skipped because one of the required properties is missing
17:08:20.816 DEBUG: 'CSS Metrics' skipped because there is no related file in current project
17:08:20.817 DEBUG: 'Import of stylelint issues' skipped because there is no related file in current project
17:08:20.817 DEBUG: 'Ruby Sensor' skipped because there is no related file in current project
17:08:20.817 DEBUG: 'Import of RuboCop issues' skipped because there is no related file in current project
17:08:20.818 DEBUG: 'SimpleCov Sensor for Ruby coverage' skipped because there is no related file in current project
17:08:20.818 DEBUG: 'Python HTML templates processing' skipped because there is no related file in current project
17:08:20.818 DEBUG: 'PHP sensor' skipped because there is no related file in current project
17:08:20.818 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
17:08:20.818 DEBUG: 'PHPUnit report sensor' skipped because there is no related file in current project
17:08:20.818 DEBUG: 'Import of PHPStan issues' skipped because there is no related file in current project
17:08:20.818 DEBUG: 'Import of Psalm issues' skipped because there is no related file in current project
17:08:20.819 DEBUG: 'AbapSquidSensor' skipped because there is no related file in current project
17:08:20.830 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
17:08:20.831 DEBUG: 'CFamily' skipped because there is no related file in current project
17:08:20.832 DEBUG: Sensors : C# Project Type Information -> C# Analysis Log -> C# Properties -> HTML -> TextAndSecretsSensor -> VB.NET Project Type Information -> VB.NET Analysis Log -> VB.NET Properties -> JaCoCo XML Report Importer -> JavaScript/TypeScript analysis -> CSS Rules -> JavaScript/TypeScript Coverage -> ThymeLeaf template sensor -> IaC Docker Sensor -> Serverless configuration file sensor -> AWS SAM template file sensor -> AWS SAM Inline template file sensor -> Generic Test Executions Report -> javabugs -> pythonbugs -> JavaSecuritySensor -> CSharpSecuritySensor -> PhpSecuritySensor -> PythonSecuritySensor -> JsSecuritySensor
17:08:20.833 INFO: Sensor C# Project Type Information [csharp]
17:08:20.834 INFO: Sensor C# Project Type Information [csharp] (done) | time=1ms
17:08:20.835 INFO: Sensor C# Analysis Log [csharp]
17:08:20.845 INFO: Sensor C# Analysis Log [csharp] (done) | time=10ms
17:08:20.846 INFO: Sensor C# Properties [csharp]
17:08:20.846 DEBUG: Project 'ec2-leaser-backend': No Roslyn issues reports have been found.
17:08:20.846 INFO: Sensor C# Properties [csharp] (done) | time=0ms
17:08:20.846 INFO: Sensor HTML [web]
17:08:20.846 INFO: Sensor HTML is restricted to changed files only
17:08:20.848 INFO: Sensor HTML [web] (done) | time=2ms
17:08:20.848 INFO: Sensor TextAndSecretsSensor [text]
17:08:20.849 INFO: Sensor TextAndSecretsSensor is restricted to changed files only
17:08:21.291 INFO: Sensor TextAndSecretsSensor [text] (done) | time=443ms
17:08:21.291 INFO: Sensor VB.NET Project Type Information [vbnet]
17:08:21.292 INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms
17:08:21.293 INFO: Sensor VB.NET Analysis Log [vbnet]
17:08:21.316 INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=23ms
17:08:21.319 INFO: Sensor VB.NET Properties [vbnet]
17:08:21.319 DEBUG: Project 'ec2-leaser-backend': No Roslyn issues reports have been found.
17:08:21.320 INFO: Sensor VB.NET Properties [vbnet] (done) | time=1ms
17:08:21.320 INFO: Sensor JaCoCo XML Report Importer [jacoco]
17:08:21.321 INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
17:08:21.322 INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
17:08:21.323 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=3ms
17:08:21.323 INFO: Sensor JavaScript/TypeScript analysis [javascript]
17:08:21.328 DEBUG: Deploying bundle
17:08:21.328 DEBUG: Deploying the bridge into /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/.sonartmp/bridge-bundle
17:08:23.266 DEBUG: Deploying bundle (done) | time=1938ms
17:08:23.266 DEBUG: Deploying custom rules bundle jar:file:/root/.sonar/cache/559415e9bd1f55589c0d05cd657381a4/sonar-securityjsfrontend-plugin.jar!/js-vulnerabilities-rules-1.0.0.tgz to /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules12726730660899959144
17:08:23.271 DEBUG: Starting server
17:08:23.280 DEBUG: Using default Node.js executable: 'node'.
17:08:23.281 DEBUG: Checking Node.js version
17:08:23.281 DEBUG: Launching command node -v
17:08:23.340 DEBUG: Using Node.js v18.17.0.
17:08:23.340 DEBUG: Starting Node.js process to start the bridge server at port 37751
17:08:23.340 DEBUG: Launching command node --max-old-space-size=2048 /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/.sonartmp/bridge-bundle/package/bin/server 37751 127.0.0.1 /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork true false /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules12726730660899959144/package
17:08:26.094 DEBUG: Context set with {"workDir":"/opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork","shouldUseTypeScriptParserForJS":true,"sonarlint":false,"bundles":["/opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules12726730660899959144/package"]}
17:08:26.094 DEBUG: starting the bridge server at port 37751
17:08:26.107 DEBUG: the bridge server is running at port 37751
17:08:26.232 DEBUG: Starting server (done) | time=2961ms
17:08:26.238 DEBUG: Files which didn't change will be part of UCFG generation only, other rules will not be executed
17:08:26.271 DEBUG: Initializing linter "default" with no-vue-bypass-sanitization,hashing,for-loop-increment-sign,accessor-pairs,no-globals-shadowing,no-undefined-assignment,null-dereference,unverified-hostname,sonar-max-lines-per-function,no-extra-arguments,too-many-break-or-continue-in-loop,nested-control-flow,no-redeclare,constructor-for-side-effects,switch-without-default,post-message,cookie-no-httponly,weak-ssl,no-useless-increment,no-throw-literal,no-ignored-exceptions,pseudo-random,no-use-of-empty-return-value,session-regeneration,no-associative-arrays,no-weak-keys,confidential-information-logging,no-ip-forward,single-character-alternation,unused-named-groups,aws-ec2-unencrypted-ebs-volume,single-char-in-character-classes,dns-prefetching,arguments-order,inconsistent-function-call,no-same-argument-assert,certificate-transparency,file-uploads,no-inverted-boolean-check,sonar-no-misleading-character-class,variable-name,no-nested-switch,duplicates-in-character-class,todo-tag,fixme-tag,aws-s3-bucket-public-access,no-continue,aws-s3-bucket-granted-access,no-mixed-content,anchor-precedence,frame-ancestors,no-angular-bypass-sanitization,array-callback-without-return,slow-regex,prefer-default-last,no-mime-sniff,elseif-without-else,no-commented-code,no-gratuitous-expressions,no-empty-pattern,no-referrer-policy,sonar-no-fallthrough,sonar-no-invalid-regexp,file-name-differ-from-class,curly,strict-transport-security,aws-iam-public-access,no-unsafe-finally,prefer-while,sonar-no-unused-vars,index-of-compare-to-positive-number,argument-type,empty-string-repetition,in-operator-type-error,no-template-curly-in-string,prefer-promise-shorthand,regex-complexity,prefer-immediate-return,no-empty-after-reluctant,assertions-in-tests,no-intrusive-permissions,disabled-resource-integrity,content-security-policy,no-labels,no-shadow,no-uniq-key,aws-s3-bucket-server-encryption,no-unenclosed-multiline-block,call-argument-line,aws-s3-bucket-insecure-http,generator-without-yield,no-ignored-return,no-caller,csrf,cognitive-complexity,use-isnan,no-nested-template-literals,inverted-assertion-arguments,max-switch-cases,test-check-exception,no-wildcard-import,production-debug,unused-import,prefer-single-boolean-return,no-redundant-boolean,no-nested-assignment,aws-s3-bucket-versioning,no-unsafe-unzip,sonar-prefer-regexp-exec,concise-regex,no-array-index-key,non-number-in-arithmetic-expression,jsx-key,updated-loop-counter,no-setter-return,link-with-target-blank,no-unstable-nested-components,no-incorrect-string-concat,different-types-comparison,class-prototype,no-case-label-in-switch,no-in-misuse,jsx-no-constructed-context-values,no-misleading-array-reverse,no-redundant-assignments,prefer-template,os-command,no-built-in-override,arguments-usage,destructuring-assignment-syntax,operation-returning-nan,values-not-convertible-to-numbers,radix,no-invariant-returns,prefer-object-literal,no-parameter-reassignment,stateful-regex,aws-efs-unencrypted,aws-apigateway-public-api,aws-sqs-unencrypted-queue,no-accessor-field-mismatch,cors,no-empty-group,no-os-command-from-path,no-collection-size-mischeck,eqeqeq,unverified-certificate,no-empty-collection,disabled-auto-escaping,updated-const-var,no-duplicate-imports,no-unthrown-error,no-var,no-redundant-jump,no-octal,no-hardcoded-ip,sonar-prefer-optional-chain,no-hook-setter-in-body,aws-restricted-ip-admin-access,no-useless-react-setstate,no-identical-functions,rules-of-hooks,no-element-overwrite,sonar-no-unused-class-component-methods,prefer-regex-literals,sonar-no-regex-spaces,no-empty-alternatives,no-same-line-conditional,sonar-no-control-regex,aws-ec2-rds-dms-public,aws-sns-unencrypted-topics,super-invocation,no-try-promise,existing-groups,void-use,comma-or-logical-or-case,label-position,no-with,insecure-cookie,no-unused-collection,no-extraneous-class,no-base-to-string,no-sequences,require-render-return,sql-queries,no-global-this,prefer-string-starts-ends-with,no-array-delete,no-alphabetical-sort,cyclomatic-complexity,sonar-jsx-no-leaked-render,no-for-in-iterable,prefer-for-of,aws-sagemaker-unencrypted-notebook,jsx-no-comment-textnodes,aws-iam-privilege-escalation,xml-parser-xxe,default-param-last,non-existent-operator,new-operator-misuse,sonar-no-empty-character-class,no-sparse-arrays,content-length,no-clear-text-protocols,aws-rds-unencrypted-databases,no-invalid-await,no-equals-in-for-termination,no-infinite-loop,no-hardcoded-credentials,valid-typeof,no-misused-promises,aws-iam-all-privileges,aws-opensearchservice-domain,no-primitive-wrappers,no-exclusive-tests,sonar-no-dupe-keys,no-nested-incdec,no-self-assign,for-in,no-new-native-nonconstructor,no-dupe-args,strict,no-small-switch,no-loss-of-precision,unnecessary-character-escapes,publicly-writable-directories,no-incomplete-assertions,x-powered-by,no-unreachable,no-identical-expressions,file-permissions,code-eval,no-variable-usage-before-declaration,no-useless-catch,future-reserved-words,array-constructor,no-reference-error,bitwise-operators,hidden-files,no-unused-expressions,no-empty,no-unsafe-optional-chaining,sonar-max-params,object-shorthand,no-magic-numbers,shorthand-property-grouping,no-duplicated-branches,sonar-max-lines,no-one-iteration-loop,misplaced-loop-counter,no-console,deprecation,no-unsafe-negation,function-name,function-inside-loop,no-multi-str,class-name,chai-determinate-assertion,no-code-after-done,sonar-block-scoped-var,no-delete-var,encryption-secure-mode,strings-comparison,no-weak-cipher,no-identical-conditions,function-return-type,no-inconsistent-returns,no-all-duplicated-branches,disabled-timeout,no-unused-function-argument,no-duplicate-string,prefer-const,no-return-await,no-nested-conditional,insecure-jwt-token,no-extra-boolean-cast,no-dead-store,no-implicit-global,expression-complexity,no-collapsible-if,no-empty-function,curly,elseif-without-else,no-commented-code,sonar-no-fallthrough,no-inverted-boolean-check,duplicates-in-character-class,file-uploads,sonar-no-misleading-character-class,no-nested-switch,dns-prefetching,arguments-order,no-same-argument-assert,certificate-transparency,single-char-in-character-classes,aws-ec2-unencrypted-ebs-volume,unused-named-groups,no-unsafe-finally,prefer-while,single-character-alternation,aws-iam-public-access,too-many-break-or-continue-in-loop,nested-control-flow,sonar-max-lines-per-function,prefer-nullish-coalescing,no-ip-forward,no-use-of-empty-return-value,session-regeneration,no-associative-arrays,switch-without-default,no-weak-keys,confidential-information-logging,weak-ssl,no-useless-increment,no-throw-literal,no-ignored-exceptions,pseudo-random,no-redundant-optional,cookie-no-httponly,aws-s3-bucket-public-access,post-message,constructor-for-side-effects,no-globals-shadowing,no-undefined-assignment,unverified-hostname,accessor-pairs,hashing,for-loop-increment-sign,no-vue-bypass-sanitization,no-extra-boolean-cast,no-return-await,no-unnecessary-type-assertion,no-nested-conditional,insecure-jwt-token,no-this-alias,no-dead-store,prefer-const,prefer-type-guard,use-type-alias,no-in-misuse,no-parameter-reassignment,no-incorrect-string-concat,class-prototype,no-unstable-nested-components,prefer-function-type,jsx-key,updated-loop-counter,no-array-index-key,link-with-target-blank,concise-regex,sonar-prefer-regexp-exec,prefer-as-const,stateful-regex,test-check-exception,max-switch-cases,no-wildcard-import,production-debug,no-undefined-argument,no-require-or-define,csrf,cognitive-complexity,no-labels,use-isnan,no-nested-template-literals,no-shadow,inverted-assertion-arguments,no-duplicate-in-composite,aws-s3-bucket-insecure-http,generator-without-yield,no-ignored-return,no-caller,aws-s3-bucket-server-encryption,no-unenclosed-multiline-block,call-argument-line,no-uniq-key,jsx-no-constructed-context-values,prefer-immediate-return,no-redundant-boolean,content-security-policy,no-template-curly-in-string,prefer-promise-shorthand,regex-complexity,no-empty-after-reluctant,assertions-in-tests,no-intrusive-permissions,disabled-resource-integrity,unused-import,empty-string-repetition,no-nested-assignment,index-of-compare-to-positive-number,no-unsafe-unzip,aws-s3-bucket-versioning,file-name-differ-from-class,todo-tag,strict-transport-security,prefer-default-last,no-mime-sniff,no-gratuitous-expressions,no-empty-pattern,no-referrer-policy,sonar-no-invalid-regexp,no-mixed-content,no-angular-bypass-sanitization,anchor-precedence,frame-ancestors,slow-regex,fixme-tag,aws-s3-bucket-granted-access,no-nested-incdec,sonar-no-empty-character-class,non-existent-operator,new-operator-misuse,no-small-switch,no-for-in-iterable,jsx-no-comment-textnodes,aws-iam-privilege-escalation,prefer-for-of,aws-sagemaker-unencrypted-notebook,sonar-jsx-no-leaked-render,xml-parser-xxe,default-param-last,sql-queries,no-global-this,no-array-delete,prefer-string-starts-ends-with,no-alphabetical-sort,require-render-return,cyclomatic-complexity,prefer-literal-enum-member,no-sequences,void-use,no-octal,no-hardcoded-ip,comma-or-logical-or-case,existing-groups,label-position,no-unnecessary-type-constraint,aws-sns-unencrypted-topics,super-invocation,no-try-promise,aws-ec2-rds-dms-public,sonar-no-control-regex,prefer-return-this-type,no-empty-alternatives,sonar-no-regex-spaces,no-confusing-non-null-assertion,no-same-line-conditional,prefer-regex-literals,sonar-no-unused-class-component-methods,rules-of-hooks,redundant-type-aliases,no-useless-react-setstate,no-identical-functions,no-hook-setter-in-body,no-element-overwrite,aws-restricted-ip-admin-access,no-equals-in-for-termination,no-sparse-arrays,no-var,no-redundant-jump,no-duplicate-imports,no-unthrown-error,no-os-command-from-path,prefer-namespace-keyword,no-collection-size-mischeck,unverified-certificate,no-empty-collection,no-duplicate-enum-values,disabled-auto-escaping,no-empty-group,prefer-enum-initializers,aws-sqs-unencrypted-queue,eqeqeq,aws-apigateway-public-api,no-accessor-field-mismatch,cors,aws-efs-unencrypted,insecure-cookie,no-redundant-type-constituents,no-unused-collection,no-extraneous-class,radix,no-invariant-returns,no-case-label-in-switch,prefer-template,os-command,no-built-in-override,arguments-usage,destructuring-assignment-syntax,no-misleading-array-reverse,no-mixed-enums,no-redundant-assignments,sonar-prefer-optional-chain,no-inconsistent-returns,no-all-duplicated-branches,no-identical-conditions,no-weak-cipher,no-delete-var,encryption-secure-mode,no-useless-intersection,strings-comparison,sonar-block-scoped-var,expression-complexity,no-collapsible-if,no-empty-function,no-code-after-done,no-unsafe-negation,deprecation,misplaced-loop-counter,no-one-iteration-loop,no-multi-str,function-inside-loop,no-import-assign,object-shorthand,shorthand-property-grouping,no-unsafe-optional-chaining,no-duplicated-branches,no-duplicate-string,disabled-timeout,function-name,bitwise-operators,class-name,array-constructor,sonar-max-lines,no-console,code-eval,no-identical-expressions,no-unreachable,no-useless-catch,x-powered-by,no-variable-usage-before-declaration,file-permissions,publicly-writable-directories,unnecessary-character-escapes,no-incomplete-assertions,chai-determinate-assertion,strict,variable-name,sonar-no-dupe-keys,no-primitive-wrappers,no-exclusive-tests,aws-opensearchservice-domain,no-self-assign,for-in,no-misused-promises,no-misused-new,aws-iam-all-privileges,no-invalid-await,no-hardcoded-credentials,aws-rds-unencrypted-databases,content-length,no-clear-text-protocols,no-empty,sonar-max-params,hidden-files,no-magic-numbers,no-unused-expressions,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg
17:08:26.332 DEBUG: Loaded rules ucfg from /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules12726730660899959144/package
17:08:26.332 DEBUG: Creating linter config
17:08:26.350 DEBUG: Linter config: {"language":"js","fileType":"MAIN"} with accessor-pairs,anchor-precedence,argument-type,arguments-order,arguments-usage,array-callback-without-return,array-constructor,aws-apigateway-public-api,aws-ec2-rds-dms-public,aws-ec2-unencrypted-ebs-volume,aws-efs-unencrypted,aws-iam-all-privileges,aws-iam-privilege-escalation,aws-iam-public-access,aws-opensearchservice-domain,aws-rds-unencrypted-databases,aws-restricted-ip-admin-access,aws-s3-bucket-granted-access,aws-s3-bucket-insecure-http,aws-s3-bucket-public-access,aws-s3-bucket-server-encryption,aws-s3-bucket-versioning,aws-sagemaker-unencrypted-notebook,aws-sns-unencrypted-topics,aws-sqs-unencrypted-queue,bitwise-operators,call-argument-line,certificate-transparency,class-name,class-prototype,code-eval,cognitive-complexity,comma-or-logical-or-case,concise-regex,confidential-information-logging,constructor-for-side-effects,content-length,content-security-policy,cookie-no-httponly,cors,csrf,curly,cyclomatic-complexity,default-param-last,deprecation,destructuring-assignment-syntax,different-types-comparison,disabled-auto-escaping,disabled-resource-integrity,dns-prefetching,duplicates-in-character-class,elseif-without-else,empty-string-repetition,encryption-secure-mode,eqeqeq,existing-groups,expression-complexity,file-name-differ-from-class,file-permissions,file-uploads,fixme-tag,for-in,for-loop-increment-sign,frame-ancestors,function-inside-loop,function-name,function-return-type,future-reserved-words,generator-without-yield,hashing,hidden-files,in-operator-type-error,inconsistent-function-call,index-of-compare-to-positive-number,insecure-cookie,insecure-jwt-token,jsx-key,jsx-no-comment-textnodes,jsx-no-constructed-context-values,label-position,link-with-target-blank,max-switch-cases,misplaced-loop-counter,nested-control-flow,new-operator-misuse,no-accessor-field-mismatch,no-all-duplicated-branches,no-alphabetical-sort,no-angular-bypass-sanitization,no-array-delete,no-array-index-key,no-associative-arrays,no-base-to-string,no-built-in-override,no-caller,no-case-label-in-switch,no-clear-text-protocols,no-collapsible-if,no-collection-size-mischeck,no-commented-code,no-console,no-continue,no-dead-store,no-delete-var,no-dupe-args,no-duplicate-imports,no-duplicate-string,no-duplicated-branches,no-element-overwrite,no-empty,no-empty-after-reluctant,no-empty-alternatives,no-empty-collection,no-empty-function,no-empty-group,no-empty-pattern,no-equals-in-for-termination,no-extra-arguments,no-extra-boolean-cast,no-extraneous-class,no-for-in-iterable,no-global-this,no-globals-shadowing,no-gratuitous-expressions,no-hardcoded-credentials,no-hardcoded-ip,no-hook-setter-in-body,no-identical-conditions,no-identical-expressions,no-identical-functions,no-ignored-return,no-implicit-global,no-in-misuse,no-inconsistent-returns,no-incorrect-string-concat,no-infinite-loop,no-intrusive-permissions,no-invalid-await,no-invariant-returns,no-inverted-boolean-check,no-ip-forward,no-labels,no-loss-of-precision,no-magic-numbers,no-mime-sniff,no-misleading-array-reverse,no-misused-promises,no-mixed-content,no-multi-str,no-nested-assignment,no-nested-conditional,no-nested-incdec,no-nested-switch,no-nested-template-literals,no-new-native-nonconstructor,no-octal,no-one-iteration-loop,no-os-command-from-path,no-parameter-reassignment,no-primitive-wrappers,no-redeclare,no-redundant-assignments,no-redundant-boolean,no-redundant-jump,no-reference-error,no-referrer-policy,no-return-await,no-same-line-conditional,no-self-assign,no-sequences,no-setter-return,no-shadow,no-small-switch,no-sparse-arrays,no-template-curly-in-string,no-throw-literal,no-try-promise,no-undefined-assignment,no-unenclosed-multiline-block,no-uniq-key,no-unreachable,no-unsafe-finally,no-unsafe-negation,no-unsafe-optional-chaining,no-unsafe-unzip,no-unstable-nested-components,no-unthrown-error,no-unused-collection,no-unused-expressions,no-unused-function-argument,no-use-of-empty-return-value,no-useless-catch,no-useless-increment,no-useless-react-setstate,no-var,no-variable-usage-before-declaration,no-vue-bypass-sanitization,no-weak-cipher,no-weak-keys,no-wildcard-import,no-with,non-existent-operator,non-number-in-arithmetic-expression,null-dereference,object-shorthand,operation-returning-nan,os-command,post-message,prefer-const,prefer-default-last,prefer-for-of,prefer-immediate-return,prefer-object-literal,prefer-promise-shorthand,prefer-regex-literals,prefer-single-boolean-return,prefer-string-starts-ends-with,prefer-template,prefer-while,production-debug,pseudo-random,publicly-writable-directories,radix,regex-complexity,require-render-return,rules-of-hooks,session-regeneration,shorthand-property-grouping,single-char-in-character-classes,single-character-alternation,slow-regex,sonar-block-scoped-var,sonar-jsx-no-leaked-render,sonar-max-lines,sonar-max-lines-per-function,sonar-max-params,sonar-no-control-regex,sonar-no-dupe-keys,sonar-no-empty-character-class,sonar-no-fallthrough,sonar-no-invalid-regexp,sonar-no-misleading-character-class,sonar-no-regex-spaces,sonar-no-unused-class-component-methods,sonar-no-unused-vars,sonar-prefer-optional-chain,sonar-prefer-regexp-exec,sql-queries,stateful-regex,strict,strict-transport-security,strings-comparison,super-invocation,switch-without-default,todo-tag,too-many-break-or-continue-in-loop,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,unnecessary-character-escapes,unused-import,unused-named-groups,unverified-certificate,unverified-hostname,updated-const-var,updated-loop-counter,use-isnan,valid-typeof,values-not-convertible-to-numbers,variable-name,void-use,weak-ssl,x-powered-by,xml-parser-xxe
17:08:26.350 DEBUG: Linter config: {"language":"js","fileType":"TEST"} with assertions-in-tests,chai-determinate-assertion,disabled-timeout,inverted-assertion-arguments,no-code-after-done,no-exclusive-tests,no-ignored-exceptions,no-incomplete-assertions,no-same-argument-assert,test-check-exception
17:08:26.351 DEBUG: Linter config: {"language":"ts","fileType":"MAIN"} with accessor-pairs,anchor-precedence,arguments-order,arguments-usage,array-constructor,aws-apigateway-public-api,aws-ec2-rds-dms-public,aws-ec2-unencrypted-ebs-volume,aws-efs-unencrypted,aws-iam-all-privileges,aws-iam-privilege-escalation,aws-iam-public-access,aws-opensearchservice-domain,aws-rds-unencrypted-databases,aws-restricted-ip-admin-access,aws-s3-bucket-granted-access,aws-s3-bucket-insecure-http,aws-s3-bucket-public-access,aws-s3-bucket-server-encryption,aws-s3-bucket-versioning,aws-sagemaker-unencrypted-notebook,aws-sns-unencrypted-topics,aws-sqs-unencrypted-queue,bitwise-operators,call-argument-line,certificate-transparency,class-name,class-prototype,code-eval,cognitive-complexity,comma-or-logical-or-case,concise-regex,confidential-information-logging,constructor-for-side-effects,content-length,content-security-policy,cookie-no-httponly,cors,csrf,curly,cyclomatic-complexity,default-param-last,deprecation,destructuring-assignment-syntax,disabled-auto-escaping,disabled-resource-integrity,dns-prefetching,duplicates-in-character-class,elseif-without-else,empty-string-repetition,encryption-secure-mode,eqeqeq,existing-groups,expression-complexity,file-name-differ-from-class,file-permissions,file-uploads,fixme-tag,for-in,for-loop-increment-sign,frame-ancestors,function-inside-loop,function-name,generator-without-yield,hashing,hidden-files,index-of-compare-to-positive-number,insecure-cookie,insecure-jwt-token,jsx-key,jsx-no-comment-textnodes,jsx-no-constructed-context-values,label-position,link-with-target-blank,max-switch-cases,misplaced-loop-counter,nested-control-flow,new-operator-misuse,no-accessor-field-mismatch,no-all-duplicated-branches,no-alphabetical-sort,no-angular-bypass-sanitization,no-array-delete,no-array-index-key,no-associative-arrays,no-built-in-override,no-caller,no-case-label-in-switch,no-clear-text-protocols,no-collapsible-if,no-collection-size-mischeck,no-commented-code,no-confusing-non-null-assertion,no-console,no-dead-store,no-delete-var,no-duplicate-enum-values,no-duplicate-imports,no-duplicate-in-composite,no-duplicate-string,no-duplicated-branches,no-element-overwrite,no-empty,no-empty-after-reluctant,no-empty-alternatives,no-empty-collection,no-empty-function,no-empty-group,no-empty-pattern,no-equals-in-for-termination,no-extra-boolean-cast,no-extraneous-class,no-for-in-iterable,no-global-this,no-globals-shadowing,no-gratuitous-expressions,no-hardcoded-credentials,no-hardcoded-ip,no-hook-setter-in-body,no-identical-conditions,no-identical-expressions,no-identical-functions,no-ignored-return,no-import-assign,no-in-misuse,no-inconsistent-returns,no-incorrect-string-concat,no-intrusive-permissions,no-invalid-await,no-invariant-returns,no-inverted-boolean-check,no-ip-forward,no-labels,no-magic-numbers,no-mime-sniff,no-misleading-array-reverse,no-misused-new,no-misused-promises,no-mixed-content,no-mixed-enums,no-multi-str,no-nested-assignment,no-nested-conditional,no-nested-incdec,no-nested-switch,no-nested-template-literals,no-octal,no-one-iteration-loop,no-os-command-from-path,no-parameter-reassignment,no-primitive-wrappers,no-redundant-assignments,no-redundant-boolean,no-redundant-jump,no-redundant-optional,no-redundant-type-constituents,no-referrer-policy,no-require-or-define,no-return-await,no-same-line-conditional,no-self-assign,no-sequences,no-shadow,no-small-switch,no-sparse-arrays,no-template-curly-in-string,no-this-alias,no-throw-literal,no-try-promise,no-undefined-argument,no-undefined-assignment,no-unenclosed-multiline-block,no-uniq-key,no-unnecessary-type-assertion,no-unnecessary-type-constraint,no-unreachable,no-unsafe-finally,no-unsafe-negation,no-unsafe-optional-chaining,no-unsafe-unzip,no-unstable-nested-components,no-unthrown-error,no-unused-collection,no-unused-expressions,no-use-of-empty-return-value,no-useless-catch,no-useless-increment,no-useless-intersection,no-useless-react-setstate,no-var,no-variable-usage-before-declaration,no-vue-bypass-sanitization,no-weak-cipher,no-weak-keys,no-wildcard-import,non-existent-operator,object-shorthand,os-command,post-message,prefer-as-const,prefer-const,prefer-default-last,prefer-enum-initializers,prefer-for-of,prefer-function-type,prefer-immediate-return,prefer-literal-enum-member,prefer-namespace-keyword,prefer-nullish-coalescing,prefer-promise-shorthand,prefer-regex-literals,prefer-return-this-type,prefer-string-starts-ends-with,prefer-template,prefer-type-guard,prefer-while,production-debug,pseudo-random,publicly-writable-directories,radix,redundant-type-aliases,regex-complexity,require-render-return,rules-of-hooks,session-regeneration,shorthand-property-grouping,single-char-in-character-classes,single-character-alternation,slow-regex,sonar-block-scoped-var,sonar-jsx-no-leaked-render,sonar-max-lines,sonar-max-lines-per-function,sonar-max-params,sonar-no-control-regex,sonar-no-dupe-keys,sonar-no-empty-character-class,sonar-no-fallthrough,sonar-no-invalid-regexp,sonar-no-misleading-character-class,sonar-no-regex-spaces,sonar-no-unused-class-component-methods,sonar-prefer-optional-chain,sonar-prefer-regexp-exec,sql-queries,stateful-regex,strict,strict-transport-security,strings-comparison,super-invocation,switch-without-default,todo-tag,too-many-break-or-continue-in-loop,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,unnecessary-character-escapes,unused-import,unused-named-groups,unverified-certificate,unverified-hostname,updated-loop-counter,use-isnan,use-type-alias,variable-name,void-use,weak-ssl,x-powered-by,xml-parser-xxe
17:08:26.351 DEBUG: Linter config: {"language":"ts","fileType":"TEST"} with assertions-in-tests,chai-determinate-assertion,disabled-timeout,inverted-assertion-arguments,no-code-after-done,no-exclusive-tests,no-ignored-exceptions,no-incomplete-assertions,no-same-argument-assert,test-check-exception
17:08:26.367 DEBUG: Initializing linter "unchanged" with ucfg
17:08:26.368 DEBUG: Loaded rules ucfg from /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules12726730660899959144/package
17:08:26.368 DEBUG: Creating linter config
17:08:26.368 DEBUG: Linter config: {"language":"ts","fileType":"MAIN"} with ucfg
17:08:26.378 INFO: Resolving TSConfig files using 'tsconfig.sonar.json' from property sonar.typescript.tsconfigPaths
17:08:26.378 DEBUG: Using 'tsconfig.sonar.json' to resolve TSConfig file(s)
17:08:26.379 INFO: Found 1 TSConfig file(s): [/opt/atlassian/pipelines/agent/build/packages/functions/tsconfig.sonar.json]
17:08:26.379 DEBUG: Will use AnalysisWithProgram
17:08:26.380 DEBUG: Initializing org.sonar.plugins.javascript.eslint.AnalysisWithProgram
17:08:26.381 INFO: Creating TypeScript program
17:08:26.381 INFO: TypeScript configuration file /opt/atlassian/pipelines/agent/build/packages/functions/tsconfig.sonar.json
17:08:26.385 INFO: 14 source files to be analyzed
17:09:33.180 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:09:43.314 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:09:53.469 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:10:03.601 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:10:13.740 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:10:23.898 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:10:34.013 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:10:46.056 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:10:57.716 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:11:08.639 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:11:19.277 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:11:29.567 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:11:39.754 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:11:49.858 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:12:00.448 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:12:11.953 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:12:22.643 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:12:33.021 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:12:43.210 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:12:53.380 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:13:03.612 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:13:13.781 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:13:24.230 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:13:35.035 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:13:46.016 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:13:57.755 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:14:09.675 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:14:20.982 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:14:31.229 ERROR: the bridge Node.js process is unresponsive. This is most likely caused by process running out of memory. Consider setting sonar.javascript.node.maxspace to higher value (e.g. 4096).
17:14:31.540 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
17:14:54.176 ERROR: Failure during analysis, Node.js command to start the bridge was: node --max-old-space-size=2048 /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/.sonartmp/bridge-bundle/package/bin/server 37751 127.0.0.1 /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork true false /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules12726730660899959144/package
java.lang.IllegalStateException: the bridge is unresponsive
	at org.sonar.plugins.javascript.eslint.BridgeServerImpl.request(BridgeServerImpl.java:392)
	at org.sonar.plugins.javascript.eslint.BridgeServerImpl.createProgram(BridgeServerImpl.java:476)
	at org.sonar.plugins.javascript.eslint.AnalysisWithProgram.analyzeFiles(AnalysisWithProgram.java:80)
	at org.sonar.plugins.javascript.eslint.JsTsSensor.analyzeFiles(JsTsSensor.java:124)
	at org.sonar.plugins.javascript.eslint.AbstractEslintSensor.execute(AbstractEslintSensor.java:74)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
	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:468)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:464)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:420)
	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:57)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)
	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.eslint.BridgeServerImpl.request(BridgeServerImpl.java:383)
	... 34 common frames omitted

17:14:57.040 INFO: Hit the cache for 0 out of 0
17:15:14.876 INFO: Miss the cache for 0 out of 0
17:15:15.327 INFO: Sensor JavaScript/TypeScript analysis [javascript] (done) | time=413898ms
17:15:17.298 INFO: Sensor CSS Rules [javascript]
17:15:17.975 INFO: Sensor CSS Rules is restricted to changed files only
17:15:30.793 INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
17:15:30.810 INFO: Sensor CSS Rules [javascript] (done) | time=13608ms
17:15:30.986 INFO: Sensor JavaScript/TypeScript Coverage [javascript]
17:15:32.062 DEBUG: Property sonar.javascript.lcov.reportPaths is used.
17:15:33.065 DEBUG: Using './coverage/lcov.info' to resolve LCOV files
17:15:33.437 INFO: Analysing [/opt/atlassian/pipelines/agent/build/packages/functions/./coverage/lcov.info]

Still failing, this time with the 120mn timeout,

Hi @julbrs,

I tested myself and I didn’t see any excessive amount of memory used during the scan. Are you also scanning main branch? I my case I see there are 70 files to be analyzed instead of 14 as shown in your logs.

11:02:57.993 INFO: 70 source files to be analyzed

Is it possible to test with 4096 Mb of memory? You will need to set it both for node (-Dsonar.javascript.node.maxspace) and for the Docker container.

Cheers,
Victor

Hi
I am not scanning the main branch but I have the exact same content in src/ as the goal of my PR is to only implement the sonarsource/sonarcloud-scan pipe on the project :wink:

Ok so now with following configuration:

    - step: &backend-sonar
        name: sonar backend (sst)
        size: 2x
        caches:
          - node
          - sonar
        script:
          - yarn
          - cd packages/functions/
          - yarn coverage
          - pipe: sonarsource/sonarcloud-scan:2.0.0
            variables:
              EXTRA_ARGS: >
                -Dsonar.verbose=true
                -Dsonar.organization=gbandsmith
                -Dsonar.projectKey=ec2-leaser-backend
                -Dsonar.javascript.node.maxspace=4096
                -Dsonar.typescript.tsconfigPaths=tsconfig.sonar.json
                -Dsonar.sources=src
                -Dsonar.tests=test
                -Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
                -Dsonar.testExecutionReportPaths=./sonar-report.xml
              SONAR_SCANNER_OPTS: -Xmx4096m
          - yarn lint

and same issue it seems?

19:06:14.343 DEBUG: Creating linter config
19:06:14.343 DEBUG: Linter config: {"language":"ts","fileType":"MAIN"} with ucfg
19:06:14.349 INFO: Resolving TSConfig files using 'tsconfig.sonar.json' from property sonar.typescript.tsconfigPaths
19:06:14.350 DEBUG: Using 'tsconfig.sonar.json' to resolve TSConfig file(s)
19:06:14.350 INFO: Found 1 TSConfig file(s): [/opt/atlassian/pipelines/agent/build/packages/functions/tsconfig.sonar.json]
19:06:14.350 DEBUG: Will use AnalysisWithProgram
19:06:14.350 DEBUG: Initializing org.sonar.plugins.javascript.eslint.AnalysisWithProgram
19:06:14.351 INFO: Creating TypeScript program
19:06:14.351 INFO: TypeScript configuration file /opt/atlassian/pipelines/agent/build/packages/functions/tsconfig.sonar.json
19:06:14.354 INFO: 14 source files to be analyzed
19:07:31.082 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:07:41.145 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:07:51.638 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:08:02.202 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:08:12.788 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:08:22.932 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:08:33.092 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:08:43.201 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:08:53.656 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:09:04.554 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:09:15.590 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:09:27.162 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:09:38.774 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:09:50.817 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:10:03.703 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:10:16.324 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:10:28.823 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:10:40.978 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:10:52.748 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:11:38.597 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:11:52.406 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:12:06.325 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:12:29.375 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:12:45.934 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:13:17.075 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:13:30.276 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:13:42.314 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:13:55.026 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:14:07.012 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:14:19.873 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:14:32.075 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:14:44.722 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:14:57.780 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:15:10.487 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:15:23.493 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:15:43.581 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:15:55.956 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:16:07.982 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:16:20.653 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:16:33.593 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:16:45.972 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:17:11.107 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:17:33.774 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:17:45.445 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:17:58.080 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:18:10.422 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:18:23.744 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:18:36.826 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:18:51.073 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:19:06.900 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:19:35.119 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:19:52.715 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:20:07.426 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:20:21.376 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:20:33.218 ERROR: the bridge Node.js process is unresponsive. This is most likely caused by process running out of memory. Consider setting sonar.javascript.node.maxspace to higher value (e.g. 4096).
19:20:34.786 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:20:49.527 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:21:13.681 INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
19:49:57.179 ERROR: Failure during analysis, Node.js command to start the bridge was: node --max-old-space-size=4096 /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/.sonartmp/bridge-bundle/package/bin/server 40151 127.0.0.1 /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork true false /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules7903578069667629112/package
java.lang.IllegalStateException: the bridge is unresponsive
	at org.sonar.plugins.javascript.eslint.BridgeServerImpl.request(BridgeServerImpl.java:392)
	at org.sonar.plugins.javascript.eslint.BridgeServerImpl.createProgram(BridgeServerImpl.java:476)
	at org.sonar.plugins.javascript.eslint.AnalysisWithProgram.analyzeFiles(AnalysisWithProgram.java:80)
	at org.sonar.plugins.javascript.eslint.JsTsSensor.analyzeFiles(JsTsSensor.java:124)
	at org.sonar.plugins.javascript.eslint.AbstractEslintSensor.execute(AbstractEslintSensor.java:74)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
	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:468)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:464)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:420)
	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:57)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)
	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.eslint.BridgeServerImpl.request(BridgeServerImpl.java:383)
	... 34 common frames omitted

19:52:29.139 INFO: Hit the cache for 0 out of 0
19:59:47.243 INFO: Miss the cache for 0 out of 0
19:59:49.327 INFO: Sensor JavaScript/TypeScript analysis [javascript] (done) | time=3219194ms
20:00:07.633 INFO: Sensor CSS Rules [javascript]
20:00:13.330 INFO: Sensor CSS Rules is restricted to changed files only
20:02:08.441 INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
20:02:09.273 INFO: Sensor CSS Rules [javascript] (done) | time=121673ms
20:02:14.687 INFO: Sensor JavaScript/TypeScript Coverage [javascript]
20:02:48.197 DEBUG: Property sonar.javascript.lcov.reportPaths is used.
20:03:16.494 DEBUG: Using './coverage/lcov.info' to resolve LCOV files
20:03:46.772 INFO: Analysing [/opt/atlassian/pipelines/agent/build/packages/functions/./coverage/lcov.info]
20:31:37.533 INFO: Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=1763145ms
20:31:37.578 INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
20:31:38.429 INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=845ms
20:31:38.449 INFO: Sensor IaC Docker Sensor [iac]
20:31:38.449 INFO: Sensor IaC Docker Sensor is restricted to changed files only
20:31:40.900 INFO: 0 source files to be analyzed
20:31:51.691 INFO: -1/0 files analyzed, current file: null
20:32:01.743 INFO: -1/0 files analyzed, current file: null
20:32:11.783 INFO: -1/0 files analyzed, current file: null
20:32:21.831 INFO: -1/0 files analyzed, current file: null
20:32:31.885 INFO: -1/0 files analyzed, current file: null
20:32:42.094 INFO: -1/0 files analyzed, current file: null
20:32:52.292 INFO: -1/0 files analyzed, current file: null
20:33:02.457 INFO: -1/0 files analyzed, current file: null
20:33:12.668 INFO: -1/0 files analyzed, current file: null
20:33:22.947 INFO: -1/0 files analyzed, current file: null
20:33:33.405 INFO: -1/0 files analyzed, current file: null
20:33:43.642 INFO: -1/0 files analyzed, current file: null
20:33:54.152 INFO: -1/0 files analyzed, current file: null
20:34:04.496 INFO: -1/0 files analyzed, current file: null
20:34:16.274 INFO: -1/0 files analyzed, current file: null
20:34:27.534 INFO: -1/0 files analyzed, current file: null
20:34:38.298 INFO: -1/0 files analyzed, current file: null
20:34:50.034 INFO: -1/0 files analyzed, current file: null
20:35:01.930 INFO: -1/0 files analyzed, current file: null
20:35:13.533 INFO: -1/0 files analyzed, current file: null
20:35:25.651 INFO: -1/0 files analyzed, current file: null
20:35:37.721 INFO: -1/0 files analyzed, current file: null
20:35:49.918 INFO: -1/0 files analyzed, current file: null
20:36:01.805 INFO: -1/0 files analyzed, current file: null
20:36:13.385 INFO: -1/0 files analyzed, current file: null
20:36:24.829 INFO: -1/0 files analyzed, current file: null
20:36:35.986 INFO: -1/0 files analyzed, current file: null
20:36:46.561 INFO: -1/0 files analyzed, current file: null
20:36:58.754 INFO: -1/0 files analyzed, current file: null
20:37:10.321 INFO: -1/0 files analyzed, current file: null
20:37:21.377 INFO: -1/0 files analyzed, current file: null
20:37:33.119 INFO: -1/0 files analyzed, current file: null
20:37:44.916 INFO: -1/0 files analyzed, current file: null
20:37:56.373 INFO: -1/0 files analyzed, current file: null
20:38:07.628 INFO: -1/0 files analyzed, current file: null
20:38:18.768 INFO: -1/0 files analyzed, current file: null
20:38:30.482 INFO: -1/0 files analyzed, current file: null
20:38:42.158 INFO: -1/0 files analyzed, current file: null
20:38:57.651 INFO: -1/0 files analyzed, current file: null
20:39:13.694 INFO: -1/0 files analyzed, current file: null
20:39:25.458 INFO: -1/0 files analyzed, current file: null
20:39:36.888 INFO: -1/0 files analyzed, current file: null
20:39:48.391 INFO: -1/0 files analyzed, current file: null
20:40:00.230 INFO: -1/0 files analyzed, current file: null
20:40:11.757 INFO: -1/0 files analyzed, current file: null
20:40:23.432 INFO: -1/0 files analyzed, current file: null
20:40:35.691 INFO: -1/0 files analyzed, current file: null
20:40:46.910 INFO: -1/0 files analyzed, current file: null
20:40:58.636 INFO: -1/0 files analyzed, current file: null
20:41:10.540 INFO: -1/0 files analyzed, current file: null
20:41:22.252 INFO: -1/0 files analyzed, current file: null
20:41:33.808 INFO: -1/0 files analyzed, current file: null
20:41:45.389 INFO: -1/0 files analyzed, current file: null
20:41:57.110 INFO: -1/0 files analyzed, current file: null
20:42:08.726 INFO: -1/0 files analyzed, current file: null
20:42:21.033 INFO: -1/0 files analyzed, current file: null
20:42:39.897 INFO: -1/0 files analyzed, current file: null
20:42:51.511 INFO: -1/0 files analyzed, current file: null
20:43:03.249 INFO: -1/0 files analyzed, current file: null
20:43:15.001 INFO: -1/0 files analyzed, current file: null
20:43:26.672 INFO: -1/0 files analyzed, current file: null
20:43:38.078 INFO: -1/0 files analyzed, current file: null
20:43:49.716 INFO: -1/0 files analyzed, current file: null
20:44:01.112 INFO: -1/0 files analyzed, current file: null
20:44:12.558 INFO: -1/0 files analyzed, current file: null
20:44:24.214 INFO: -1/0 files analyzed, current file: null
20:44:36.057 INFO: -1/0 files analyzed, current file: null
20:44:47.807 INFO: -1/0 files analyzed, current file: null
20:44:59.314 INFO: -1/0 files analyzed, current file: null
20:45:13.369 INFO: -1/0 files analyzed, current file: null
20:45:28.254 INFO: -1/0 files analyzed, current file: null
20:45:40.059 INFO: -1/0 files analyzed, current file: null
20:45:51.778 INFO: -1/0 files analyzed, current file: null
20:46:03.756 INFO: -1/0 files analyzed, current file: null
20:46:15.626 INFO: -1/0 files analyzed, current file: null
20:46:27.267 INFO: -1/0 files analyzed, current file: null
20:46:39.319 INFO: -1/0 files analyzed, current file: null
20:46:51.293 INFO: -1/0 files analyzed, current file: null
20:47:03.125 INFO: -1/0 files analyzed, current file: null
20:47:15.114 INFO: -1/0 files analyzed, current file: null
20:47:26.907 INFO: -1/0 files analyzed, current file: null
20:47:38.677 INFO: -1/0 files analyzed, current file: null
20:47:50.571 INFO: -1/0 files analyzed, current file: null
20:48:02.174 INFO: -1/0 files analyzed, current file: null
20:48:13.838 INFO: -1/0 files analyzed, current file: null
20:48:25.399 INFO: -1/0 files analyzed, current file: null
20:48:37.094 INFO: -1/0 files analyzed, current file: null
20:48:48.498 INFO: -1/0 files analyzed, current file: null
20:49:00.050 INFO: -1/0 files analyzed, current file: null
20:49:11.535 INFO: -1/0 files analyzed, current file: null
20:49:23.022 INFO: -1/0 files analyzed, current file: null
20:49:34.202 INFO: -1/0 files analyzed, current file: null
20:49:45.376 INFO: -1/0 files analyzed, current file: null
20:49:56.894 INFO: -1/0 files analyzed, current file: null
20:50:08.078 INFO: -1/0 files analyzed, current file: null
20:50:18.722 INFO: -1/0 files analyzed, current file: null
20:50:29.725 INFO: -1/0 files analyzed, current file: null
20:50:40.828 INFO: -1/0 files analyzed, current file: null
20:50:52.256 INFO: -1/0 files analyzed, current file: null
20:51:03.941 INFO: -1/0 files analyzed, current file: null
20:51:15.409 INFO: -1/0 files analyzed, current file: null
20:51:26.805 INFO: -1/0 files analyzed, current file: null
20:51:37.722 INFO: -1/0 files analyzed, current file: null
20:51:47.795 INFO: -1/0 files analyzed, current file: null
20:51:57.986 INFO: -1/0 files analyzed, current file: null
20:52:08.043 INFO: -1/0 files analyzed, current file: null
20:52:18.403 INFO: -1/0 files analyzed, current file: null
20:52:29.068 INFO: -1/0 files analyzed, current file: null
20:52:39.726 INFO: -1/0 files analyzed, current file: null
20:52:51.097 INFO: -1/0 files analyzed, current file: null
20:53:03.055 INFO: -1/0 files analyzed, current file: null
20:53:14.873 INFO: -1/0 files analyzed, current file: null
20:53:26.425 INFO: -1/0 files analyzed, current file: null
20:53:37.965 INFO: -1/0 files analyzed, current file: null
20:54:00.194 INFO: -1/0 files analyzed, current file: null
20:54:28.074 INFO: -1/0 files analyzed, current file: null
20:54:41.077 INFO: -1/0 files analyzed, current file: null
20:54:54.630 INFO: -1/0 files analyzed, current file: null
20:55:07.493 INFO: -1/0 files analyzed, current file: null
20:55:19.891 INFO: -1/0 files analyzed, current file: null
20:55:32.450 INFO: -1/0 files analyzed, current file: null
20:55:45.077 INFO: -1/0 files analyzed, current file: null
20:55:57.438 INFO: -1/0 files analyzed, current file: null
20:56:09.893 INFO: -1/0 files analyzed, current file: null
20:56:22.308 INFO: -1/0 files analyzed, current file: null
20:56:35.073 INFO: -1/0 files analyzed, current file: null
20:56:52.419 INFO: -1/0 files analyzed, current file: null
20:57:18.580 INFO: -1/0 files analyzed, current file: null
20:57:31.189 INFO: -1/0 files analyzed, current file: null
20:57:43.501 INFO: -1/0 files analyzed, current file: null
20:57:55.913 INFO: -1/0 files analyzed, current file: null
20:58:08.387 INFO: -1/0 files analyzed, current file: null
20:58:21.206 INFO: -1/0 files analyzed, current file: null
20:58:34.573 INFO: -1/0 files analyzed, current file: null
20:58:47.486 INFO: -1/0 files analyzed, current file: null
20:59:00.714 INFO: -1/0 files analyzed, current file: null
20:59:13.872 INFO: -1/0 files analyzed, current file: null
20:59:28.948 INFO: -1/0 files analyzed, current file: null
20:59:42.091 INFO: -1/0 files analyzed, current file: null
20:59:55.176 INFO: -1/0 files analyzed, current file: null
21:00:08.089 INFO: -1/0 files analyzed, current file: null
21:00:20.474 INFO: -1/0 files analyzed, current file: null
21:00:32.877 INFO: -1/0 files analyzed, current file: null
21:00:45.104 INFO: -1/0 files analyzed, current file: null
21:00:57.394 INFO: -1/0 files analyzed, current file: null
21:01:09.774 INFO: -1/0 files analyzed, current file: null
21:01:22.085 INFO: -1/0 files analyzed, current file: null
21:01:35.277 INFO: -1/0 files analyzed, current file: null

(Exceeded build time limit of 120 minutes.)

Again, thanks @victor.diez for your help on the subject it’s highly appreciated!

Hi @julbrs,

did you also increase docker memory?

definitions:
  services:
    docker:
      memory: 4096

Cheers,
Victor

:sweat_smile: I was not aware of this one! let me try that!

Tabernacle it works :sweat_smile:

Here is the log:

+ umask 000

+ GIT_LFS_SKIP_SMUDGE=1 retry 6 git clone --branch="feature/LAB-590/switch-sonarcloud-scan-pipe" https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into '/opt/atlassian/pipelines/agent/build'...

+ git reset --hard 6f0ad2d8cc55
HEAD is now at 6f0ad2d 2x needed on frontend too because docker mem upgraded to 4096

+ git config user.name bitbucket-pipelines

+ git config user.email commits-noreply@bitbucket.org

+ git config push.default current

+ git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/

+ git remote set-url origin http://bitbucket.org/$BITBUCKET_REPO_FULL_NAME

+ git reflog expire --expire=all --all

+ echo ".bitbucket/pipelines/generated" >> .git/info/exclude

+ CONFLICT_EXIT_CODE=3

+ git merge 1a58e5a97dd7 --no-edit || exit $CONFLICT_EXIT_CODE
Auto-merging https://bitbucket.org/wiiisdom/ec2-leaser/src/6f0ad2d8cc55/yarn.lock
Merge made by the 'ort' strategy.
 https://bitbucket.org/wiiisdom/ec2-leaser/src/6f0ad2d8cc55/yarn.lock | 2176 +++++++++++++++++++++++++++++++------------------------------
 1 file changed, 1112 insertions(+), 1064 deletions(-)

+ chmod 777 $BUILD_DIR


Cache "node: node_modules": Downloading
Cache "node: node_modules": Downloaded 179.8 MiB in 6 seconds
Cache "node: node_modules": Extracting
Cache "node: node_modules": Extracted in 9 seconds
Cache "sonar: ~/.sonar/cache": Downloading
Cache "sonar: ~/.sonar/cache": Downloaded 289 MiB in 7 seconds
Cache "sonar: ~/.sonar/cache": Extracting
Cache "sonar: ~/.sonar/cache": Extracted in 1 seconds

Default variables:
    BITBUCKET_BRANCH
    BITBUCKET_BUILD_NUMBER
    BITBUCKET_CLONE_DIR
    BITBUCKET_COMMIT
    BITBUCKET_GIT_HTTP_ORIGIN
    BITBUCKET_GIT_SSH_ORIGIN
    BITBUCKET_PARALLEL_STEP
    BITBUCKET_PARALLEL_STEP_COUNT
    BITBUCKET_PIPELINE_UUID
    BITBUCKET_PROJECT_KEY
    BITBUCKET_PROJECT_UUID
    BITBUCKET_PR_DESTINATION_BRANCH
    BITBUCKET_PR_DESTINATION_COMMIT
    BITBUCKET_PR_ID
    BITBUCKET_REPO_FULL_NAME
    BITBUCKET_REPO_IS_PRIVATE
    BITBUCKET_REPO_OWNER
    BITBUCKET_REPO_OWNER_UUID
    BITBUCKET_REPO_SLUG
    BITBUCKET_REPO_UUID
    BITBUCKET_SSH_KEY_FILE
    BITBUCKET_STEP_RUN_NUMBER
    BITBUCKET_STEP_TRIGGERER_UUID
    BITBUCKET_STEP_UUID
    BITBUCKET_WORKSPACE
    CI
    DOCKER_HOST
    PIPELINES_JWT_TOKEN

Workspace variables:
    ART_PASSWORD
    ART_USERNAME
    DTRACK_API_KEY
    DTRACK_URL
    REPORT_PORTAL_ENDPOINT
    REPORT_PORTAL_TOKEN
    SONAR_HOST_URL
    SONAR_ORGANIZATION

Repository variables:
    DTRACK_BACKEND_ID
    DTRACK_FRONTEND_ID
    SONAR_TOKEN

Images used:
    build : docker.io/library/node@sha256:11e9c297fc51f6f65f7d0c7c8a8581e5721f2f16de43ceff1a199fd3ef609f95
+ yarn
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "workspace-aggregator-62074a71-b2bb-42ec-aade-56880bb086f9 > @ec2-leaser/functions > @typescript-eslint/eslint-plugin@6.4.1" has unmet peer dependency "@typescript-eslint/parser@^6.0.0 || ^6.0.0-alpha".
warning "workspace-aggregator-62074a71-b2bb-42ec-aade-56880bb086f9 > @ec2-leaser/functions > eslint-config-standard-with-typescript@37.0.0" has incorrect peer dependency "@typescript-eslint/eslint-plugin@^5.52.0".
warning "workspace-aggregator-62074a71-b2bb-42ec-aade-56880bb086f9 > @ec2-leaser/frontend > @testing-library/user-event@14.4.3" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning "workspace-aggregator-62074a71-b2bb-42ec-aade-56880bb086f9 > @ec2-leaser/frontend > aws-amplify > @aws-amplify/core > react-native-url-polyfill@1.3.0" has unmet peer dependency "react-native@*".
warning "workspace-aggregator-62074a71-b2bb-42ec-aade-56880bb086f9 > @ec2-leaser/frontend > aws-amplify > @aws-amplify/analytics > @aws-sdk/client-firehose > @aws-sdk/middleware-retry > react-native-get-random-values@1.9.0" has unmet peer dependency "react-native@>=0.56".
[4/4] Building fresh packages...
Done in 49.64s.

+ cd packages/functions/

+ yarn coverage
yarn run v1.22.19
warning package.json: No license field
$ vitest run --reporter vitest-sonar-reporter --coverage
SonarQube report written to /opt/atlassian/pipelines/agent/build/packages/functions/sonar-report.xml
e[34m % e[39me[2mCoverage report from e[22me[33mv8e[39m
----------------|---------|----------|---------|---------|-------------------
File            | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
----------------|---------|----------|---------|---------|-------------------
All files       |   66.15 |    96.42 |    62.5 |   66.15 |                   
 bot            |   34.56 |    88.88 |   66.66 |   34.56 |                   
  googleChat.ts |   34.56 |    88.88 |   66.66 |   34.56 | 12-59,62-66       
 bot/ec2        |     100 |      100 |     100 |     100 |                   
  restore.ts    |     100 |      100 |     100 |     100 |                   
  snapshot.ts   |     100 |      100 |     100 |     100 |                   
 bot/google     |      20 |      100 |       0 |      20 |                   
  auth.ts       |      20 |      100 |       0 |      20 | 8-13,16-45        
 errors         |     100 |      100 |     100 |     100 |                   
  index.ts      |     100 |      100 |     100 |     100 |                   
----------------|---------|----------|---------|---------|-------------------
Done in 2.33s.

+ docker container run \
   --volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
   --volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
   --volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \
   --volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
   --volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan \
   --workdir=$(pwd) \
   --label=org.bitbucket.pipelines.system=true \
   --env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \
   --env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \
   --env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \
   --env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \
   --env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \
   --env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \
   --env=BITBUCKET_SSH_KEY_FILE="$BITBUCKET_SSH_KEY_FILE" \
   --env=BITBUCKET_PR_DESTINATION_COMMIT="$BITBUCKET_PR_DESTINATION_COMMIT" \
   --env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \
   --env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \
   --env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \
   --env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \
   --env=BITBUCKET_PARALLEL_STEP_COUNT="$BITBUCKET_PARALLEL_STEP_COUNT" \
   --env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \
   --env=CI="$CI" \
   --env=BITBUCKET_PR_ID="$BITBUCKET_PR_ID" \
   --env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \
   --env=BITBUCKET_PARALLEL_STEP="$BITBUCKET_PARALLEL_STEP" \
   --env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \
   --env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \
   --env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \
   --env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \
   --env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \
   --env=BITBUCKET_PR_DESTINATION_BRANCH="$BITBUCKET_PR_DESTINATION_BRANCH" \
   --env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \
   --env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \
   --env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \
   --env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \
   --env=DOCKER_HOST="tcp://host.docker.internal:2375" \
   --env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
   --env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan" \
   --env=EXTRA_ARGS="-Dsonar.organization=gbandsmith -Dsonar.projectKey=ec2-leaser-backend -Dsonar.javascript.node.maxspace=4096 -Dsonar.typescript.tsconfigPaths=tsconfig.sonar.json -Dsonar.sources=src -Dsonar.tests=test -Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info -Dsonar.testExecutionReportPaths=./sonar-report.xml
" \
   --env=SONAR_SCANNER_OPTS="-Xmx4096m" \
   --env=SONAR_TOKEN="${SONAR_TOKEN}" \
   --add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
   sonarsource/sonarcloud-scan:2.0.0
Unable to find image 'sonarsource/sonarcloud-scan:2.0.0' locally
2.0.0: Pulling from sonarsource/sonarcloud-scan
f87c7e5d5d08: Pulling fs layer
eb9a2dd6bdd2: Pulling fs layer
a2651bae792a: Pulling fs layer
ca68756027db: Pulling fs layer
d20b8c544d92: Pulling fs layer
af3b70d825df: Pulling fs layer
681e6b1e0f6c: Pulling fs layer
26236eeeddcc: Pulling fs layer
d20b8c544d92: Waiting
681e6b1e0f6c: Waiting
af3b70d825df: Waiting
ca68756027db: Waiting
26236eeeddcc: Waiting
a2651bae792a: Verifying Checksum
a2651bae792a: Download complete
f87c7e5d5d08: Download complete
d20b8c544d92: Verifying Checksum
d20b8c544d92: Download complete
af3b70d825df: Verifying Checksum
af3b70d825df: Download complete
ca68756027db: Verifying Checksum
ca68756027db: Download complete
681e6b1e0f6c: Verifying Checksum
681e6b1e0f6c: Download complete
26236eeeddcc: Verifying Checksum
26236eeeddcc: Download complete
eb9a2dd6bdd2: Verifying Checksum
eb9a2dd6bdd2: Download complete
f87c7e5d5d08: Pull complete
eb9a2dd6bdd2: Pull complete
a2651bae792a: Pull complete
ca68756027db: Pull complete
d20b8c544d92: Pull complete
af3b70d825df: Pull complete
681e6b1e0f6c: Pull complete
26236eeeddcc: Pull complete
Digest: sha256:f51e3d7ac9c469dbb5d114c1ed680f28374af4889b32a18eb23a1a8aaad4a4a4
Status: Downloaded newer image for sonarsource/sonarcloud-scan:2.0.0
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 5.0.1.3006
INFO: Java 17.0.8 Amazon.com Inc. (64-bit)
INFO: Linux 5.15.0-1040-aws amd64
INFO: SONAR_SCANNER_OPTS=-Xmx4096m
INFO: Bitbucket Cloud Pipelines detected, no host variable set. Defaulting to sonarcloud.io.
INFO: User cache: /root/.sonar/cache
INFO: Analyzing on SonarQube server 8.0.0.45862
INFO: Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=308ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=250ms
INFO: Load/download plugins (done) | time=2389ms
INFO: Loaded core extensions: developer-scanner
INFO: Found an active CI vendor: 'Bitbucket Pipelines'
INFO: No project and organization key detected from Bitbucket Cloud Pipelines because it is a monorepo.
INFO: Load project settings for component key: 'ec2-leaser-backend'
INFO: Load project settings for component key: 'ec2-leaser-backend' (done) | time=227ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=1ms
INFO: Project key: ec2-leaser-backend
INFO: Base dir: /opt/atlassian/pipelines/agent/build/packages/functions
INFO: Working dir: /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork
INFO: Load project branches
INFO: Load project branches (done) | time=239ms
INFO: Check ALM binding of project 'ec2-leaser-backend'
INFO: Detected project binding: BOUND
INFO: Check ALM binding of project 'ec2-leaser-backend' (done) | time=216ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=561ms
INFO: Load branch configuration
INFO: Detected analysis for pull request '158' targeting 'main'
INFO: Auto-configuring pull request 158
INFO: Load branch configuration (done) | time=397ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=355ms
INFO: Load active rules
INFO: Load active rules (done) | time=9503ms
INFO: Organization key: gbandsmith
INFO: Pull request 158 for merge into main from feature/LAB-590/switch-sonarcloud-scan-pipe
INFO: Load project repositories
INFO: Load project repositories (done) | time=253ms
INFO: SCM collecting changed files in the branch
INFO: SCM collecting changed files in the branch (done) | time=261ms
INFO: Indexing files...
INFO: Project configuration:
INFO:   Excluded sources: **/build-wrapper-dump.json
INFO: 14 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for ts: Wiiisdom way
INFO: ------------- Run sensors on module ec2-leaser-backend
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=282ms
INFO: Sensor cache enabled
INFO: Load sensor cache
INFO: Load sensor cache (404) | time=601ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=1ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=15ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor HTML [web]
INFO: Sensor HTML is restricted to changed files only
INFO: Sensor HTML [web] (done) | time=3ms
INFO: Sensor TextAndSecretsSensor [text]
INFO: Sensor TextAndSecretsSensor is restricted to changed files only
INFO: Sensor TextAndSecretsSensor [text] (done) | time=388ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms
INFO: Sensor VB.NET Analysis Log [vbnet]
INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=16ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
INFO: Sensor JavaScript/TypeScript analysis [javascript]
INFO: Resolving TSConfig files using 'tsconfig.sonar.json' from property sonar.typescript.tsconfigPaths
INFO: Found 1 TSConfig file(s): [/opt/atlassian/pipelines/agent/build/packages/functions/tsconfig.sonar.json]
INFO: Creating TypeScript program
INFO: TypeScript configuration file /opt/atlassian/pipelines/agent/build/packages/functions/tsconfig.sonar.json
INFO: 14 source files to be analyzed
INFO: 0/14 files analyzed, current file: /opt/atlassian/pipelines/agent/build/packages/functions/src/LaunchTemplate.ts
INFO: Creating TypeScript program (done) | time=11495ms
INFO: Starting analysis with current program
INFO: Analyzed 11 file(s) with current program
INFO: Found 3 file(s) not part of any tsconfig.json: they will be analyzed without type information
INFO: 14/14 source files have been analyzed
INFO: Hit the cache for 0 out of 14
INFO: Miss the cache for 14 out of 14: FILE_CHANGED [14/14]
INFO: Sensor JavaScript/TypeScript analysis [javascript] (done) | time=21137ms
INFO: Sensor CSS Rules [javascript]
INFO: Sensor CSS Rules is restricted to changed files only
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [javascript] (done) | time=1ms
INFO: Sensor JavaScript/TypeScript Coverage [javascript]
INFO: Analysing [/opt/atlassian/pipelines/agent/build/packages/functions/./coverage/lcov.info]
INFO: Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=20ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=0ms
INFO: Sensor IaC Docker Sensor [iac]
INFO: Sensor IaC Docker Sensor is restricted to changed files only
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Docker Sensor [iac] (done) | time=101ms
INFO: Sensor Serverless configuration file sensor [security]
INFO: 0 Serverless function entries were found in the project
INFO: 0 Serverless function handlers were kept as entrypoints
INFO: Sensor Serverless configuration file sensor [security] (done) | time=2ms
INFO: Sensor AWS SAM template file sensor [security]
INFO: Sensor AWS SAM template file sensor [security] (done) | time=1ms
INFO: Sensor AWS SAM Inline template file sensor [security]
INFO: Sensor AWS SAM Inline template file sensor [security] (done) | time=1ms
INFO: Sensor Generic Test Executions Report
INFO: Parsing /opt/atlassian/pipelines/agent/build/packages/functions/sonar-report.xml
INFO: Imported test execution data for 3 files
INFO: Sensor Generic Test Executions Report (done) | time=64ms
INFO: Sensor javabugs [dbd]
INFO: Reading IR files from: /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/ir/java
INFO: No IR files have been included for analysis.
INFO: Sensor javabugs [dbd] (done) | time=1ms
INFO: Sensor pythonbugs [dbd]
INFO: Reading IR files from: /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/ir/python
INFO: No IR files have been included for analysis.
INFO: Sensor pythonbugs [dbd] (done) | time=0ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5883, S6096, S6173, S6287, S6350, S6384, S6390, S6398, S6399
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/ucfg2/java
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.002
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.002
INFO: No UCFGs have been included for analysis.
INFO: java security sensor: Time spent was 00:00:00.006
INFO: Sensor JavaSecuritySensor [security] (done) | time=17ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5334, S5883, S6096, S6173, S6287, S6350, S6639, S6641
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/packages/functions/ucfg_cs2
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.000
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.000
INFO: No UCFGs have been included for analysis.
INFO: csharp security sensor: Time spent was 00:00:00.001
INFO: Sensor CSharpSecuritySensor [security] (done) | time=2ms
INFO: Sensor PhpSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5334, S5335, S5883, S6173, S6287, S6350
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/ucfg2/php
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.000
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.000
INFO: No UCFGs have been included for analysis.
INFO: php security sensor: Time spent was 00:00:00.000
INFO: Sensor PhpSecuritySensor [security] (done) | time=1ms
INFO: Sensor PythonSecuritySensor [security]
INFO: Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5496, S6287, S6350
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/ucfg2/python
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.000
INFO: Load UCFGs: Starting
INFO: Load UCFGs: Time spent was 00:00:00.000
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.000
INFO: No UCFGs have been included for analysis.
INFO: python security sensor: Time spent was 00:00:00.000
INFO: Sensor PythonSecuritySensor [security] (done) | time=1ms
INFO: Sensor JsSecuritySensor [security]
INFO: Enabled taint analysis rules: S5883, S2076, S6287, S5144, S6350, S5131, S3649, S5696, S5146, S5334, S6105, S2631, S5147, S6096, S2083
INFO: Load type hierarchy and UCFGs: Starting
INFO: Load type hierarchy: Starting
INFO: Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/ucfg2/js
INFO: Read 0 type definitions
INFO: Load type hierarchy: Time spent was 00:00:00.001
INFO: Load UCFGs: Starting
INFO: Reading UCFGs from: /opt/atlassian/pipelines/agent/build/packages/functions/.scannerwork/ucfg2/js
INFO: Load UCFGs: Time spent was 00:00:00.194
INFO: Load type hierarchy and UCFGs: Time spent was 00:00:00.196
INFO: Analyzing 51 UCFGs to detect vulnerabilities.
INFO: Check cache: Starting
INFO: Load cache: Starting
INFO: Load cache: Time spent was 00:00:00.000
INFO: Check cache: Time spent was 00:00:00.001
INFO: Create runtime call graph: Starting
INFO: Variable Type Analysis #1: Starting
INFO: Create runtime type propagation graph: Starting
INFO: Create runtime type propagation graph: Time spent was 00:00:00.023
INFO: Run SCC (Tarjan) on 434 nodes: Starting
INFO: Run SCC (Tarjan) on 434 nodes: Time spent was 00:00:00.005
INFO: Tarjan found 434 strongly connected components
INFO: Propagate runtime types to strongly connected components: Starting
INFO: Propagate runtime types to strongly connected components: Time spent was 00:00:00.015
INFO: Variable Type Analysis #1: Time spent was 00:00:00.046
INFO: Variable Type Analysis #2: Starting
INFO: Create runtime type propagation graph: Starting
INFO: Create runtime type propagation graph: Time spent was 00:00:00.009
INFO: Run SCC (Tarjan) on 434 nodes: Starting
INFO: Run SCC (Tarjan) on 434 nodes: Time spent was 00:00:00.001
INFO: Tarjan found 434 strongly connected components
INFO: Propagate runtime types to strongly connected components: Starting
INFO: Propagate runtime types to strongly connected components: Time spent was 00:00:00.002
INFO: Variable Type Analysis #2: Time spent was 00:00:00.013
INFO: Create runtime call graph: Time spent was 00:00:00.065
INFO: Load config: Starting
INFO: Load config: Time spent was 00:00:00.103
INFO: Compute entry points: Starting
INFO: Compute entry points: Time spent was 00:00:00.075
INFO: All rules entry points : 12
INFO: Slice call graph: Starting
INFO: Slice call graph: Time spent was 00:00:00.000
INFO: Live variable analysis: Starting
INFO: Live variable analysis: Time spent was 00:00:00.058
INFO: Taint analysis for js: Starting
INFO: 0 / 51 UCFGs simulated, memory usage: 116 MB
INFO: 12 / 51 UCFGs simulated, memory usage: 125 MB
INFO: Taint analysis for js: Time spent was 00:00:01.005
INFO: Report issues: Starting
INFO: Report issues: Time spent was 00:00:00.003
INFO: Store cache: Starting
INFO: Store cache: Time spent was 00:00:00.000
INFO: js security sensor: Time spent was 00:00:01.517
INFO: js security sensor: Begin: 2023-08-31T15:11:00.507805166Z, End: 2023-08-31T15:11:02.025347156Z, Duration: 00:00:01.517
  Load type hierarchy and UCFGs: Begin: 2023-08-31T15:11:00.508016527Z, End: 2023-08-31T15:11:00.704503351Z, Duration: 00:00:00.196
    Load type hierarchy: Begin: 2023-08-31T15:11:00.508029991Z, End: 2023-08-31T15:11:00.509239208Z, Duration: 00:00:00.001
    Load UCFGs: Begin: 2023-08-31T15:11:00.509364962Z, End: 2023-08-31T15:11:00.704189900Z, Duration: 00:00:00.194
  Check cache: Begin: 2023-08-31T15:11:00.710784681Z, End: 2023-08-31T15:11:00.712143528Z, Duration: 00:00:00.001
    Load cache: Begin: 2023-08-31T15:11:00.711101150Z, End: 2023-08-31T15:11:00.711476508Z, Duration: 00:00:00.000
  Create runtime call graph: Begin: 2023-08-31T15:11:00.712413973Z, End: 2023-08-31T15:11:00.777747310Z, Duration: 00:00:00.065
    Variable Type Analysis #1: Begin: 2023-08-31T15:11:00.713614644Z, End: 2023-08-31T15:11:00.760465547Z, Duration: 00:00:00.046
      Create runtime type propagation graph: Begin: 2023-08-31T15:11:00.714826919Z, End: 2023-08-31T15:11:00.738029327Z, Duration: 00:00:00.023
      Run SCC (Tarjan) on 434 nodes: Begin: 2023-08-31T15:11:00.738598782Z, End: 2023-08-31T15:11:00.744347145Z, Duration: 00:00:00.005
      Propagate runtime types to strongly connected components: Begin: 2023-08-31T15:11:00.744690958Z, End: 2023-08-31T15:11:00.760150828Z, Duration: 00:00:00.015
    Variable Type Analysis #2: Begin: 2023-08-31T15:11:00.762177268Z, End: 2023-08-31T15:11:00.776090081Z, Duration: 00:00:00.013
      Create runtime type propagation graph: Begin: 2023-08-31T15:11:00.762260034Z, End: 2023-08-31T15:11:00.771585774Z, Duration: 00:00:00.009
      Run SCC (Tarjan) on 434 nodes: Begin: 2023-08-31T15:11:00.771852284Z, End: 2023-08-31T15:11:00.773332127Z, Duration: 00:00:00.001
      Propagate runtime types to strongly connected components: Begin: 2023-08-31T15:11:00.773548184Z, End: 2023-08-31T15:11:00.775687084Z, Duration: 00:00:00.002
  Load config: Begin: 2023-08-31T15:11:00.778018202Z, End: 2023-08-31T15:11:00.881519742Z, Duration: 00:00:00.103
  Compute entry points: Begin: 2023-08-31T15:11:00.881957884Z, End: 2023-08-31T15:11:00.957136083Z, Duration: 00:00:00.075
  Slice call graph: Begin: 2023-08-31T15:11:00.957612524Z, End: 2023-08-31T15:11:00.957642186Z, Duration: 00:00:00.000
  Live variable analysis: Begin: 2023-08-31T15:11:00.957825434Z, End: 2023-08-31T15:11:01.015902824Z, Duration: 00:00:00.058
  Taint analysis for js: Begin: 2023-08-31T15:11:01.016383511Z, End: 2023-08-31T15:11:02.021572744Z, Duration: 00:00:01.005
  Report issues: Begin: 2023-08-31T15:11:02.021682577Z, End: 2023-08-31T15:11:02.025155998Z, Duration: 00:00:00.003
  Store cache: Begin: 2023-08-31T15:11:02.025269848Z, End: 2023-08-31T15:11:02.025303377Z, Duration: 00:00:00.000
INFO: js security sensor peak memory: 186 MB
INFO: Sensor JsSecuritySensor [security] (done) | time=1520ms
INFO: ------------- Run sensors on project
INFO: Sensor Analysis Warnings import [csharp]
INFO: Sensor Analysis Warnings import [csharp] (done) | time=1ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=3ms
INFO: CPD Executor 1 file had no CPD blocks
INFO: CPD Executor Calculating CPD for 10 files
INFO: CPD Executor CPD calculation finished (done) | time=18ms
INFO: SCM writing changed lines
INFO: SCM writing changed lines (done) | time=8ms
INFO: Analysis report generated in 177ms, dir size=237 KB
INFO: Analysis report compressed in 28ms, zip size=52 KB
INFO: Analysis report uploaded in 500ms
INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=ec2-leaser-backend&pullRequest=158
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=AYpMJdXmGgtzKoIQLLvy
INFO: Time spent writing ucfgs 52ms
INFO: Analysis total time: 47.511 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 54.136s
INFO: Final Memory: 76M/226M
INFO: ------------------------------------------------------------------------
e[32m✔ SonarCloud analysis was successful.e[0m

+ yarn lint
yarn run v1.22.19
warning package.json: No license field
$ eslint .
Done in 4.63s.

You already have a 'node' cache so we won't create it again
You already have a 'sonar' cache so we won't create it again
Cache "node: node_modules": Skipping upload for existing cache
Cache "sonar: ~/.sonar/cache": Skipping upload for existing cache

Searching for files matching artifact pattern .bitbucket/pipelines/generated/pipeline/pipes/**
Artifact pattern .bitbucket/pipelines/generated/pipeline/pipes/** matched 1 files with a total size of 17.5 KiB
Compressed files matching artifact pattern .bitbucket/pipelines/generated/pipeline/pipes/** to 3.9 KiB in 0 seconds
Uploading artifact of 3.9 KiB
Successfully uploaded artifact in 0 seconds

Searching for test report files in directories named [test-results, failsafe-reports, test-reports, TestResults, surefire-reports] down to a depth of 4
Finished scanning for test reports. Found 0 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.

So to resume, when you have an issue with the sonarsource/sonarcloud-scan:

  • increase the memory to the docker service
  • increase the memory in SONAR_SCANNER_OPTS
  • increase memory in -Dsonar.javascript.node.maxspace

My working bitbucket-pipelines.yml file is:

image: node:18

clone:
  depth: full

definitions:
  services:
    docker:
      memory: 4096
  caches:
    sonar: ~/.sonar/cache
  steps:
    - step: &backend-sonar
        name: sonar backend (sst)
        size: 2x
        caches:
          - node
          - sonar
        script:
          - yarn
          - cd packages/functions/
          - yarn coverage
          - pipe: sonarsource/sonarcloud-scan:2.0.0
            variables:
              EXTRA_ARGS: >
                -Dsonar.organization=gbandsmith
                -Dsonar.projectKey=ec2-leaser-backend
                -Dsonar.javascript.node.maxspace=4096
                -Dsonar.sources=src
                -Dsonar.tests=test
                -Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
                -Dsonar.testExecutionReportPaths=./sonar-report.xml
              SONAR_SCANNER_OPTS: -Xmx4096m
          - yarn lint

pipelines:
  pull-requests:
    "**":
        - step: *backend-sonar

Thanks a lot @victor.diez for the help in the pipe configuration, I learn that the pipe is using the memory configuration of services > docker > memory today! :nerd_face:

Have a nice day!

2 Likes

Excellent, thanks for letting us know @julbrs! :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.