Automatic assignment of an issue to a user doesn't work

We opened a bug in JGit bugtracker: https://bugs.eclipse.org/bugs/show_bug.cgi?id=548875

Nice, but don’t you have a longer stacktrace? This one looks truncated (missing a lot of Caused by xxxx)

This is all that was printed to the terminal.

No reaction from the JGit folks yet :frowning:

@Julien_HENRY Unfortunately, it doesn’t seem like the JGit issue will be handled anytime soon. Is there anything else we can do to handle the issue assignment problem?

Hi @s-gurevich

I see the following options:

  1. you manage to “repair” your repo in a way that won’t trigger the JGit bug (but that probably means having already a good understanding of what is causing the JGit issue)
  2. you manage to provide a reproducer so that we could investigate and fix the JGit issue
  3. stop using JGit and use the native Git client instead (we already have a user suggesting the same because of performance issues: https://jira.sonarsource.com/browse/SONARSCGIT-39). This change brings other problems, so it is not a silver bullet.

Hi @Julien_HENRY,

it would be great if Sonar used native Git, but as long as it’s not possible, we go with the reproducer :slight_smile:

Here is the reproducer for the JGit NullPointer bug with the manipulated Git history:

We hope, it helps.

Thanks in advance!

It seems our test with JGit was wrongly performed. You must call JGit blame from the project root directory with the relative path to the file. Then you get the correct claim information, even with the manipulated Git history. Then we are back to not knowing what is causing the failing Sonar issue author assignment, unfortunately. :frowning:

Hi,

we found the reason for the failing assignment of commiters to issues.

The reason was a configuration in our TeamCity:
The setting “Use mirrors” (https://www.jetbrains.com/help/teamcity/git.html#Git-AgentSettings) was activated. If deactivated, the user assignment for the issues starts working again.

Thanks again for all helping with the analysis!

1 Like