Auto bind selected project not working in Eclipse


(Patrick Huy) #1

I’m trying to Bind Eclipse Projects to my Sonarqube instance (running Sonarqube 6.7.3 - I’m not in the position to update or change it). Unfortunatly Autobind does not work at all and my projects are also not found via the content assist/search while typing.
When entering the full project name correctly manually binding seems to work fine.
The Sonarqube instance has a lot of projects (3k+) could this be part of the issue?

(Nicolas Bontoux) #2

Hi Patrick,

The number of project alone is not enough to conclude, but a high-volume instance can definitely influence SonarLint behaviour. It’s important you check-out the following tickets:

  • SLE-229 (fixed since SonarLint for Eclipse v3.4)- SonartLint fails to connect with more than 10K projects/modules in SonarQube
  • SLE-234 (affects latest SonarLint for Eclipse v3.6 as of writing) - Allow to search for a project within more than 10K projects/modules declared in SonarQube

All in all with the current latest version (v3.6 as of today) it’s possible that auto-bind indeed does not work when connecting to a large SonarQube instance (more than 10k projects+modules).

(Patrick Huy) #3

Thank you Nico, it is indeed likely that the Sonarqube instance has more than 10k modules. I concluded the 3k projects by clicking on projects and looking at the number, I’m not sure where I could see the number of modules.
Are there any possible workarounds I could do? Manually binding 50+ Eclipse projects is no fun.

(Nicolas Bontoux) #4

Hey Patrick,

Nowhere in the UI as it’s a relatively technical/internal consideration. You could query it like this: http://<sonar_url>/api/components/search?qualifiers=TRK,BRC (with same user logged-in as with SonarLint).

I don’t see any simple workaround on the SonarLint side. Thinking outside of the box, one ‘exotic’ approach could be to leverage the fact that it’s not about the absolute number of projects/modules on SQ side, but about the number that the logged-in user is authorized to see. So you could think of a dummy/test user account which would only have access permission over a restricted set of projects (de-facto reducing the amount of projects/modules seen by SonarLint logged-in account, and letting auto-bind do its job).

(Patrick Huy) #5

I can confirm that the number of modules is indeed greater than 10k (it’s > 20k actually).

Is this a client sided restriction or an API restriction (it feels a little artificial)? Could I just put a higher number somewhere and have it work?

(Nicolas Bontoux) #6

Be sure we would have mentioned it as a clear workaround if it was the case :sweat_smile:

Nah unfortunately it’s a server-side limitations in terms of the amount of data you can get at once from the data backend. No need to dive in details, and we anyhow very much agree that the end-user use-case remains valid (independently of server technical considerations). Hence SLE-234 to allow a more fluid user experience.