0

Yesterday we changed the rules of one of our projects on Sonar 5.6.1, and since then the analysis is failing with the error below.

Stack:
java.lang.IllegalArgumentException: Value is too long for issue author login: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:148) ~[guava-17.0.jar:na]
    at org.sonar.db.issue.IssueDto.setAuthorLogin(IssueDto.java:353) ~[sonar-db-5.6.1.jar:na]
    at org.sonar.db.issue.IssueDto.toDtoForComputationInsert(IssueDto.java:129) ~[sonar-db-5.6.1.jar:na]
    at org.sonar.server.computation.step.PersistIssuesStep.execute(PersistIssuesStep.java:69) ~[sonar-server-5.6.1.jar:na]
    at org.sonar.server.computation.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:64) ~[sonar-server-5.6.1.jar:na]
    at org.sonar.server.computation.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:52) ~[sonar-server-5.6.1.jar:na]
    at org.sonar.server.computation.taskprocessor.report.ReportTaskProcessor.process(ReportTaskProcessor.java:75) ~[sonar-server-5.6.1.jar:na]
    at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.executeTask(CeWorkerCallableImpl.java:81) [sonar-server-5.6.1.jar:na]
    at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:56) [sonar-server-5.6.1.jar:na]
    at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:35) [sonar-server-5.6.1.jar:na]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_101]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_101]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_101]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_101]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_101]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]
2017.01.30 16:42:28 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Executed task | project=sgl | type=REPORT | id=AVnwr0Dz3syUbWgWOt8O | submitter=jenkins | time=13516ms

The message is right... because of a configuration error, an user commited some changesets with a giant login (300+)... we cannot change the changesets (they were already pushed, and a long time ago)

1 - What can we do to stop this error on sonar?

2 - Why this error only showed up after we changed the rules? (I think it was because the old rules generated no issue on the files of the changesets with the giant login...)

1 Answers1

4
  1. You can update the author of the commit. Yes, there are consequences for the others developers on how they get the new upstream master. GitHub has a good script on this. On the other hand, you could (less cleaner solutions):
    • update the lines that report the issue and commit. You said it was an error to have such a long login
    • delete the file, commit then recreate the file with a new commit
    • exclude the file or issue from SonarQube analysis
    • deactivate SCM information. Look at SCM > Disable the SCM Sensor
    • depending on the rule you can personalize it to exclude some file patterns
    • wait for this ticket to be fixed : )
  2. You're right, you didn't have any issues related to this commit, that's why it hasn't failed earlier.
Community
  • 1
  • 1