I don’t think this is going to help. But only the latest version of Community Build is supported. So can you please point 25.7 at your DB and verify you get the same error?
I think I will need a bigger portion of the logs to better understand what is going on here.
This case reminds me a very similar one we had with a Data Center edition where multiple nodes of the cluster were trying to register the rules at the same time.
In your case, can you confirm that the database being used by the instance on 25.6 is not shared at all with the instance running on 25.5?
After the error you paster here, do you have something like this in the logs:
### Error committing transaction. Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.rule.RuleMapper.insertRuleDescriptionSection (batch index #3) failed. 2 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into rule_desc_sections (
uuid,
rule_uuid,
kee,
content,
context_key,
context_display_name
)
values (
('AYd2Ci2JI7EZ4cTavtDM'),
('AXYlqPUl3JNJ_j8XDKU-'),
('default'),
('See description of Pylint rule <code>C0413</code> at the <a href="https://pylint.pycqa.org/en/latest/technical_reference/features.html">Pylint website</a>.'),
(NULL),
(NULL)
) was aborted: ERROR: duplicate key value violates unique constraint "pk_rule_desc_sections"
Please send the extended version of your logs so we can have a better picture of the problem.
Hello @derMatze I am just back from holidays. and I am going to check the logs this week.
I know it is a bit a of a weird request, but, have you checked if you get the same behavior also updating to 25.7 or 25.8 that got released in the meantime?
Thanks! Yes, I also tried upgrading directly to the current version but the error remains. I think it´s a kind of migration which has to be done in any version > 25.5
Is it always the same rule registration failing also when moving to the other versions?
external_roslyn:CS8603
If the migration is running on a copy of the original data I would suggest to delete the rule from the Database and run again the migration. Just to make sure that something is not corrupted with that specific entry.
If after doing that the issue still materializes on another rule I am a bit out of ideas.
As already mentioned, I saw this problem in the past in a datacenter edition, but the customer never told us how the issue was fixed.
Thank you very much @derMatze fro letting us know that you managed to fix the problem.
I don’t have a real explanation about the registration of the rules at upgrade time was resulting in duplicates, but we will totally keep this case in mind if this problem arises again.