tadejcek
(Tadej)
February 23, 2021, 10:15am
1
As one of may I am facing sonar warning
“Could not find ref ‘v3.5.0’ in refs/heads, refs/remotes/upstream or refs/remotes/origin. You may see unexpected issues and changes. Please make sure to fetch this ref before pull request analysis.”
I have fetched both branches before running analise but still getting warning. So git branch shows:
bug/15174_get-cases-for-user
develop
release/v3.5.0
and Sonar-project.properties has:
sonar.pullrequest.key=2869
sonar.pullrequest.branch=bug/15174_get-cases-for-user
sonar.pullrequest.base=release/v3.5.0
One more thing that is a question to me is where does “release/” annotation gone in a warning. bug/ and release/ are missing in sonarcloud.io as well
What am I doing wrong
Thanks for help
Hi @tadejcek
“release” keyword is a part of the long-living branch pattern that is defined by default.
Is this release/v3.5.0 branch already been analyzed on SonarCloud ? Is not, then you should, otherwise it may lead to errors.
Which CI tool are you using ? Are you filling those sonar.pullrequest.* by “hand” in the properties file ?
Mickaël
tadejcek
(Tadej)
February 25, 2021, 8:29am
4
Hi @mickaelcaro ,
thx for the response.
I think I have had tried that release/v3.5.0 was pre-analyzed. But I will try once again and back to you.
I am using Jenkins. And pullrequest.* are written by hand.
I have also tried checking out both branches by hand and running sonar command
tadejcek
(Tadej)
February 26, 2021, 7:25am
5
Ok @mickaelcaro ,
have made another test (by hand. Not using CI) that shows the same warning
What have I done:
I made checkout release/v3.5.0
run analyze. After analyze was finished the results were on sonarcloud.io
My sonar prop was:
sonar.host.url=
sonar.login=
sonar.organization=
sonar.projectKey=
sonar.projectName=
sonar.projectVersion=
sonar.sources=.
sonar.host.url=https://sonarcloud.io
sonar.sourceEncoding=UTF-8
sonar.exclusions=
sonar.login=
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-
sonar.eslint.reportPaths=
sonar.testExecutionReportPaths=
sonar.typescript.tslint.reportPath=
sonar.javascript.lcov.reportPaths=
sonar.coverage.exclusions=
sonar.scm.provider=git
sonar.branch.name=release/v3.5.0
But still getting the warning
> WARN: Could not find ref: v3.5.0 in refs/heads, refs/remotes/upstream or refs/remotes/origin"
Hi @tadejcek
Sorry for the late reply.
Could youi please give me a background task id that relates to one of these analysis on that branch ?
Thanks in advance.
Mickaël
tadejcek
(Tadej)
March 5, 2021, 1:26pm
10
Hi @mickaelcaro
Last two background tasks that have warning:
AXf8rovJSEcQXtpi67tC
AXf5VZbL7Q7kA315kp5
Thank you
Tadej
Hi @tadejcek
Thanks for that, so far the properties passed to the background process looks ok.
Will it be possible also that you share with us the log, in debug mode, of the Scanning process ?
I can PM you so you can share it privately, let me know.
Thank you.
tadejcek
(Tadej)
March 12, 2021, 2:01pm
14
Sorry for long responsne. Yes, please, It is possible.