We are using self hosted agents and just merged from the upstream branch and built a new packer image. Upstream
Unfortunately it didn’t resolve the issue. Is see that on the agent Java 11 and 17 are installed. I changed the JAVA_HOME and updated alternatives to use 17 by default but it didn’t help.
I noticed Sonar cloud analyse is using version 1.41.0
You will need to use version 1.42 of the extension. I’m not sure how you’ve come to be using both 1.41 and 1.38. Can you try and update the extension version?
It’s good to see the extension is updated and I suspect the agent running the analysis is lagging behind somehow. This article might help to ensure that the agents are up to date.
Is there anything else I could try? In general we are very happy customers of Sonarcloud but this issue is really annoying and basically nullifies the use of auto complete in Azure Devops.
I think this is the route of your problem. It seems really strange that your extension is up to date and your agents are on the latest version but an older version of the task is being used. I can only think this is some sort of caching on the agents and I’ve never heard of it happening before. I’m afraid I’m at a bit of a loss as to what could be causing this, I’ll ask some other teams to see if they have any ideas.
So after chatting with an engineer, it seems that the task versions are in fact different from the extension versions and the versions you have are correct so you are all up to date. Sorry for the confusion there.
This still leaves us with the problem of why you are still getting the warning. Have you tried setting JAVA_HOME just before the analysis runs?