Edit: Actually @Colin, I’m not entirely sure it’s the same issue ?
It appears that the pipeline is attempting to publish analysis results for the develop branch as a short-lived (PR) branch, but this branch already exists in SonarCloud as a long-lived branch.
We’re doing this with a “new” created branch with a fresh commit every time. I’ll continue reading the thread though, looks like some other people are commenting there….
##[error]Task failed with status FAILED, Error message: Invalid branch type 'SHORT'. Branch 'releases/system-text-json-vulnerability-fix' already exists with type 'LONG'.
^ Unfortunately, we are not getting a message like this in our logs. I searched our raw logs for any message containing the strings ”Invalid branch type” or “already exists with type" and did not find it.
2025-10-03T15:27:40.2308937Z 15:27:40.230 INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=XXXXX&branch=rel-1.22_ato_scan_5
2025-10-03T15:27:40.2309988Z 15:27:40.230 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
2025-10-03T15:27:40.2310796Z 15:27:40.230 INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=AZmqr53cpwrM74IEMiuP
2025-10-03T15:27:40.2311363Z 15:27:40.230 INFO: ------------- Upload SCA dependency files
2025-10-03T15:27:40.7623952Z 15:27:40.762 DEBUG: --> GET https://api.sonarcloud.io/analysis/sensor-cache/prepare-write?organization=XXXXX&project=XXXXX&branch=rel-1.22_ato_scan_5
2025-10-03T15:27:41.1697570Z 15:27:41.169 DEBUG: <-- 200 https://api.sonarcloud.io/analysis/sensor-cache/prepare-write?organization=XXXXX&project=XXXXX&branch=rel-1.22_ato_scan_5 (407ms, unknown-length body)
2025-10-03T15:27:41.1714520Z 15:27:41.170 DEBUG: --> PUT https://analysis-sensorcache-eu-central-1-prod.s3.eu-central-1.amazonaws.com/<I removed the path/creds from here> (8094646-byte body)
2025-10-03T15:27:44.3089932Z 15:27:44.307 DEBUG: <-- 200 OK https://analysis-sensorcache-eu-central-1-prod.s3.eu-central-1.amazonaws.com/<I removed the path/creds from here> (3137ms, 0-byte body)
2025-10-03T15:27:44.3097198Z 15:27:44.307 INFO: Sensor cache published successfully
2025-10-03T15:27:44.3097768Z 15:27:44.308 INFO: Inferred api base url 'https://api.sonarcloud.io' from host url 'https://sonarcloud.io'.
2025-10-03T15:27:44.3098556Z 15:27:44.308 DEBUG: Architecture analysis is disabled
2025-10-03T15:27:44.3100436Z 15:27:44.309 DEBUG: Post-jobs :
2025-10-03T15:27:44.3519233Z 15:27:44.351 INFO: Analysis total time: 12:35.956 s
2025-10-03T15:27:44.3529352Z 15:27:44.352 INFO: ------------------------------------------------------------------------
2025-10-03T15:27:44.3529791Z 15:27:44.352 INFO: EXECUTION SUCCESS
2025-10-03T15:27:44.3530254Z 15:27:44.352 INFO: ------------------------------------------------------------------------
2025-10-03T15:27:44.3530663Z 15:27:44.352 INFO: Total time: 12:39.447s
2025-10-03T15:27:44.4472948Z 15:27:44.446 INFO: Final Memory: 343M/1336M
2025-10-03T15:27:44.4473618Z 15:27:44.446 INFO: ------------------------------------------------------------------------
Just in case, here’s everything after ANALYSIS SUCCESSFUL before we start the github workflow cleanup steps.
I confirm the error you had was similar to the other thread (the error is server-side so it’s normal you didn’t find it in the scanner logs).
Were you setting the long-living branch pattern in the organization settings (and not at the project level)? If so that could explain the error, and it has now been fixed.
I am not sure; I was mostly testing with the org-level regex, but the person before me might have tested at the project level. I remember modifying the project-level regex at least once.
May test when I have more time to roll back to this issue, but probably not this week.
Thank you for the confirmation.
It may have been incidental that it started working after you provided the branch name in sonar.branch.name if you changed the project-level regex at the same time (I can’t explain why your workaround would change the branch-type detection behavior).