-
What Grafana version and what operating system are you using? - 11.6 OSS - self hosted
-
What are you trying to achieve? - understanding of why the version numbers in an alert rule are not sequential
-
How are you trying to achieve it? understanding to explain the jumps in version numbers in the alert rule version numbers
eagle eye!
TLDR; this is by design to not pollute version table with 0 diff changes.
Why.
Historically, we stored each rules in its own row in database table. However, the API handles rules as group where position of each rule is indexed. Therefore, to ensure optimistic concurrency for all rules in a group we chose to increase version of all rules in the group that is changed. The side-effect was that the rule version table contained version of a rule where only version field was changed.
Recently, when we decided to show the history table, we decided to not display those versions to reduce the amount of records. Later we fixed this and now we do not store the no-diff versions.
