Gitlab Merge Request: Could not find ref: dev in refs/heads, refs/remotes/upstream or refs/remotes/origin

Error message:
Could not find ref: dev in refs/heads, refs/remotes/upstream or refs/remotes/origin

This results in failure to compute coverage for our merge requests within gitlab.
We have already set up the depth to a 1000 without success.

sonarqube:
image:
    name: sonarsource/sonar-scanner-cli:latest
    entrypoint: [""]
stage: Deploy
tags:
  - gamma
  - dind
variables:
    SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" 
    GIT_DEPTH: "1000"
cache:
    key: ${CI_JOB_NAME}
    paths:
      - .sonar/cache
script:
  - cd service_folder
  - |
    sonar-scanner -Dsonar.qualitygate.wait=true \
    -Dsonar.python.xunit.reportPath=pytest_results.xml -Dsonar.python.coverage.reportPaths=cov.xml \
    -Dsonar.python.flake8.reportPaths=flake8.report

Are there any other solutions except do a full clone of the repo?

To answer my own question:
GIT_DEPTH should be 0. This will deactivate shallow cloning, as it was described in the sonarcloud docs.

Hi Robert,

Welcome to the community support!

So I suppose everything is green now?

Best.