I am attempting to set up a monorepo for an Azure DevOps Server (on-premise) project. However, when I search for the code repository using the option “setup a monorepo”, the project does not appear in the results.
Interestingly, the same project is visible when searching through the Azure project onboarding default view.
Could you please assist in resolving this issue?
Additional Comment:
I forgot to mention that our Azure DevOps instance contains 250+ projects. I am not sure if this is related, but when requesting the project list REST API from Azure DevOps, it returns only the first 100 projects by default unless the query parameter top is added with a higher value to fetch more.
I am suspecting that when creating a monorepo, the API being used is returning only the default 100 projects, which might be causing the issue.
I’m not sure whether this will be helpful or not, but can you bump your server logging level to DEBUG (Administration → System → Logs level) and try this again? Hopefully that will give us a better view of what’s going on. But don’t keep the log level at DEBUG longer than you need to since those logs get big, fast.
I tried to troubleshoot this further by setting up a proxy on my SonarQube instance to capture the traffic. I noticed that the API call does not include any query parameter to fetch all projects. The requested API is https://devopsHost/OrgCollection/_apis/projects?api-version=3.0
To verify, I set a breakpoint and manually modified the REST API call before sending to include the appropriate query parameter https://devopsHost/OrgCollection/_apis/projects?$top=1000, and the project was successfully fetched .
This suggests that the issue might be due to the API not requesting more than the default 100 projects when creating a monorepo.