Add Repo From Azure DevOps Not Listing Some Repos

Adding a repository from Azure DevOps is failing to find some projects and repos in our DevOps Org.

For example, when we search for this project it displays no results.
image

But I can see that browser call to api/alm_integrations/search_azure_repos is, in fact, returning data.

Any idea what might be causing this behavior?

Hey there.

Thanks for the report.

I can’t reproduce on SonarQube v9.2.4 – what version are you using? Is the behavior consistent in different browsers?

I happens on all browsers. We’re running Version 9.2.1 (build 49989) on Windows.

Thanks @jkirwan

I’m still trying to reproduce. Looking at the results for search_azure_repos – how many repositories are being returned when you search, for example, “mexico”?

Just the three included in the screenshot.

Hi @jkirwan. Are there any results displayed before you start your search?

If yes, what happens if you try to search for a repo that is displayed on the first page?

(For context, your problem looks very similar to SONAR-13900, which was fixed already. But maybe we missed something)

Picking this back up. Sorry for the delay.

Yes, the add repo page displays “10 of 100 shown”, (though we have more that 100 repos).

Searching for anything on that first page yields results.

I am experiencing this issue as well. I am running 9.4. I see exactly 100 repos listed and when I search and check the network tab I can see the response contains the list of repos I would expect, but they do not show up in the list on the web page. You can see from the screenshots below that the web page shows only 1 result while the response returns 9 repositories. Happening in both Chrome and Firefox.

@pierreguillot in response to your question, if I search a repo that is in the first 10 results it finds and displays it correctly. It is just those outside of the first 100 results that do not appear when searched.

Thankfully, it seems as I can get around this by manually creating a project, but it would still be nice to have this fixed.

Hi all,

Trying to understand what could go wrong based on the UI code, I have a suspicion this line may be triggering some unexpected behavior down the line.

@jdwirrenga Could you please check if the projectName property of each entry under repositories for your api/alm_integrations/search_azure_repos response payload are the same :pray: ? Or are they all different?

@jkirwan I wonder if this is not a different problem for 9.2. I’ll try to see if I can find something.

The projectName is different on each entry. Is the frontend maybe filtering the response on the initial list_azure_projects response which only has the first 100 repos? The search_azure_repos response is correct each time, they just don’t get displayed if they aren’t in that list of 100.

Is it possible the searchResults are filtering on projects instead of repositories or something similar in the AzureCreateProjectRenderer?

Hi all, and sorry for the late reply. You’re right, @jdwirrenga . The problem is here. This is a bug.

I’ve opened a ticket here: [SONAR-16627] AzureDevOps onboarding doesn't shows search results if the project is unknown - SonarSource

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.