сонаром не может отправить отчет сканирования ветки, если в названии ветки есть точка?
                  
                  
                  
                  
                  
                  Подключил sonar к проекту Java + Gradle
                  
                  
                  МР'ы сканирует нормально, отчеты загружает
                  
                  
                  
                  
                  
                  Но если происходит сканирование ветки, то падает отправка отчета. Ветка называет "3.0", с веткой с названием "master" проблем нет
                  
                  
                  
                  
                  
                  Логи:
                  
                  
                   Task :sonar
                  
                  
                  Unable to parse source file : 'application/src/main/java/ru/test/sm/database/converter/model/JobConverter.java'
                  
                  
                  Parse error at line 41 column 23: A switch expression should have a default case
                  
                  
                  Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
                  
                  
                  Use of preview features have been detected during analysis. Enable DEBUG mode to see them.
                  
                  
                  Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
                  
                  
                  > Task :sonar FAILED
                  
                  
                  FAILURE: Build failed with an exception.
                  
                  
                  * What went wrong:
                  
                  
                  Execution failed for task ':sonar'.
                  
                  
                  > Failed to upload report: Fail to request url: https://sonarqube.gk.test.ru/api/ce/submit?projectKey=gkc-sm-srv&projectName=sm-web&characteristic=branch%3D2.0&characteristic=branchType%3DBRANCH
                  
                  
                  * Try:
                  
                  
                  > Run with --stacktrace option to get the stack trace.
                  
                  
                  > Run with --info or --debug option to get more log output.
                  
                  
                  > Run with --scan to get full insights.
                  
                  
                  * Get more help at https://help.gradle.org
                  
                  
                  Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
                  
                  
                  You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
                  
                  
                  See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
                  
                  
                  BUILD FAILED in 2m 16s
                  
                  
                  
                  
                  
                  
                  
                  
                  Сама джоба:
                  
                  
                  sonarqube-check:
                  
                  
                    stage: sonar
                  
                  
                    image: ${GRADLE_IMAGE}
                  
                  
                    variables:
                  
                  
                      PROJECT_KEY: gkc-sm-srv
                  
                  
                      SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"  # Defines the location of the analysis task cache
                  
                  
                      GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
                  
                  
                    cache:
                  
                  
                      key: "${CI_JOB_NAME}"
                  
                  
                      paths:
                  
                  
                        - .sonar/cache
                  
                  
                    script: gradle sonar ${NEXUS_VARS} -Dsonar.host.url=$SONAR_HOST -Dsonar.login=$SONAR_TOKEN -Dsonar.projectKey=$PROJECT_KEY
                  
                  
                    allow_failure: true
                  
                  
                    rules:
                  
                  
                      - if: '$CI_COMMIT_REF_NAME =~ "/^(\d+\.)*(\d+)$/" || $CI_PIPELINE_SOURCE == "merge_request_event"'
                  
                  
                        allow_failure: false
                  
                  
                      - when: never
                  
                  
                
Орет на синтаксическую ошибку в конкретном файле и конкретной строке. Смотрел на нее?
Ошибка есть, да, но отчет не отправляется..
Но там просто нет блока с default
А добавлять --debug и --stacktrace пробовал?
Пробовал, просто был трейс с ошибками при билде, но не отправки
Это не влияет на отправку отчета
Разобрался, лимит стоял на веб-сервере (ингрессе) по размеру файла Увеличил - отчет пропустил
Обсуждают сегодня