Analyze new project runs into Gateway Timeout

Template for a good new topic, formatted with Markdown:

  • GitLab
  • when trying to load the Projects from GitLab to create a properly linked project, i receive a Gateway timeout for the XHR request
  • Potential workaround:
    Create project manually, but than it is not properly linked with the ALM

We do have quiet a lot of Projects (big company) and this is regularly happening - it is hard to properly create projects. I would manually create them, but i am not able to do a proper linking with the ALM afterwards. An alternative would be a proper payload for the API request, but i also could not find any kind of documentation

It is sometimes working and sometimes not - which makes it really hard to debug the cause, and lets me assume that this is an issue between sonarcloud and GitLab.

Similar issues i found:

Hey @simon.schrottner

Thanks for the report. Can you share a screenshot of where you are seeing the error?

i forgot organization name is netconomy

Within the UI:

when directly calling the endpoint in the browser

EDIT: Maybe helpful information, we currently do have around 3k projects on GitLab :slight_smile:

Hey @simon.schrottner

It looks like while SonarCloud actually manages to process all requests to Gitlab, because it takes longer than 180 seconds (the timeout we have on our load balancer), the request fails.

  • A discussion will take place this week about whether or not we can just temporarily increase this timeout. Such a decision can’t be taken lightly.
  • More generally, we know that we need to do a better job making this endpoint scale for organizations with thousands of repos. This is a great example of why!

additionally maybe a search field, to reduce the request and leverage the minium set would be also a good an appreciated way of handling that - most people know the name of the project they want to add, they do not need to wait for the whole project list :slight_smile:

… and the hacky way:

curl --location --request POST 'https://sonarcloud.io/api/alm_integration/provision_projects' \
--header 'Authorization: Bearer <sonartoken>' \
--form 'installationKeys="<gitlab-project-id>"' \
--form 'organization="<sonarcloud-organisation>"'
1 Like

How do you do this for bitbucket cloud?

Moderator Note: This was discussed further in What is the "alm_integration/provision_projects" REST call for bitbucket cloud?