I’m having difficulty getting a New Code Period to start when the project version changes. The following are the steps I used in this scenario:
- Perform a SonarQube analysis on
masterat 12:34 PM with version set to
- Introduce some code changes to
- Perform a SonarQube analysis on the new code at 1:25 PM on
masterwith version set to
Expected: A New Code period to start at 1:25 PM when the version was set to
Actual: New Code period is unchanged from 12:34 PM at version
As you can see, SonarQube recognizes that the new version is set:
But the New Code period simply isn’t starting:
The New Code Period for the project is set to the default of
I’m not sure if it matters, but there are no code changes for this period. The version is simply changing (these steps are being performed in a test project in an isolated fork of the original repo). EDIT: Under further testing, this behavior is the same even with new code as part of the analysis along with the new version.
I noticed this same behavior when we had our versions set to include the branch name, e.g.
1.1.517-master, but figured SonarQube didn’t understand it as an incrementing version due to the branch name being present. However, despite a fresh SonarQube project and using versions without the branch name, the behavior persists.
This is our first time using
previous_version for the New Code period. Our other project uses a floating seven-day period because it is not versioned code.
We are using the following:
SonarQube: 7.9.2 LTS Enterprise
SonarScanner CLI: 22.214.171.1242
Let me know if you need any more info.
Thanks in advance!