Housekeeping / Database Cleaner / version event handling


(Günter Wirth) #1


We are using version numbers with 4 digits, the last number is the build number. Forwarding this to SQ creates in bigger teams typically more than one version event per day. As a result housekeeping is not working ( because snapshots have version events assigned.

On the same day this version number with build number is very useful. But after a day/week, … it could be ignored.

  • Would be good if feature works (clean-up) existing projects.
  • Different projects have different version number formats. So maybe you can provide a filter to define the “long-living” part of the version string.
  • Or simple flag: Keep only one version per day / week / month / year, …

see also: Housekeeping / version event


(G Ann Campbell) #2

Hi Guenter,

You should actually see some progress on this in 7.7. What I anticipate is that you’ll need to stop passing your full semantic version as sonar.projectVersion (for the reasons you’ve detailed) and use instead a different parameter we’ll provide. Note that you’ll need to manually clean out the old analyses with build-string-version-events.


(Gilbert Rebhan) #3

Hi Ann ,

which parameter do you propose ? For many legacy projects we’re using sonar.projectVersion for every scan, so we will get problems ? We’ve used this since starting with Enterprise edition 5.x in 2017 … currently running 7.6 in production and i didn’t notice any problems with that.


(G Ann Campbell) #4

Hi Gilbert,

This isn’t available yet; it (SONAR-11631) will (probably) show up in 7.7. (Check the release notes; it will be close.) What you would do is pass your full semantic build string to the new parameter, and use sonar.projectVersion only for the “big” version. For instance:

  • semantic version
    sonar.projectVersion = 7.7.0
  • semantic version
    sonar.projectVersion = 7.7.0
  • semantic version
    sonar.projectVersion = 7.8.0

Regarding your question about having used sonar.projectVersion since 2017, that’s normal and expected, and if you’ve only been using it to pass the ‘big’ version, then you won’t have any problems at all. If you’ve been using it to pass the full, semantic version, then you may be experiencing some database bloat and should consider some manual housekeeping.